Conversation
Added a button at the top of the inventory that opens an expanded window which lists all of the quality groups for the items in your inventory.
|
clicking items out of the quality list doesnt correctly put the top q item on the cursor and likewise the onhover doesnt show the top q item as expected from other client implementations. the ability to interact with the extInventory for lowest quality seems completely absent (think its on right click) and somehow you've managed to port this over and make it longer than the original https://github.com/EnderWiggin/hafen-client/blob/master/src/haven/ExtInventory.java |
Thank you for your feedback, those first two points are fair. In regards to the length, fair enough. A lot of the extra code came from Hurricane-specific stack handling and retry logic for unresolved stack children so grouped transfers behave reliably. But you're right, a cleanup pass would be worthwhile once I finish the row click/hover behavior, mostly to reduce duped helper logic and separate some of the transfer logic from the UI code. |
Summary
This draft PR adds a quality list to the inventory UI.
The main goal of this change is to make it easier to interact with inventory items by quality. The inventory now has a toggleable quality list panel that groups matching items together and supports quality row-based actions.
Included changes
ExtInventoryto provide the quality list panelStack and transfer handling
A large part of this work was making grouped transfers behave correctly with stacked items.
This includes:
To address that, this version includes stack-aware transfer handling and retry logic for cases where stack children are not fully resolved on the first pass.
Changes to existing files
src/haven/GameUI.javaThis change replaces the direct inventory window attachment with an
ExtInventorywrapper. That allows the quality list panel to live alongside the inventory while still treating the inventory window as the main interaction point. It also adds amaininvextreference so the window controls can toggle the panel.src/haven/Window.javaThis change adds the quality list toggle button to the inventory top bar and updates the existing inventory-window button handling so Stack All / Unstack All continue to work when the inventory is wrapped by
ExtInventory. It also adjusts button anchoring so the controls remain aligned when the panel expands.src/haven/GItem.javaThis change invalidates cached item quality / tooltip-derived state when item resource, tooltip, or contents data changes. Without this, the quality list could hold onto stale or incomplete item quality data, particularly in stacked-item cases.
Additional changes
Notes
This is mainly being opened as a draft because the current quality list button art is temporary.
The feature itself is working, but the button graphics should still be replaced with art that better matches the style of the existing inventory top-bar controls before this is treated as final.
Testing performed
Remaining polish