rename main inventory window
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2025-05-13 14:33:05 -04:00
parent e734ce368b
commit 4d9ac7aae7
8 changed files with 19 additions and 19 deletions

View File

@ -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;
}});
}

View File

@ -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;
}});

View File

@ -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;
}});

View File

@ -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;
}});

View File

@ -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));
}
}
}

View File

@ -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

View File

@ -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;

View File

@ -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