moving the state from general to each page owning its own state of button or canvas focus

This commit is contained in:
Priec
2025-09-04 17:36:13 +02:00
parent 6891631b8d
commit d9d8562539
24 changed files with 286 additions and 168 deletions

View File

@@ -335,6 +335,7 @@ pub struct AddLogicFormState {
pub state: AddLogicState,
pub editor: FormEditor<AddLogicState>,
pub focus_outside_canvas: bool,
pub focused_button_index: usize,
}
// manual Debug because FormEditor may not implement Debug
@@ -343,6 +344,7 @@ impl std::fmt::Debug for AddLogicFormState {
f.debug_struct("AddLogicFormState")
.field("state", &self.state)
.field("focus_outside_canvas", &self.focus_outside_canvas)
.field("focused_button_index", &self.focused_button_index)
.finish()
}
}
@@ -355,6 +357,7 @@ impl AddLogicFormState {
state,
editor,
focus_outside_canvas: false,
focused_button_index: 0,
}
}
@@ -373,6 +376,7 @@ impl AddLogicFormState {
state,
editor,
focus_outside_canvas: false,
focused_button_index: 0,
}
}
@@ -382,6 +386,7 @@ impl AddLogicFormState {
state,
editor,
focus_outside_canvas: false,
focused_button_index: 0,
}
}