generated from GarandPLG/rust-flake-template
Add toggle_marking and simplify marking logic
Introduce a public `BoardState::toggle_marking` that flips the marking mode and starts or clears marking accordingly. Refactor `set_marked_cell` to accept tuple coordinates and clean up its logic. Update `change_focused_cell` to work with the new signature and use the toggle helper. Adjust cell display to show coordinates when a cell is marked.
This commit is contained in:
@@ -81,7 +81,7 @@ impl CellWidget {
|
||||
}
|
||||
|
||||
fn display_coords(&self) -> Span<'_> {
|
||||
if self.selected || self.tag != CellTag::Stone {
|
||||
if self.selected || self.tag != CellTag::Stone || self.marked {
|
||||
format!("{}{}", self.col_to_letters(), self.row).green()
|
||||
} else {
|
||||
"".to_span()
|
||||
|
||||
Reference in New Issue
Block a user