generated from GarandPLG/rust-flake-template
Refactor cell marking, add undo, update keybindings
CellWidget::set_selected and set_marked now return &mut Self for method chaining. Added BoardState::undo_marked_cell to remove the last marked cell and restore focus. Backspace triggers undo, Delete clears marking.
This commit is contained in:
1 parent
d5f4d03264
commit
1393f282e8
6 files changed
+74
-34
No files matched your search
@@ -84,7 +84,8 @@ pub fn skirmish_keybindings(app: &mut App, key_event: &KeyEvent) {
|
||||
ZoomLevel::ZoomedOut => {}
|
||||
},
|
||||
Action::Space => board.toggle_marking(),
|
||||
Action::Backspace => {
|
||||
Action::Backspace => board.undo_marked_cell(),
|
||||
Action::Delete => {
|
||||
board.marking_cells = false;
|
||||
board.clear_marked_cells()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user