Building the item tab — now potions can be used and discarded
Moved the inventory mockup (162) into the menu's item tab, replacing the small inventory window that couldn't be opened since 172. I also built potion use and discarding with a confirmation popup, but HP never drops in the village yet, so there's no real use for it.
Ever since I handed the I key over to the menu in 172, the small inventory window at the top right wouldn't open. In the meantime, the only way to see what you had was to go into the shop's sell tab, and there was no way to use or discard items at all. This time I took inventory mockup #1 (full menu style) that I'd picked in 162, moved it into the menu's item tab to replace the small window, and added using and discarding.
Screens I built
For the screenshot I temporarily added items so eight kinds show up like in the mockup. A real new game still starts with 10 health potions, 10 iron ore and 1 starter sword.
In the middle there's "Belongings" with the slot count (8 / 16 slots), the categories (All, Consumables, Materials, Weapons) and an 8-row list. If it overflows, you scroll with the wheel or ↑↓. The description box below gets a line like "Sells for 50 G · Stacks up to 99."
On the right, the first line of ITEM INFO and EFFECT depends on the item type. Consumables show HP/MP recovery, weapons show attack and "Equip = weapon slot," and materials show "Use = not possible." The other lines are buy price, sell price, stacking and max. If an item can't be sold it says "Not possible," and if there's no buy price it shows "—."
At the bottom right are the count after use (10 → 9), a one-line result message, and the Discard and F Use buttons. The Use button only lights up for consumables. Controls: ↑↓ for the list, ←→ for categories, F to use, and the wheel to scroll the list.
One consumable fills Karin's HP/MP, and anything over the max is wasted. Using a greater health potion (300) at 50 HP brings Karin to 120 and shows "Used Greater Health Potion on Karin. HP +70." The potions go from 2 to 1.
If Karin is already at full HP, it doesn't use anything and tells you "HP is already full." Pressing F again in that state doesn't change the count. Weapons say "Equip weapons from the equipment tab," and materials say "This item can't be used."
As decided in 162, discarding goes through a confirmation popup once and then removes 1 item. F or Discard confirms, Esc or Cancel closes it. I tried Discard → Esc → Discard again → F on iron ore, and "Discarded 1 Iron Ore." showed up correctly.
Things I thought about
- Categories on ←→. The mockup's key guide said "Q E Category," but Q/E are already used for switching menu tabs (172). So I moved categories to ←→ and changed the key guide to "◀▶ Category."
- Esc closes the popup first. It'd be a pain if pressing Esc to close the confirmation popup closed the whole menu too. I gave the menu Esc priority handling, so if a popup is open, only the popup closes and the menu stays.
- Keeping the old inventory window for now. The item tooltip the shop uses lives in that same window. I decided to clean it all up in step 7, together with removing the tooltip (decided in 165).
Rabbit hole: text showing through behind the popup
When I opened the discard confirmation popup, the list text behind it showed right through. I put an opaque backing behind the popup to cover it.
Next up
- HP/MP never drops in the village, so in actual play you only ever see "already full." Connect combat results to HP
- Save current HP/MP
- Pick who to use items on once the party grows (right now it's always the first party member)


