rename main inventory window
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
This commit is contained in:
parent
e734ce368b
commit
4d9ac7aae7
@ -5,7 +5,7 @@ import java.util.List;
|
|||||||
import electrosphere.audio.VirtualAudioSourceManager.VirtualAudioSourceType;
|
import electrosphere.audio.VirtualAudioSourceManager.VirtualAudioSourceType;
|
||||||
import electrosphere.client.ui.menu.WindowStrings;
|
import electrosphere.client.ui.menu.WindowStrings;
|
||||||
import electrosphere.client.ui.menu.WindowUtils;
|
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.creature.equip.EquipPoint;
|
||||||
import electrosphere.data.item.Item;
|
import electrosphere.data.item.Item;
|
||||||
import electrosphere.engine.Globals;
|
import electrosphere.engine.Globals;
|
||||||
@ -70,7 +70,7 @@ public class EquipmentInventoryPanel {
|
|||||||
//clear item container ui
|
//clear item container ui
|
||||||
WindowUtils.cleanItemDraggingWindow();
|
WindowUtils.cleanItemDraggingWindow();
|
||||||
//re-render inventory
|
//re-render inventory
|
||||||
WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity));
|
WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -150,7 +150,7 @@ public class EquipmentInventoryPanel {
|
|||||||
container.removeChild(panel);
|
container.removeChild(panel);
|
||||||
WindowUtils.pushItemIconToItemWindow(panel);
|
WindowUtils.pushItemIconToItemWindow(panel);
|
||||||
panel.setAbsolutePosition(true);
|
panel.setAbsolutePosition(true);
|
||||||
WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity));
|
WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity));
|
||||||
//play sound effect
|
//play sound effect
|
||||||
if(Globals.virtualAudioSourceManager != null){
|
if(Globals.virtualAudioSourceManager != null){
|
||||||
Item itemData = Globals.gameConfigCurrent.getItemMap().getItem(ItemUtils.getType(finalEnt));
|
Item itemData = Globals.gameConfigCurrent.getItemMap().getItem(ItemUtils.getType(finalEnt));
|
||||||
@ -244,7 +244,7 @@ public class EquipmentInventoryPanel {
|
|||||||
//clear item container ui
|
//clear item container ui
|
||||||
WindowUtils.cleanItemDraggingWindow();
|
WindowUtils.cleanItemDraggingWindow();
|
||||||
//rerender inventories
|
//rerender inventories
|
||||||
WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity));
|
WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity));
|
||||||
return false;
|
return false;
|
||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package electrosphere.client.ui.components;
|
|||||||
import electrosphere.audio.VirtualAudioSourceManager.VirtualAudioSourceType;
|
import electrosphere.audio.VirtualAudioSourceManager.VirtualAudioSourceType;
|
||||||
import electrosphere.client.ui.menu.WindowStrings;
|
import electrosphere.client.ui.menu.WindowStrings;
|
||||||
import electrosphere.client.ui.menu.WindowUtils;
|
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.data.item.Item;
|
||||||
import electrosphere.engine.Globals;
|
import electrosphere.engine.Globals;
|
||||||
import electrosphere.engine.assetmanager.AssetDataStrings;
|
import electrosphere.engine.assetmanager.AssetDataStrings;
|
||||||
@ -84,7 +84,7 @@ public class ItemIconPanel {
|
|||||||
panel.setPositionType(YogaPositionType.Absolute);
|
panel.setPositionType(YogaPositionType.Absolute);
|
||||||
panel.setPositionX(panel.getAbsoluteX());
|
panel.setPositionX(panel.getAbsoluteX());
|
||||||
panel.setPositionY(panel.getAbsoluteY());
|
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
|
//play sound effect
|
||||||
if(Globals.virtualAudioSourceManager != null){
|
if(Globals.virtualAudioSourceManager != null){
|
||||||
Item itemData = Globals.gameConfigCurrent.getItemMap().getItem(ItemUtils.getType(finalEnt));
|
Item itemData = Globals.gameConfigCurrent.getItemMap().getItem(ItemUtils.getType(finalEnt));
|
||||||
@ -194,7 +194,7 @@ public class ItemIconPanel {
|
|||||||
//clear item container ui
|
//clear item container ui
|
||||||
WindowUtils.cleanItemDraggingWindow();
|
WindowUtils.cleanItemDraggingWindow();
|
||||||
//rerender inventories
|
//rerender inventories
|
||||||
WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity));
|
WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity));
|
||||||
return false;
|
return false;
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package electrosphere.client.ui.components;
|
|||||||
import electrosphere.audio.VirtualAudioSourceManager.VirtualAudioSourceType;
|
import electrosphere.audio.VirtualAudioSourceManager.VirtualAudioSourceType;
|
||||||
import electrosphere.client.ui.menu.WindowStrings;
|
import electrosphere.client.ui.menu.WindowStrings;
|
||||||
import electrosphere.client.ui.menu.WindowUtils;
|
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.data.item.Item;
|
||||||
import electrosphere.engine.Globals;
|
import electrosphere.engine.Globals;
|
||||||
import electrosphere.engine.assetmanager.AssetDataStrings;
|
import electrosphere.engine.assetmanager.AssetDataStrings;
|
||||||
@ -71,7 +71,7 @@ public class NaturalInventoryPanel {
|
|||||||
//clear item container ui
|
//clear item container ui
|
||||||
WindowUtils.cleanItemDraggingWindow();
|
WindowUtils.cleanItemDraggingWindow();
|
||||||
//re-render inventory
|
//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
|
//clear ui
|
||||||
WindowUtils.cleanItemDraggingWindow();
|
WindowUtils.cleanItemDraggingWindow();
|
||||||
//re-render inventory
|
//re-render inventory
|
||||||
WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity));
|
WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity));
|
||||||
return true;
|
return true;
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import org.joml.Vector4f;
|
|||||||
import electrosphere.audio.VirtualAudioSourceManager.VirtualAudioSourceType;
|
import electrosphere.audio.VirtualAudioSourceManager.VirtualAudioSourceType;
|
||||||
import electrosphere.client.ui.menu.WindowStrings;
|
import electrosphere.client.ui.menu.WindowStrings;
|
||||||
import electrosphere.client.ui.menu.WindowUtils;
|
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.data.item.Item;
|
||||||
import electrosphere.engine.Globals;
|
import electrosphere.engine.Globals;
|
||||||
import electrosphere.engine.assetmanager.AssetDataStrings;
|
import electrosphere.engine.assetmanager.AssetDataStrings;
|
||||||
@ -82,7 +82,7 @@ public class ToolbarInventoryPanel {
|
|||||||
//clear item container ui
|
//clear item container ui
|
||||||
WindowUtils.cleanItemDraggingWindow();
|
WindowUtils.cleanItemDraggingWindow();
|
||||||
//re-render inventory
|
//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
|
//clear ui
|
||||||
WindowUtils.cleanItemDraggingWindow();
|
WindowUtils.cleanItemDraggingWindow();
|
||||||
//re-render inventory
|
//re-render inventory
|
||||||
WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity));
|
WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity));
|
||||||
return true;
|
return true;
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import electrosphere.audio.VirtualAudioSourceManager.VirtualAudioSourceType;
|
|||||||
import electrosphere.client.ui.menu.ingame.CraftingWindow;
|
import electrosphere.client.ui.menu.ingame.CraftingWindow;
|
||||||
import electrosphere.client.ui.menu.ingame.InteractionTargetMenu;
|
import electrosphere.client.ui.menu.ingame.InteractionTargetMenu;
|
||||||
import electrosphere.client.ui.menu.ingame.MenuGeneratorsInventory;
|
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.client.ui.menu.mainmenu.MenuGeneratorsTitleMenu;
|
||||||
import electrosphere.controls.ControlHandler.ControlsState;
|
import electrosphere.controls.ControlHandler.ControlsState;
|
||||||
import electrosphere.engine.Globals;
|
import electrosphere.engine.Globals;
|
||||||
@ -195,7 +195,7 @@ public class WindowUtils {
|
|||||||
if(Globals.RUN_CLIENT && Globals.playerEntity != null){
|
if(Globals.RUN_CLIENT && Globals.playerEntity != null){
|
||||||
if(Globals.elementService.containsWindow(WindowStrings.WINDOW_CHARACTER)){
|
if(Globals.elementService.containsWindow(WindowStrings.WINDOW_CHARACTER)){
|
||||||
//redraw if necessary
|
//redraw if necessary
|
||||||
WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity));
|
WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@ import electrosphere.renderer.ui.events.NavigationEvent;
|
|||||||
/**
|
/**
|
||||||
* The player's inventory
|
* The player's inventory
|
||||||
*/
|
*/
|
||||||
public class PlayerInventoryWindow {
|
public class InventoryMainWindow {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Minimum width of the component
|
* Minimum width of the component
|
||||||
@ -38,7 +38,7 @@ public class MenuGeneratorsInventory {
|
|||||||
//clear ui
|
//clear ui
|
||||||
WindowUtils.cleanItemDraggingWindow();
|
WindowUtils.cleanItemDraggingWindow();
|
||||||
//re-render inventory
|
//re-render inventory
|
||||||
WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity));
|
WindowUtils.replaceWindow(WindowStrings.WINDOW_CHARACTER, InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity));
|
||||||
//null globals
|
//null globals
|
||||||
Globals.dragSourceInventory = null;
|
Globals.dragSourceInventory = null;
|
||||||
Globals.draggedItem = null;
|
Globals.draggedItem = null;
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import electrosphere.client.ui.menu.WindowStrings;
|
|||||||
import electrosphere.client.ui.menu.WindowUtils;
|
import electrosphere.client.ui.menu.WindowUtils;
|
||||||
import electrosphere.client.ui.menu.ingame.CraftingWindow;
|
import electrosphere.client.ui.menu.ingame.CraftingWindow;
|
||||||
import electrosphere.client.ui.menu.ingame.MenuGeneratorsInGame;
|
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;
|
||||||
import electrosphere.controls.Control.ControlMethod;
|
import electrosphere.controls.Control.ControlMethod;
|
||||||
import electrosphere.controls.Control.ControlType;
|
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){
|
controlMap.get(INPUT_CODE_INVENTORY_OPEN).setOnClick(new ControlMethod(){public void execute(MouseState mouseState){
|
||||||
if(Globals.elementService.getWindow(WindowStrings.WINDOW_CHARACTER) == null){
|
if(Globals.elementService.getWindow(WindowStrings.WINDOW_CHARACTER) == null){
|
||||||
//create window
|
//create window
|
||||||
Window mainMenuWindow = PlayerInventoryWindow.createPlayerInventoryWindow(Globals.playerEntity);
|
Window mainMenuWindow = InventoryMainWindow.createPlayerInventoryWindow(Globals.playerEntity);
|
||||||
//register
|
//register
|
||||||
Globals.elementService.registerWindow(WindowStrings.WINDOW_CHARACTER, mainMenuWindow);
|
Globals.elementService.registerWindow(WindowStrings.WINDOW_CHARACTER, mainMenuWindow);
|
||||||
//make visible
|
//make visible
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user