structured data editor
git clone https://git.lucas.co/cce-data-editor.git
refactor: adapt Spinbox/Panel/leaf fields to the cce-ui Phase 5 migration
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LkfJazPs9bRchkcozmxXCX
src/main.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main.rs b/src/main.rs
index 7e99484..7357199 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -245,7 +245,7 @@ struct DataEditorApp {
// Edit Value input
selected_value_editor: TextBox,
selected_color_editor: ColorSelector,
- selected_spinbox_editor: Spinbox,
+ selected_spinbox_editor: cce_ui::widget::Adapted<cce_ui::widget::Spinbox>,
selected_font_editor: FontSelector,
selected_choice_editor: Dropdown,
selected_keybind_editor: KeybindRecorder,
@@ -1271,7 +1271,7 @@ impl Application for DataEditorApp {
self.ui_context.register_widget(self.btn_open.base().unwrap().id(), &mut (*self_ptr).btn_open as *mut Dropdown as *mut (dyn Element + 'static));
self.ui_context.register_widget(self.tree_list.base().unwrap().id(), &mut (*self_ptr).tree_list as *mut TreeList as *mut (dyn Element + 'static));
self.ui_context.register_widget(self.selected_color_editor.base().unwrap().id(), &mut (*self_ptr).selected_color_editor as *mut ColorSelector as *mut (dyn Element + 'static));
- self.ui_context.register_widget(self.selected_spinbox_editor.base().unwrap().id(), &mut (*self_ptr).selected_spinbox_editor as *mut Spinbox as *mut (dyn Element + 'static));
+ self.ui_context.register_widget(self.selected_spinbox_editor.base().unwrap().id(), (*self_ptr).selected_spinbox_editor.as_ptr_mut());
self.ui_context.register_widget(self.selected_font_editor.base().unwrap().id(), &mut (*self_ptr).selected_font_editor as *mut FontSelector as *mut (dyn Element + 'static));
self.ui_context.register_widget(self.selected_choice_editor.base().unwrap().id(), &mut (*self_ptr).selected_choice_editor as *mut Dropdown as *mut (dyn Element + 'static));
self.ui_context.register_widget(self.selected_keybind_editor.base().unwrap().id(), &mut (*self_ptr).selected_keybind_editor as *mut KeybindRecorder as *mut (dyn Element + 'static));