Commit Graph

4 Commits

Author SHA1 Message Date
calic
ae394ec89f feat(inventory-list-display): icon_atlas override + fit-to-bounds rendering
Two consumer-side fixes for ADR-0054 §3 (Item-Visual-Identity).

1) default_icon_resolver tries icon_atlas + icon_uv.* first; falls
   back to sprite_atlas + sprite_uv.* when the override is absent.
   Items inherit their world-render sprite as the UI icon for free
   (TC_Basics-style object sprites work directly as icons); dedicated
   low-res UI-icons can later land via icon_atlas without API churn.

2) Render path scales the icon uniformly to fit a (row_height - 4)
   box, centered. The world-sprite-as-icon path (300×300 native) no
   longer overflows the row; pre-baked small icons stay sharp because
   the scale is applied around the visual center of the UV rect, not
   the texture origin.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-21 11:43:34 +02:00
Calic
c0066830ea docs: CR-4 — deps panel->0.4.0/composition->0.3.0, init-Header v0.1.1, dead helper entfernt
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 14:32:37 +00:00
Calic
051f472442 feat: default_label_resolver reads name property; item-template convention
The default label_resolver now reads the optional player-facing `name`
property from the item-template; modules with named templates get pretty
row labels without registering an override. Falls back to "Item" when
`name` is absent or empty.

README documents the player-facing item-template convention: name,
description, weight, volume, composition.<material> — all optional,
all with documented defaults. Skill-gated description reveals stay on
the separate hints lib (designed, not yet implemented).
2026-06-14 00:26:29 +02:00
Calic
0921a03ede initial: inventory-list-display v0.1.0 — vertical list widget on lib-core.panel
5 public functions (create, register_action, unregister_action,
set_label_resolver, set_icon_resolver) plus 2 test backdoors
(_test_get_rows, _test_resolve_icon). Reads lib-core.inventory-list
contents each render frame; right-click rows open context-menu via
panel.show_context_menu. Default action-set is empty.
2026-06-13 23:28:30 +02:00