keys 2
This commit is contained in:
+10
-2
@@ -13,7 +13,7 @@ use crate::editor_menu::{MenuEntry, MenuLevel};
|
||||
use crate::log::{LogWidget, log_preview_line};
|
||||
use crate::render::{BoardWidget, board_to_screen, screen_to_board};
|
||||
use crate::ui::Ui;
|
||||
use crate::utils::rgba8_to_color;
|
||||
use crate::utils::{glyph_to_span, rgba8_to_color};
|
||||
use kiln_core::cp437::tile_to_char;
|
||||
use kiln_core::game::GameState;
|
||||
use kiln_core::glyph::Glyph;
|
||||
@@ -458,6 +458,14 @@ pub(crate) fn draw_editor(frame: &mut Frame, ed: &mut EditorState, ui: &mut Ui)
|
||||
Span::styled(label, label_style),
|
||||
]));
|
||||
}
|
||||
MenuEntry::Glyph { key, glyph, label, .. } => {
|
||||
lines.push(Line::from(vec![
|
||||
Span::styled(format!("[{}] ", key), key_style),
|
||||
glyph_to_span(glyph),
|
||||
Span::raw(" "),
|
||||
Span::styled(label, label_style),
|
||||
]));
|
||||
}
|
||||
MenuEntry::Blank => lines.push(Line::from("")),
|
||||
// A horizontal rule spanning the sidebar's inner width.
|
||||
MenuEntry::Separator => lines.push(Line::from(Span::styled(
|
||||
@@ -514,7 +522,7 @@ fn draw_footer_lines<'a>(
|
||||
// The archetype currently being drawn (no UI to change it yet).
|
||||
Line::from(Span::styled(ed.current_archetype.name(), label_style)),
|
||||
Line::from(vec![
|
||||
Span::styled("[g] ", key_style),
|
||||
Span::styled("[G] ", key_style),
|
||||
Span::styled("Glyph ", label_style),
|
||||
preview,
|
||||
]),
|
||||
|
||||
Reference in New Issue
Block a user