Repository navigation
Inventory UI
First see: UI
Inventory UI utilises libgdx's Scene2D class to render the relevant UI elements such as image buttons.
-
InventoryDisplay.Java- Constructs the visual grid of boxes and text on the screen using libGDX Scene2D UI widgets to create the players inventory. -
InventoryActions.Java- Receives the nextPage UI event and asks InventoryDisplay to change pages. It does not yet implement inventory mutations. -
InventoryComponent.Java- Stores the players true inventory
All UI skins were used by being added to InventoryUI.atlas, InventoryUI.json, and InventoryUI.png files found in source/core/assets/flat-earth/skin. This is because InventoryUI.json gets loaded as a Skin object which allows libGDX Scene2D UI widgets to use it as a skin/texture.
The change page arrow has a listener attached which when pressed triggers an event for InventoryActions to call for the change page method found in InventoryDisplay.
In checked remote items 9eb2186, this book is page/grid scaffolding and does not yet render the real consumable quantities or implement consumable use/drop actions. Team 5's separate top-right HUD does display the real stock. Full-book UI remains Team 4's responsibility.
Use the existing InventoryComponent: getConsumableCount, hasConsumable, getGold and consumableInventoryChanged. Do not create duplicate storage or assume a goldChanged event. Future use actions should request ConsumableEffectComponent.tryUse/useConsumable and must not debit inventory separately. See Team 5 contracts. This is an interface handoff, not a claim that the book integration is completed.