From ed0d208b15cc3f2c8db659f6ccb8f488d2ac8e26 Mon Sep 17 00:00:00 2001 From: Matthew <logicprojectsforfpgas@gmail.com> Date: Wed, 15 Jun 2022 13:20:11 -0600 Subject: [PATCH] Use full path to Index in macros --- examples/bevy_state.rs | 4 +--- examples/clipping.rs | 1 - examples/counter.rs | 2 +- examples/fold.rs | 2 +- examples/full_ui.rs | 2 +- examples/global_counter.rs | 2 +- examples/hooks.rs | 2 +- examples/if.rs | 2 +- examples/image.rs | 1 - examples/nine_patch.rs | 1 - examples/provider.rs | 2 +- examples/scrollbox.rs | 1 - examples/shrink_grow_layout.rs | 2 +- examples/tabs/tabs.rs | 2 +- examples/text_box.rs | 2 +- examples/todo/todo.rs | 2 +- examples/vec_widget.rs | 2 +- examples/windows.rs | 1 - examples/world_interaction.rs | 2 +- kayak_render_macros/src/lib.rs | 2 +- 20 files changed, 15 insertions(+), 22 deletions(-) diff --git a/examples/bevy_state.rs b/examples/bevy_state.rs index 11e7b87..9ebd91a 100644 --- a/examples/bevy_state.rs +++ b/examples/bevy_state.rs @@ -4,9 +4,7 @@ use bevy::{ DefaultPlugins, }; use kayak_ui::bevy::{BevyContext, BevyKayakUIPlugin, FontMapping, UICameraBundle}; -use kayak_ui::core::{ - render, rsx, widget, Event, EventType, Index, KayakContextRef, KeyCode, OnEvent, -}; +use kayak_ui::core::{render, rsx, widget, Event, EventType, KayakContextRef, KeyCode, OnEvent}; use kayak_ui::widgets::{App, Text}; #[derive(Debug, Clone, Eq, PartialEq, Hash)] diff --git a/examples/clipping.rs b/examples/clipping.rs index 28c6465..43887fc 100644 --- a/examples/clipping.rs +++ b/examples/clipping.rs @@ -7,7 +7,6 @@ use kayak_ui::bevy::{BevyContext, BevyKayakUIPlugin, FontMapping, ImageManager, use kayak_ui::core::{ render, styles::{Edge, Style, StyleProp, Units}, - Index, }; use kayak_ui::widgets::{App, Clip, NinePatch, Text}; diff --git a/examples/counter.rs b/examples/counter.rs index 4c1d46d..9b26433 100644 --- a/examples/counter.rs +++ b/examples/counter.rs @@ -7,7 +7,7 @@ use kayak_ui::bevy::{BevyContext, BevyKayakUIPlugin, FontMapping, UICameraBundle use kayak_ui::core::{ render, rsx, styles::{Style, StyleProp, Units}, - use_state, widget, EventType, Index, OnEvent, + use_state, widget, EventType, OnEvent, }; use kayak_ui::widgets::{App, Button, Text, Window}; diff --git a/examples/fold.rs b/examples/fold.rs index 3b0570c..d22c517 100644 --- a/examples/fold.rs +++ b/examples/fold.rs @@ -9,7 +9,7 @@ use kayak_ui::{ core::{ render, rsx, styles::{Style, StyleProp, Units}, - use_state, widget, Color, EventType, Handler, Index, OnEvent, + use_state, widget, Color, EventType, Handler, OnEvent, }, widgets::{App, Background, Button, Fold, If, Text, Window}, }; diff --git a/examples/full_ui.rs b/examples/full_ui.rs index b313899..cc4188d 100644 --- a/examples/full_ui.rs +++ b/examples/full_ui.rs @@ -7,7 +7,7 @@ use kayak_ui::bevy::{BevyContext, BevyKayakUIPlugin, FontMapping, ImageManager, use kayak_ui::core::{ render, rsx, styles::{Edge, LayoutType, Style, StyleProp, Units}, - widget, Bound, Children, EventType, Index, MutableBound, OnEvent, WidgetProps, + widget, Bound, Children, EventType, MutableBound, OnEvent, WidgetProps, }; use kayak_ui::widgets::{App, NinePatch, Text}; diff --git a/examples/global_counter.rs b/examples/global_counter.rs index 46653ee..a4d2053 100644 --- a/examples/global_counter.rs +++ b/examples/global_counter.rs @@ -4,7 +4,7 @@ use bevy::{ DefaultPlugins, }; use kayak_ui::bevy::{BevyContext, BevyKayakUIPlugin, FontMapping, UICameraBundle}; -use kayak_ui::core::{bind, render, rsx, widget, Binding, Bound, Index, MutableBound}; +use kayak_ui::core::{bind, render, rsx, widget, Binding, Bound, MutableBound}; use kayak_ui::widgets::{App, Text, Window}; #[derive(Clone, PartialEq)] diff --git a/examples/hooks.rs b/examples/hooks.rs index 6565612..170630f 100644 --- a/examples/hooks.rs +++ b/examples/hooks.rs @@ -16,7 +16,7 @@ use bevy::{ }; use kayak_ui::{ bevy::{BevyContext, BevyKayakUIPlugin, FontMapping, UICameraBundle}, - core::{render, rsx, use_effect, use_state, widget, EventType, Index, OnEvent}, + core::{render, rsx, use_effect, use_state, widget, EventType, OnEvent}, widgets::{App, Button, Text, Window}, }; diff --git a/examples/if.rs b/examples/if.rs index 1280686..8719991 100644 --- a/examples/if.rs +++ b/examples/if.rs @@ -7,7 +7,7 @@ use kayak_ui::bevy::{BevyContext, BevyKayakUIPlugin, FontMapping, UICameraBundle use kayak_ui::core::{ render, rsx, styles::{Style, StyleProp, Units}, - widget, Bound, EventType, Index, MutableBound, OnEvent, + widget, Bound, EventType, MutableBound, OnEvent, }; use kayak_ui::widgets::{App, Button, If, Text, Window}; diff --git a/examples/image.rs b/examples/image.rs index 952129f..b7bcad0 100644 --- a/examples/image.rs +++ b/examples/image.rs @@ -8,7 +8,6 @@ use kayak_ui::bevy::{BevyContext, BevyKayakUIPlugin, ImageManager, UICameraBundl use kayak_ui::core::{ render, styles::{Corner, Style, StyleProp, Units}, - Index, }; use kayak_ui::widgets::{App, Image}; diff --git a/examples/nine_patch.rs b/examples/nine_patch.rs index d5c13d4..1b8b5f4 100644 --- a/examples/nine_patch.rs +++ b/examples/nine_patch.rs @@ -7,7 +7,6 @@ use kayak_ui::bevy::{BevyContext, BevyKayakUIPlugin, ImageManager, UICameraBundl use kayak_ui::core::{ render, styles::{Edge, Style, StyleProp, Units}, - Index, }; use kayak_ui::widgets::{App, NinePatch}; diff --git a/examples/provider.rs b/examples/provider.rs index e6bbc13..349b632 100644 --- a/examples/provider.rs +++ b/examples/provider.rs @@ -19,7 +19,7 @@ use kayak_ui::{ core::{ render, rsx, styles::{Edge, LayoutType, Style, StyleProp, Units}, - widget, Bound, Color, EventType, Index, MutableBound, OnEvent, WidgetProps, + widget, Bound, Color, EventType, MutableBound, OnEvent, WidgetProps, }, widgets::{App, Background, Element, If, Text, TooltipConsumer, TooltipProvider, Window}, }; diff --git a/examples/scrollbox.rs b/examples/scrollbox.rs index 42ae8c2..fec1c35 100644 --- a/examples/scrollbox.rs +++ b/examples/scrollbox.rs @@ -7,7 +7,6 @@ use kayak_ui::bevy::{BevyContext, BevyKayakUIPlugin, FontMapping, ImageManager, use kayak_ui::core::{ render, styles::{Edge, Style, StyleProp, Units}, - Index, }; use kayak_ui::widgets::{App, Inspector, NinePatch, ScrollBox, Text}; diff --git a/examples/shrink_grow_layout.rs b/examples/shrink_grow_layout.rs index da59079..1cd1912 100644 --- a/examples/shrink_grow_layout.rs +++ b/examples/shrink_grow_layout.rs @@ -21,7 +21,7 @@ use kayak_ui::{ widgets::Button, }; use kayak_ui::{ - core::{render, rsx, widget, Index}, + core::{render, rsx, widget}, widgets::Background, }; diff --git a/examples/tabs/tabs.rs b/examples/tabs/tabs.rs index f0f81c3..6930af3 100644 --- a/examples/tabs/tabs.rs +++ b/examples/tabs/tabs.rs @@ -15,7 +15,7 @@ use kayak_ui::{ core::{ constructor, render, rsx, styles::{Style, StyleProp, Units}, - widget, Color, Index, + widget, Color, }, widgets::{App, Text, Window}, }; diff --git a/examples/text_box.rs b/examples/text_box.rs index db9adcf..b4081b8 100644 --- a/examples/text_box.rs +++ b/examples/text_box.rs @@ -9,7 +9,7 @@ use kayak_ui::bevy::{BevyContext, BevyKayakUIPlugin, FontMapping, UICameraBundle use kayak_ui::core::{ render, rsx, styles::{Style, StyleProp, Units}, - widget, Index, + widget, }; use kayak_ui::widgets::{App, OnChange, TextBox, Window}; diff --git a/examples/todo/todo.rs b/examples/todo/todo.rs index b17b016..9e0a17a 100644 --- a/examples/todo/todo.rs +++ b/examples/todo/todo.rs @@ -7,7 +7,7 @@ use kayak_ui::bevy::{BevyContext, BevyKayakUIPlugin, FontMapping, UICameraBundle use kayak_ui::core::{ render, rsx, styles::{LayoutType, Style, StyleProp, Units}, - use_state, widget, EventType, Handler, Index, OnEvent, + use_state, widget, EventType, Handler, OnEvent, }; use kayak_ui::widgets::{App, Element, OnChange, TextBox, Window}; diff --git a/examples/vec_widget.rs b/examples/vec_widget.rs index ad39666..f6103c0 100644 --- a/examples/vec_widget.rs +++ b/examples/vec_widget.rs @@ -4,7 +4,7 @@ use bevy::{ DefaultPlugins, }; use kayak_ui::bevy::{BevyContext, BevyKayakUIPlugin, FontMapping, UICameraBundle}; -use kayak_ui::core::{constructor, render, Index, VecTracker}; +use kayak_ui::core::{constructor, render, VecTracker}; use kayak_ui::widgets::{App, Text}; fn startup( diff --git a/examples/windows.rs b/examples/windows.rs index 1caa3f8..fe46f1c 100644 --- a/examples/windows.rs +++ b/examples/windows.rs @@ -4,7 +4,6 @@ use bevy::{ DefaultPlugins, }; use kayak_ui::bevy::{BevyContext, BevyKayakUIPlugin, FontMapping, UICameraBundle}; -use kayak_ui::core::Index; use kayak_ui::core::{render, rsx, widget}; use kayak_ui::widgets::{App, Inspector, Window}; diff --git a/examples/world_interaction.rs b/examples/world_interaction.rs index 98efecb..c6c3e5c 100644 --- a/examples/world_interaction.rs +++ b/examples/world_interaction.rs @@ -20,7 +20,7 @@ use kayak_ui::{ core::{ render, rsx, styles::{Edge, Style, StyleProp, Units}, - use_state, widget, EventType, Index, OnEvent, + use_state, widget, EventType, OnEvent, }, widgets::{App, Button, Text, Window}, }; diff --git a/kayak_render_macros/src/lib.rs b/kayak_render_macros/src/lib.rs index f47a051..a6a9243 100644 --- a/kayak_render_macros/src/lib.rs +++ b/kayak_render_macros/src/lib.rs @@ -36,7 +36,7 @@ pub fn render(input: TokenStream) -> TokenStream { let result = quote! { let mut context = #kayak_core::KayakContextRef::new(context, None); - let parent_id: Option<Index> = None; + let parent_id: Option<#kayak_core::Index> = None; let children: Option<#kayak_core::Children> = None; #widget context.commit(); -- GitLab