generated from GarandPLG/rust-flake-template
Add zoom support and emoji keybinding icons
- CellWidget now stores a ZoomLevel, renders size‑dependent text, and provides methods to set the zoom level and build its block. - BoardState creates cells with the current zoom level, adds a helper to get a mutable cell, and updates each cell’s zoom level in `zoom_change`. - KeybindingsWidget constructor now takes the widget height, calculates vertical padding to centre groups, and adds left borders between groups. - Views (default, main_menu, skirmish) pass the area height to the new constructor. - Keybinding descriptions are replaced with emoji symbols (🔈, 🔊, 🔉). - BoardWidget clones the cell template instead of dereferencing it.
This commit is contained in:
@@ -93,6 +93,6 @@ pub fn main_menu_view(app: &App, area: Rect, buf: &mut Buffer) {
|
||||
}
|
||||
|
||||
{
|
||||
KeybindingsWidget::new(ACTIONS).render(keybindings_area, buf);
|
||||
KeybindingsWidget::new(ACTIONS, keybindings_area.height).render(keybindings_area, buf);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user