From 4d9ac7aae7ee4fe1ca696c937adcc51dea6cd6da Mon Sep 17 00:00:00 2001 From: austin Date: Tue, 13 May 2025 14:33:05 -0400 Subject: [PATCH] rename main inventory window --- .../client/ui/components/EquipmentInventoryPanel.java | 8 ++++---- .../electrosphere/client/ui/components/ItemIconPanel.java | 6 +++--- .../client/ui/components/NaturalInventoryPanel.java | 6 +++--- .../client/ui/components/ToolbarInventoryPanel.java | 6 +++--- .../java/electrosphere/client/ui/menu/WindowUtils.java | 4 ++-- ...layerInventoryWindow.java => InventoryMainWindow.java} | 2 +- .../client/ui/menu/ingame/MenuGeneratorsInventory.java | 2 +- .../controls/categories/ControlCategoryMainGame.java | 4 ++-- 8 files changed, 19 insertions(+), 19 deletions(-) rename src/main/java/electrosphere/client/ui/menu/ingame/{PlayerInventoryWindow.java => InventoryMainWindow.java} (98%) diff --git a/src/main/java/electrosphere/client/ui/components/EquipmentInventoryPanel.java b/src/main/java/electrosphere/client/ui/components/EquipmentInventoryPanel.java index 7ffba097..585337ba 100644 --- a/src/main/java/electrosphere/client/ui/components/EquipmentInventoryPanel.java +++ b/src/main/java/electrosphere/client/ui/components/EquipmentInventoryPanel.java @@ -5,7 +5,7 @@ import java.util.List; import electrosphere.audio.VirtualAudioSourceManager.VirtualAudioSourceType; import electrosphere.client.ui.menu.WindowStrings; import electrosphere.client.ui.menu.WindowUtils; -import electrosphere.client.ui.menu.ingame.PlayerInventoryWindow; +import electrosphere.client.ui.menu.ingame.InventoryMainWindow; import electrosphere.data.creature.equip.EquipPoint; import electrosphere.data.item.Item; import electrosphere.engine.Globals; @@ -70,7 +70,7 @@ public class EquipmentInventoryPanel { //clear item container ui WindowUtils.cleanItemDraggingWindow(); //re-render inventory - WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity)); + WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity)); return false; } return true; @@ -150,7 +150,7 @@ public class EquipmentInventoryPanel { container.removeChild(panel); WindowUtils.pushItemIconToItemWindow(panel); panel.setAbsolutePosition(true); - WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity)); + WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity)); //play sound effect if(Globals.virtualAudioSourceManager != null){ Item itemData = Globals.gameConfigCurrent.getItemMap().getItem(ItemUtils.getType(finalEnt)); @@ -244,7 +244,7 @@ public class EquipmentInventoryPanel { //clear item container ui WindowUtils.cleanItemDraggingWindow(); //rerender inventories - WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity)); + WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity)); return false; }}); } diff --git a/src/main/java/electrosphere/client/ui/components/ItemIconPanel.java b/src/main/java/electrosphere/client/ui/components/ItemIconPanel.java index b7a3efad..c09e796c 100644 --- a/src/main/java/electrosphere/client/ui/components/ItemIconPanel.java +++ b/src/main/java/electrosphere/client/ui/components/ItemIconPanel.java @@ -3,7 +3,7 @@ package electrosphere.client.ui.components; import electrosphere.audio.VirtualAudioSourceManager.VirtualAudioSourceType; import electrosphere.client.ui.menu.WindowStrings; import electrosphere.client.ui.menu.WindowUtils; -import electrosphere.client.ui.menu.ingame.PlayerInventoryWindow; +import electrosphere.client.ui.menu.ingame.InventoryMainWindow; import electrosphere.data.item.Item; import electrosphere.engine.Globals; import electrosphere.engine.assetmanager.AssetDataStrings; @@ -84,7 +84,7 @@ public class ItemIconPanel { panel.setPositionType(YogaPositionType.Absolute); panel.setPositionX(panel.getAbsoluteX()); panel.setPositionY(panel.getAbsoluteY()); - WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity)); + WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity)); //play sound effect if(Globals.virtualAudioSourceManager != null){ Item itemData = Globals.gameConfigCurrent.getItemMap().getItem(ItemUtils.getType(finalEnt)); @@ -194,7 +194,7 @@ public class ItemIconPanel { //clear item container ui WindowUtils.cleanItemDraggingWindow(); //rerender inventories - WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity)); + WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity)); return false; }}); diff --git a/src/main/java/electrosphere/client/ui/components/NaturalInventoryPanel.java b/src/main/java/electrosphere/client/ui/components/NaturalInventoryPanel.java index 93ede7f5..42e351e2 100644 --- a/src/main/java/electrosphere/client/ui/components/NaturalInventoryPanel.java +++ b/src/main/java/electrosphere/client/ui/components/NaturalInventoryPanel.java @@ -3,7 +3,7 @@ package electrosphere.client.ui.components; import electrosphere.audio.VirtualAudioSourceManager.VirtualAudioSourceType; import electrosphere.client.ui.menu.WindowStrings; import electrosphere.client.ui.menu.WindowUtils; -import electrosphere.client.ui.menu.ingame.PlayerInventoryWindow; +import electrosphere.client.ui.menu.ingame.InventoryMainWindow; import electrosphere.data.item.Item; import electrosphere.engine.Globals; import electrosphere.engine.assetmanager.AssetDataStrings; @@ -71,7 +71,7 @@ public class NaturalInventoryPanel { //clear item container ui WindowUtils.cleanItemDraggingWindow(); //re-render inventory - WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity)); + WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity)); } } } @@ -87,7 +87,7 @@ public class NaturalInventoryPanel { //clear ui WindowUtils.cleanItemDraggingWindow(); //re-render inventory - WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity)); + WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity)); return true; }}); diff --git a/src/main/java/electrosphere/client/ui/components/ToolbarInventoryPanel.java b/src/main/java/electrosphere/client/ui/components/ToolbarInventoryPanel.java index 84af6154..600386c0 100644 --- a/src/main/java/electrosphere/client/ui/components/ToolbarInventoryPanel.java +++ b/src/main/java/electrosphere/client/ui/components/ToolbarInventoryPanel.java @@ -5,7 +5,7 @@ import org.joml.Vector4f; import electrosphere.audio.VirtualAudioSourceManager.VirtualAudioSourceType; import electrosphere.client.ui.menu.WindowStrings; import electrosphere.client.ui.menu.WindowUtils; -import electrosphere.client.ui.menu.ingame.PlayerInventoryWindow; +import electrosphere.client.ui.menu.ingame.InventoryMainWindow; import electrosphere.data.item.Item; import electrosphere.engine.Globals; import electrosphere.engine.assetmanager.AssetDataStrings; @@ -82,7 +82,7 @@ public class ToolbarInventoryPanel { //clear item container ui WindowUtils.cleanItemDraggingWindow(); //re-render inventory - WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity)); + WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity)); } } } @@ -98,7 +98,7 @@ public class ToolbarInventoryPanel { //clear ui WindowUtils.cleanItemDraggingWindow(); //re-render inventory - WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity)); + WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity)); return true; }}); diff --git a/src/main/java/electrosphere/client/ui/menu/WindowUtils.java b/src/main/java/electrosphere/client/ui/menu/WindowUtils.java index 3457d1b0..e91f1cb3 100644 --- a/src/main/java/electrosphere/client/ui/menu/WindowUtils.java +++ b/src/main/java/electrosphere/client/ui/menu/WindowUtils.java @@ -4,7 +4,7 @@ import electrosphere.audio.VirtualAudioSourceManager.VirtualAudioSourceType; import electrosphere.client.ui.menu.ingame.CraftingWindow; import electrosphere.client.ui.menu.ingame.InteractionTargetMenu; import electrosphere.client.ui.menu.ingame.MenuGeneratorsInventory; -import electrosphere.client.ui.menu.ingame.PlayerInventoryWindow; +import electrosphere.client.ui.menu.ingame.InventoryMainWindow; import electrosphere.client.ui.menu.mainmenu.MenuGeneratorsTitleMenu; import electrosphere.controls.ControlHandler.ControlsState; import electrosphere.engine.Globals; @@ -195,7 +195,7 @@ public class WindowUtils { if(Globals.RUN_CLIENT && Globals.playerEntity != null){ if(Globals.elementService.containsWindow(WindowStrings.WINDOW_CHARACTER)){ //redraw if necessary - WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity)); + WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity)); } } } diff --git a/src/main/java/electrosphere/client/ui/menu/ingame/PlayerInventoryWindow.java b/src/main/java/electrosphere/client/ui/menu/ingame/InventoryMainWindow.java similarity index 98% rename from src/main/java/electrosphere/client/ui/menu/ingame/PlayerInventoryWindow.java rename to src/main/java/electrosphere/client/ui/menu/ingame/InventoryMainWindow.java index 21cb3358..bf58c71a 100644 --- a/src/main/java/electrosphere/client/ui/menu/ingame/PlayerInventoryWindow.java +++ b/src/main/java/electrosphere/client/ui/menu/ingame/InventoryMainWindow.java @@ -22,7 +22,7 @@ import electrosphere.renderer.ui.events.NavigationEvent; /** * The player's inventory */ -public class PlayerInventoryWindow { +public class InventoryMainWindow { /** * Minimum width of the component diff --git a/src/main/java/electrosphere/client/ui/menu/ingame/MenuGeneratorsInventory.java b/src/main/java/electrosphere/client/ui/menu/ingame/MenuGeneratorsInventory.java index 39a0bc1b..f7429141 100644 --- a/src/main/java/electrosphere/client/ui/menu/ingame/MenuGeneratorsInventory.java +++ b/src/main/java/electrosphere/client/ui/menu/ingame/MenuGeneratorsInventory.java @@ -38,7 +38,7 @@ public class MenuGeneratorsInventory { //clear ui WindowUtils.cleanItemDraggingWindow(); //re-render inventory - WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity)); + WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity)); //null globals Globals.dragSourceInventory = null; Globals.draggedItem = null; diff --git a/src/main/java/electrosphere/controls/categories/ControlCategoryMainGame.java b/src/main/java/electrosphere/controls/categories/ControlCategoryMainGame.java index eff723a7..b1fce3f7 100644 --- a/src/main/java/electrosphere/controls/categories/ControlCategoryMainGame.java +++ b/src/main/java/electrosphere/controls/categories/ControlCategoryMainGame.java @@ -15,7 +15,7 @@ import electrosphere.client.ui.menu.WindowStrings; import electrosphere.client.ui.menu.WindowUtils; import electrosphere.client.ui.menu.ingame.CraftingWindow; import electrosphere.client.ui.menu.ingame.MenuGeneratorsInGame; -import electrosphere.client.ui.menu.ingame.PlayerInventoryWindow; +import electrosphere.client.ui.menu.ingame.InventoryMainWindow; import electrosphere.controls.Control; import electrosphere.controls.Control.ControlMethod; import electrosphere.controls.Control.ControlType; @@ -717,7 +717,7 @@ public class ControlCategoryMainGame { controlMap.get(INPUT_CODE_INVENTORY_OPEN).setOnClick(new ControlMethod(){public void execute(MouseState mouseState){ if(Globals.elementService.getWindow(WindowStrings.WINDOW_CHARACTER) == null){ //create window - Window mainMenuWindow = PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity); + Window mainMenuWindow = InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity); //register Globals.elementService.registerWindow(WindowStrings.WINDOW_CHARACTER, mainMenuWindow); //make visible