From 4efba09b6c9538d5e124bb3e87c19b72edc01eec Mon Sep 17 00:00:00 2001 From: Ygg01 <y.laughing.man.y@gmail.com> Date: Thu, 14 Apr 2022 01:31:29 +0200 Subject: [PATCH] Rename the `spinbox` -> `spin_box` and minor refactors --- examples/text_box.rs | 4 ++-- src/widgets/mod.rs | 4 ++-- src/widgets/{spinbox.rs => spin_box.rs} | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename src/widgets/{spinbox.rs => spin_box.rs} (99%) diff --git a/examples/text_box.rs b/examples/text_box.rs index db9adcf..9de464e 100644 --- a/examples/text_box.rs +++ b/examples/text_box.rs @@ -5,13 +5,13 @@ use bevy::{ }; use kayak_core::Color; use kayak_render_macros::use_state; -use kayak_ui::bevy::{BevyContext, BevyKayakUIPlugin, FontMapping, UICameraBundle}; +use kayak_ui::{bevy::{BevyContext, BevyKayakUIPlugin, FontMapping, UICameraBundle}}; use kayak_ui::core::{ render, rsx, styles::{Style, StyleProp, Units}, widget, Index, }; -use kayak_ui::widgets::{App, OnChange, TextBox, Window}; +use kayak_ui::widgets::{App, OnChange, Window, TextBox}; #[widget] fn TextBoxExample() { diff --git a/src/widgets/mod.rs b/src/widgets/mod.rs index 4bce189..a8c19d6 100644 --- a/src/widgets/mod.rs +++ b/src/widgets/mod.rs @@ -10,7 +10,7 @@ mod inspector; mod nine_patch; mod on_change; mod scroll; -mod spinbox; +mod spin_box; mod text; mod text_box; mod tooltip; @@ -28,7 +28,7 @@ pub use inspector::*; pub use nine_patch::*; pub use on_change::*; pub use scroll::*; -pub use spinbox::*; +pub use spin_box::*; pub use text::*; pub use text_box::*; pub use tooltip::*; diff --git a/src/widgets/spinbox.rs b/src/widgets/spin_box.rs similarity index 99% rename from src/widgets/spinbox.rs rename to src/widgets/spin_box.rs index 453a19c..34d756c 100644 --- a/src/widgets/spinbox.rs +++ b/src/widgets/spin_box.rs @@ -72,7 +72,7 @@ pub struct FocusSpinbox(pub bool); /// | `on_layout` | ✅ | /// | `focusable` | ✅ | /// -pub fn TextBox(props: SpinBoxProps) { +pub fn SpinBox(props: SpinBoxProps) { let SpinBoxProps { on_change, placeholder, -- GitLab