diff --git a/gavania-core/src/game/game.rs b/gavania-core/src/game/game.rs index 28bfc3e..223e0fb 100644 --- a/gavania-core/src/game/game.rs +++ b/gavania-core/src/game/game.rs @@ -102,10 +102,6 @@ impl GameHandle { } impl ToolTipBuilder for GameHandle { - fn asset_path(&self, s: &str) -> AssetPath { - self.build_data_path(s) - } - fn gui_handler(&self) -> Arc { self.upgrade().engine().gui_handler().clone() } diff --git a/rpg_components/resources/addon_snippet.xml b/rpg_components/resources/addon_snippet.xml new file mode 100644 index 0000000..56146ac --- /dev/null +++ b/rpg_components/resources/addon_snippet.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/rpg_components/resources/book_snippet.xml b/rpg_components/resources/book_snippet.xml new file mode 100644 index 0000000..b0c2639 --- /dev/null +++ b/rpg_components/resources/book_snippet.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/rpg_components/resources/item_socket_snippet.xml b/rpg_components/resources/item_socket_snippet.xml new file mode 100644 index 0000000..c69d1ee --- /dev/null +++ b/rpg_components/resources/item_socket_snippet.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/rpg_components/resources/items/slots_0.xml b/rpg_components/resources/items/slots_0.xml new file mode 100644 index 0000000..7d39d1a --- /dev/null +++ b/rpg_components/resources/items/slots_0.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/rpg_components/resources/items/slots_1.xml b/rpg_components/resources/items/slots_1.xml new file mode 100644 index 0000000..c759ec4 --- /dev/null +++ b/rpg_components/resources/items/slots_1.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/rpg_components/resources/items/slots_2.xml b/rpg_components/resources/items/slots_2.xml new file mode 100644 index 0000000..7104cc3 --- /dev/null +++ b/rpg_components/resources/items/slots_2.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/rpg_components/resources/items/slots_3.xml b/rpg_components/resources/items/slots_3.xml new file mode 100644 index 0000000..aec7c8c --- /dev/null +++ b/rpg_components/resources/items/slots_3.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/rpg_components/resources/items/slots_4.xml b/rpg_components/resources/items/slots_4.xml new file mode 100644 index 0000000..af7f5ce --- /dev/null +++ b/rpg_components/resources/items/slots_4.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/rpg_components/resources/items/slots_5.xml b/rpg_components/resources/items/slots_5.xml new file mode 100644 index 0000000..e085540 --- /dev/null +++ b/rpg_components/resources/items/slots_5.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/rpg_components/resources/items/slots_6.xml b/rpg_components/resources/items/slots_6.xml new file mode 100644 index 0000000..e2e4052 --- /dev/null +++ b/rpg_components/resources/items/slots_6.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/rpg_components/resources/items/slots_7.xml b/rpg_components/resources/items/slots_7.xml new file mode 100644 index 0000000..5bc72ef --- /dev/null +++ b/rpg_components/resources/items/slots_7.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/rpg_components/resources/jewel_tooltip.xml b/rpg_components/resources/jewel_tooltip.xml new file mode 100644 index 0000000..aad306e --- /dev/null +++ b/rpg_components/resources/jewel_tooltip.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/rpg_components/resources/stat_type_snippet.xml b/rpg_components/resources/stat_type_snippet.xml new file mode 100644 index 0000000..defc969 --- /dev/null +++ b/rpg_components/resources/stat_type_snippet.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/rpg_components/src/items/ability_addon.rs b/rpg_components/src/items/ability_addon.rs index 9eb29b5..351cd81 100644 --- a/rpg_components/src/items/ability_addon.rs +++ b/rpg_components/src/items/ability_addon.rs @@ -277,9 +277,9 @@ impl AbilityAddon { tooltip_builder: &impl ToolTipBuilder, position: (i32, i32), ) -> Result { - let gui = GuiBuilder::new( + let gui = GuiBuilder::from_str( &tooltip_builder.gui_handler(), - &tooltip_builder.asset_path("gui/xml/ingame/loot/addon_snippet.xml"), + include_str!("../../resources/addon_snippet.xml"), )?; let icon: Arc = gui.element("addon_icon")?; diff --git a/rpg_components/src/items/ability_book.rs b/rpg_components/src/items/ability_book.rs index 8d26f7a..fd4723b 100644 --- a/rpg_components/src/items/ability_book.rs +++ b/rpg_components/src/items/ability_book.rs @@ -286,9 +286,9 @@ impl AbilityBook { statistics: &Statistics, position: (i32, i32), ) -> Result { - let gui = GuiBuilder::new( + let gui = GuiBuilder::from_str( &tooltip_builder.gui_handler(), - &tooltip_builder.asset_path("gui/xml/ingame/loot/book_snippet.xml"), + include_str!("../../resources/book_snippet.xml"), )?; let ability_name: Arc