diff --git a/examples/avsb.rs b/examples/avsb.rs index 6cfa98a0..836f846f 100644 --- a/examples/avsb.rs +++ b/examples/avsb.rs @@ -22,10 +22,10 @@ struct CurrentCountBundle { impl Default for CurrentCountBundle { fn default() -> Self { Self { - count: CurrentCount::default(), + count: CurrentCount, styles: KStyle::default(), computed_styles: ComputedStyles::default(), - widget_name: CurrentCount::default().get_name(), + widget_name: CurrentCount.get_name(), } } } @@ -187,7 +187,7 @@ fn startup( widget_context.add_widget_data::(); widget_context.add_widget_system( - CurrentCount::default().get_name(), + CurrentCount.get_name(), widget_update::, current_count_render, ); diff --git a/examples/conditional_widget.rs b/examples/conditional_widget.rs index 380aa91d..54f1451a 100644 --- a/examples/conditional_widget.rs +++ b/examples/conditional_widget.rs @@ -21,9 +21,9 @@ struct MyWidgetBundle { impl Default for MyWidgetBundle { fn default() -> Self { Self { - count: MyWidget::default(), + count: MyWidget, styles: KStyle::default(), - widget_name: MyWidget::default().get_name(), + widget_name: MyWidget.get_name(), } } } @@ -115,7 +115,7 @@ fn startup( let parent_id = None; widget_context.add_widget_data::(); widget_context.add_widget_system( - MyWidget::default().get_name(), + MyWidget.get_name(), widget_update::, my_widget_render, ); diff --git a/examples/modal.rs b/examples/modal.rs index 1d055f08..789a23f2 100644 --- a/examples/modal.rs +++ b/examples/modal.rs @@ -29,9 +29,9 @@ struct MyWidgetBundle { impl Default for MyWidgetBundle { fn default() -> Self { Self { - count: MyWidget::default(), + count: MyWidget, styles: KStyle::default(), - widget_name: MyWidget::default().get_name(), + widget_name: MyWidget.get_name(), } } } @@ -140,7 +140,7 @@ fn startup( let parent_id = None; widget_context.add_widget_data::(); widget_context.add_widget_system( - MyWidget::default().get_name(), + MyWidget.get_name(), widget_update::, my_widget_render, ); diff --git a/examples/quads.rs b/examples/quads.rs index 633ca191..ac3a910f 100644 --- a/examples/quads.rs +++ b/examples/quads.rs @@ -137,7 +137,7 @@ fn main() { .add_plugins(DefaultPlugins) .add_plugins(( LogDiagnosticsPlugin::default(), - FrameTimeDiagnosticsPlugin::default(), + FrameTimeDiagnosticsPlugin, KayakContextPlugin, KayakWidgets, )) diff --git a/examples/scrolling.rs b/examples/scrolling.rs index 0d86dfac..80ad221f 100644 --- a/examples/scrolling.rs +++ b/examples/scrolling.rs @@ -74,7 +74,7 @@ fn main() { KayakContextPlugin, KayakWidgets, LogDiagnosticsPlugin::default(), - FrameTimeDiagnosticsPlugin::default(), + FrameTimeDiagnosticsPlugin, )) .add_systems(Startup, startup) .run() diff --git a/examples/simple_state.rs b/examples/simple_state.rs index 8e295876..ef5f38a0 100644 --- a/examples/simple_state.rs +++ b/examples/simple_state.rs @@ -22,10 +22,10 @@ struct CurrentCountBundle { impl Default for CurrentCountBundle { fn default() -> Self { Self { - count: CurrentCount::default(), + count: CurrentCount, styles: KStyle::default(), computed_styles: ComputedStyles::default(), - widget_name: CurrentCount::default().get_name(), + widget_name: CurrentCount.get_name(), } } } @@ -98,7 +98,7 @@ fn startup( let parent_id = None; widget_context.add_widget_data::(); widget_context.add_widget_system( - CurrentCount::default().get_name(), + CurrentCount.get_name(), widget_update::, current_count_render, ); diff --git a/examples/text_box.rs b/examples/text_box.rs index 558401a8..0960c933 100644 --- a/examples/text_box.rs +++ b/examples/text_box.rs @@ -24,7 +24,7 @@ impl Default for TextBoxExampleBundle { Self { text_box_example: Default::default(), styles: Default::default(), - widget_name: TextBoxExample::default().get_name(), + widget_name: TextBoxExample.get_name(), } } } @@ -100,7 +100,7 @@ fn startup( widget_context.add_widget_data::(); widget_context.add_widget_system( - TextBoxExample::default().get_name(), + TextBoxExample.get_name(), widget_update::, update_text_box_example, ); diff --git a/examples/todo/input.rs b/examples/todo/input.rs index 8fa822a9..25b87d06 100644 --- a/examples/todo/input.rs +++ b/examples/todo/input.rs @@ -20,7 +20,7 @@ pub struct TodoInputBundle { impl Default for TodoInputBundle { fn default() -> Self { Self { - widget: TodoInputProps::default(), + widget: TodoInputProps, focusable: Default::default(), styles: KStyle::default(), computed_styles: ComputedStyles(KStyle { @@ -31,7 +31,7 @@ impl Default for TodoInputBundle { bottom: StyleProp::Value(Units::Pixels(20.0)), ..KStyle::default() }), - widget_name: TodoInputProps::default().get_name(), + widget_name: TodoInputProps.get_name(), } } } diff --git a/examples/todo/items.rs b/examples/todo/items.rs index ae7cfe16..80f8e2e3 100644 --- a/examples/todo/items.rs +++ b/examples/todo/items.rs @@ -19,7 +19,7 @@ pub struct TodoItemsBundle { impl Default for TodoItemsBundle { fn default() -> Self { Self { - widget: TodoItemsProps::default(), + widget: TodoItemsProps, styles: KStyle::default(), computed_styles: ComputedStyles(KStyle { render_command: StyleProp::Value(RenderCommand::Layout), @@ -27,7 +27,7 @@ impl Default for TodoItemsBundle { width: StyleProp::Value(Units::Stretch(1.0)), ..KStyle::default() }), - widget_name: TodoItemsProps::default().get_name(), + widget_name: TodoItemsProps.get_name(), } } } diff --git a/examples/todo/todo.rs b/examples/todo/todo.rs index 33391db9..8154eac8 100644 --- a/examples/todo/todo.rs +++ b/examples/todo/todo.rs @@ -65,12 +65,12 @@ fn startup( widget_context.add_widget_data::(); widget_context.add_widget_system( - TodoItemsProps::default().get_name(), + TodoItemsProps.get_name(), widget_update_with_resource::, render_todo_items, ); widget_context.add_widget_system( - TodoInputProps::default().get_name(), + TodoInputProps.get_name(), widget_update_with_resource::, render_todo_input, ); diff --git a/examples/transitions.rs b/examples/transitions.rs index 94443828..2cb33a02 100644 --- a/examples/transitions.rs +++ b/examples/transitions.rs @@ -180,7 +180,7 @@ fn main() { KayakContextPlugin, KayakWidgets, LogDiagnosticsPlugin::default(), - FrameTimeDiagnosticsPlugin::default(), + FrameTimeDiagnosticsPlugin, )) .add_systems(Startup, startup) .run() diff --git a/examples/vec.rs b/examples/vec.rs index 2f110999..d0a60707 100644 --- a/examples/vec.rs +++ b/examples/vec.rs @@ -12,7 +12,7 @@ fn my_widget_1_update( ) -> bool { if query.get(entity).is_ok() { let parent_id = Some(entity); - let data = vec![ + let data = [ "Text 1", "Text 2", "Text 3", "Text 4", "Text 5", "Text 6", "Text 7", "Text 8", "Text 9", "Text 10", ];