Fix build issue
This commit is contained in:
parent
df1d678ab9
commit
eb9999b85b
@ -25,7 +25,7 @@ use crate::ui_widgets::button_widget::ButtonWidget;
|
|||||||
use crate::ui_widgets::checkbox_widget::CheckboxWidget;
|
use crate::ui_widgets::checkbox_widget::CheckboxWidget;
|
||||||
use crate::ui_widgets::text_editor_widget::TextEditorWidget;
|
use crate::ui_widgets::text_editor_widget::TextEditorWidget;
|
||||||
|
|
||||||
#[derive(num_derive::FromPrimitive, num_derive::ToPrimitive, Eq, PartialEq)]
|
#[derive(num_derive::FromPrimitive, num_derive::ToPrimitive, Eq, PartialEq, Copy, Clone)]
|
||||||
enum EditingField {
|
enum EditingField {
|
||||||
MapWidth = 0,
|
MapWidth = 0,
|
||||||
MapHeight,
|
MapHeight,
|
||||||
@ -128,7 +128,7 @@ impl GameRulesConfigurationScreen {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyCode::Char(c) if ('0'..='9').contains(&c) => {
|
KeyCode::Char(c) if c.is_ascii_digit() => {
|
||||||
let val = c.to_string().parse::<usize>().unwrap_or_default();
|
let val = c.to_string().parse::<usize>().unwrap_or_default();
|
||||||
|
|
||||||
if self.curr_field == EditingField::MapWidth
|
if self.curr_field == EditingField::MapWidth
|
||||||
|
Loading…
Reference in New Issue
Block a user