Inventory System #7

Open
opened 2026-09-14 13:49:27 +02:00 by Dolobarsch · 0 comments
Owner

Inventory UI — Git Task

Goal

Implement the basic Inventory UI widget architecture defined below.

Required Widgets

  1. WBP_Item
  2. WBP_ItemList
  3. WBP_InventoryGrid
  4. WBP_Equipment
  5. WBP_EquipmentSlot
  6. WBP_QuickSlotList
  7. WBP_EquipmentInventoryTAB
  8. WBP_InventoryContainerList

Important Item UI Rule

An item is always represented as 2×2 in the UI.

This applies everywhere an item is displayed:

  • WBP_ItemList
  • WBP_InventoryGrid
  • WBP_EquipmentSlot
  • WBP_QuickSlotList
  • WBP_InventoryContainerList

The item's physical size, mass, and volume must not change its UI representation size.

Do not implement variable-size UI items.

The 2×2 representation is purely a UI convention. It does not mean the inventory uses a 2×2 physical/grid storage system.

Widget Responsibilities

WBP_Item

Displays one item.

  • Always uses the 2×2 item representation
  • Item icon
  • Item name
  • Quantity
  • Basic item state
  • Receives item data from outside
  • Does not directly modify the inventory

WBP_ItemList

Simple reusable list for displaying items.

  • Contains multiple WBP_Item
  • Each item is represented as 2×2
  • No container UI
  • No equipment UI
  • No quick-access UI
  • Intended for systems that only need an item list

WBP_InventoryGrid

Displays inventory contents as a UI grid.

  • Uses WBP_Item
  • Every item is represented as 2×2
  • Grid is only a visual layout
  • Do not implement Tetris/grid-based physical storage
  • Uses the existing inventory data

WBP_Equipment

Displays the character's equipment.

  • Contains multiple WBP_EquipmentSlot
  • Two primary back slots
  • Two primary belt slots
  • Displays equipped items
  • Does not implement inventory rules

WBP_EquipmentSlot

Represents one equipment slot.

  • Displays the item currently equipped in the slot

  • Uses the standard 2×2 item representation

  • Can represent different equipment positions such as:

    • Head
    • Body
    • Hands
    • Legs
    • Feet
    • Back
    • Belt
  • Slot itself does not decide whether an item can be equipped

  • Equipment validation belongs to the inventory/equipment system

WBP_QuickSlotList

Displays available quick-access slots.

  • Big quick-access slots
  • Small quick-access slots
  • Includes quick-access slots provided by equipment such as backpacks
  • Items use the standard 2×2 representation
  • Does not implement inventory rules

WBP_InventoryContainerList

Displays a container and its contents.

WBP_InventoryContainerList
├── Container Label
└── Collapsible Inventory Grid
    └── WBP_InventoryGrid
        └── WBP_Item
  • Shows the container name/label
  • Inventory grid can be collapsed/expanded
  • Items use the standard 2×2 representation
  • Uses the container's existing inventory data
  • Does not implement inventory rules

WBP_EquipmentInventoryTAB

Main inventory screen.

WBP_EquipmentInventoryTAB
├── WBP_Equipment
│   └── WBP_EquipmentSlot
├── WBP_QuickSlotList
└── Inventory View
    ├── WBP_ItemList
    └── WBP_InventoryGrid

Responsibilities:

  • Open/close inventory UI
  • Coordinate the child widgets
  • Provide the relevant inventory/container data
  • Switch between WBP_ItemList and WBP_InventoryGrid where appropriate
  • Does not contain inventory logic

Architecture Rules

  • UI displays data and requests actions.
  • Inventory systems own inventory logic.
  • Widgets must not directly manipulate inventory data.
  • Do not create a separate inventory implementation for each widget.
  • Reuse the existing inventory/container/item systems.
  • Keep the architecture shallow.
  • Avoid unnecessary abstractions.
  • No attachment-point hierarchy.
  • No physical grid/Tetris inventory system.
  • Item UI representation is always 2×2.
  • Physical item size is represented through inventory properties such as mass and volume, not UI dimensions.
  • WBP_EquipmentSlot is a visual slot, not an equipment validation system.

Expected Result

The eight widgets exist, have the correct basic hierarchy, and can receive/display the appropriate inventory, item, equipment, and quick-access data.

Keep the implementation minimal. Do not add systems that are not required by this task.

# Inventory UI — Git Task ## Goal Implement the basic Inventory UI widget architecture defined below. ## Required Widgets 1. `WBP_Item` 2. `WBP_ItemList` 3. `WBP_InventoryGrid` 4. `WBP_Equipment` 5. `WBP_EquipmentSlot` 6. `WBP_QuickSlotList` 7. `WBP_EquipmentInventoryTAB` 8. `WBP_InventoryContainerList` ## Important Item UI Rule An item is **always represented as 2×2** in the UI. This applies everywhere an item is displayed: * `WBP_ItemList` * `WBP_InventoryGrid` * `WBP_EquipmentSlot` * `WBP_QuickSlotList` * `WBP_InventoryContainerList` The item's physical size, mass, and volume **must not change its UI representation size**. **Do not implement variable-size UI items.** The 2×2 representation is purely a UI convention. It does **not** mean the inventory uses a 2×2 physical/grid storage system. ## Widget Responsibilities ### `WBP_Item` Displays one item. * Always uses the 2×2 item representation * Item icon * Item name * Quantity * Basic item state * Receives item data from outside * Does not directly modify the inventory ### `WBP_ItemList` Simple reusable list for displaying items. * Contains multiple `WBP_Item` * Each item is represented as 2×2 * No container UI * No equipment UI * No quick-access UI * Intended for systems that only need an item list ### `WBP_InventoryGrid` Displays inventory contents as a UI grid. * Uses `WBP_Item` * Every item is represented as 2×2 * Grid is only a visual layout * **Do not implement Tetris/grid-based physical storage** * Uses the existing inventory data ### `WBP_Equipment` Displays the character's equipment. * Contains multiple `WBP_EquipmentSlot` * Two primary back slots * Two primary belt slots * Displays equipped items * Does not implement inventory rules ### `WBP_EquipmentSlot` Represents one equipment slot. * Displays the item currently equipped in the slot * Uses the standard 2×2 item representation * Can represent different equipment positions such as: * Head * Body * Hands * Legs * Feet * Back * Belt * Slot itself does not decide whether an item can be equipped * Equipment validation belongs to the inventory/equipment system ### `WBP_QuickSlotList` Displays available quick-access slots. * Big quick-access slots * Small quick-access slots * Includes quick-access slots provided by equipment such as backpacks * Items use the standard 2×2 representation * Does not implement inventory rules ### `WBP_InventoryContainerList` Displays a container and its contents. ```text WBP_InventoryContainerList ├── Container Label └── Collapsible Inventory Grid └── WBP_InventoryGrid └── WBP_Item ``` * Shows the container name/label * Inventory grid can be collapsed/expanded * Items use the standard 2×2 representation * Uses the container's existing inventory data * Does not implement inventory rules ### `WBP_EquipmentInventoryTAB` Main inventory screen. ```text WBP_EquipmentInventoryTAB ├── WBP_Equipment │ └── WBP_EquipmentSlot ├── WBP_QuickSlotList └── Inventory View ├── WBP_ItemList └── WBP_InventoryGrid ``` Responsibilities: * Open/close inventory UI * Coordinate the child widgets * Provide the relevant inventory/container data * Switch between `WBP_ItemList` and `WBP_InventoryGrid` where appropriate * Does not contain inventory logic ## Architecture Rules * UI displays data and requests actions. * Inventory systems own inventory logic. * Widgets must not directly manipulate inventory data. * Do not create a separate inventory implementation for each widget. * Reuse the existing inventory/container/item systems. * Keep the architecture shallow. * Avoid unnecessary abstractions. * No attachment-point hierarchy. * No physical grid/Tetris inventory system. * Item UI representation is always 2×2. * Physical item size is represented through inventory properties such as mass and volume, **not UI dimensions**. * `WBP_EquipmentSlot` is a visual slot, not an equipment validation system. ## Expected Result The eight widgets exist, have the correct basic hierarchy, and can receive/display the appropriate inventory, item, equipment, and quick-access data. Keep the implementation minimal. Do not add systems that are not required by this task.
Dolobarsch self-assigned this 2026-09-14 14:53:01 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Dolobarsch/KingshearthLegacy#7