Player HUD Item Dictionary - UQcsse3200/2026-studio-2 GitHub Wiki
Part of the Player HUD. This page covers the UI; the data and discovery rules are in Item Dictionary.
Pressing I toggles a full-screen overlay listing every ItemType. Items the player has picked up show their icon and stats; undiscovered items show a ?.


classDiagram
class UIComponent {
<<abstract>>
}
class ItemDictionaryDisplay {
-DictionaryPage currentPage
-ItemType selectedItem
-boolean visible
+showDictionary()
+hideDictionary()
+toggleDictionary()
+isDictionaryVisible() boolean
}
class DictionaryPage {
<<enum>>
GRID
DETAILS
}
class ItemDictionaryComponent {
+isDiscovered(ItemType) boolean
}
class InventorySlotStyle
UIComponent <|-- ItemDictionaryDisplay
ItemDictionaryDisplay --> DictionaryPage
ItemDictionaryDisplay --> ItemDictionaryComponent : reads discovered items
ItemDictionaryDisplay ..> InventorySlotStyle : styles slots
ItemDictionaryComponent ..> ItemDictionaryDisplay : "itemDictionaryChanged" event
ItemDictionaryDisplay has two pages, switched by the DictionaryPage enum:
-
Grid page: a title and a 5-column grid of 110x110px slots, one per
ItemType. Discovered items show their icon; undiscovered items show a?and cannot be clicked. -
Details page: opened by clicking a discovered slot. Shows the icon, name and description, plus only the stats that apply to that item (damage, range, cooldown, heal amount, burn damage/time, slow speed/time, speed boost, duration, poison damage/duration). A
< Backlabel returns to the grid.
Events:
| Event | Effect |
|---|---|
itemDictionaryChanged |
Refresh the current page (an item was discovered) |
backpackOpened |
Hide the dictionary so the two overlays do not stack |
dictionaryOpened / dictionaryClosed
|
Fired by the display on show/hide; the hotbar hides and shows in response |
An item is discovered the first time it is picked up (ItemDictionaryComponent listens for itemPickedUp events). Reopening the dictionary always starts on the grid page.
| Method | Purpose |
|---|---|
showDictionary() |
Open the overlay on the grid page |
hideDictionary() |
Close the overlay |
toggleDictionary() |
What the I key calls |
isDictionaryVisible() |
Whether the overlay is showing |
In ItemDictionaryDisplay:
| Constant | Value | Purpose |
|---|---|---|
GRID_COLUMNS |
5 | Columns in the grid page |
| Slot size | 110x110px | Size of each grid slot |
- Automated:
ItemDictionaryDisplayTest(core/src/test/.../components/itemdictionary/): potion statistics are shown, and locked items stay hidden. - Manual: Item Dictionary section of the Player HUD Test Plan (ID-1 to ID-7).
- Back to the Player HUD hub
- Player HUD Test Plan
- Item Dictionary (data and discovery)