Skip to content

feat(example): show the newer authoring features in a themed workshop window - #108

Merged
oglassdev merged 4 commits into
feat/hoverfrom
feat/example-showcase
Oct 11, 2026
Merged

oglassdev merged 4 commits into
feat/hoverfrom
feat/example-showcase

Conversation

@oglassdev

@oglassdev oglassdev commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

The example had fallen behind the API: it showed nothing of indexed handles, choices, sprite and value handles, styles, themes, the raw API, the size report, or the vanilla.hud overrides. It now covers them, mostly in one new window rather than by crowding the shop.

  • Foundry Workshop (upgrades.tsx, MyUpgrades.kt, Workshop.kt): a generic_9x3 window under its own createTheme over industrial's colors. Three upgrade cards read indexed action, text, fraction and value handles; each card's value handle switches between three faces: "New", a level <Bar>, and "Maxed". The first two take clicks and are outlined on hover; a maxed card takes none and only says "Fully upgraded". An x1/x5/Max Choice group sets how many levels a click buys, a balance Hotspot opts into the hover outline, and a rank badge is a sprite handle (only, with catalog sprites) tinted by the shared tone. Styles use create and variants, text colours and padding use defineVars. It opens from a new Workshop button in the shop and from /upgrades, and spends the shop's coins.
  • Vanilla experience bar replaced: vanilla.hud.experience: false, and the wave bar moves to a new pinned HUD, 182x5, on the rectangle where vanilla drew the experience bar. The server resends the HUDs every tick so it advances smoothly. The bottom-centre HUD's lamp row is gone, and the shop's sort tabs no longer opt out of the hover outline.
  • Clock HUD in raw (clock_hud.ts), so the example mixes both styles; its compiled entry is unchanged.
  • Config: size: { report: true, budget: 1_000_000 }.
  • Previews for the workshop (one with outlines: true), the clock and the wave bar.

No compiler, plugin, or runtime code changes, and no golden hashes change (the example golden case has its own copy of the sources).

Size: the example's compiler output grows from 549.4 KB to 811.1 KB. The workshop itself is 9.2 KB; the rest is seven more text-row fonts (11 to 18) and the Kotlin and debug descriptor that follow them, because a generic_9x3 window's rows do not coincide with the shop's and windows are not row-aligned automatically as pinned HUDs are.

Not shown: a tint per card, because tint handles cannot be indexed; Repeater, because its tooltip and click are fixed per cell and the cards need them to follow their stage; hover={false}; and Slots and Header, which had no natural place here.

Checked in a real 26.2 client: the workshop renders as its preview does; the hover outline sits on the balance hotspot, the choices, the shop's sort tabs and the whole of a new or open card, while a maxed card shows "Fully upgraded" with no outline and ignores clicks; buying works for x1, x5 and Max, including when short of coins and on a maxed card; coins carry back to the shop and levels persist on reopen. The new bar's bounds equal the experience bar's rectangle at GUI scales 1, 2 and 3, with the right fill widths and tints, and vanilla's bar is gone. The expected rectangle was computed from vanilla's geometry, not taken from a vanilla screenshot. Frames about 0.3 s apart show the bar advancing 5–6 px at a time.

Reviewed in one round, which found no defects; its three wording and preview notes are applied. The later rework of the cards and the HUD was checked in the client but not reviewed again.

Checks: just example-pack, just gradle :example:compileKotlin, just lint, just check-ts, tsc -p example/pack --noEmit, just golden.

Stacked on #107.

🤖 Generated with Claude Code

…oring API

The workshop is a second window under its own theme: a repeater of upgrade
cards with indexed handles, a value-driven switch holding each card's level
bar, a choice group, an opt-in hover hotspot, and a catalog sprite slot tinted
by the shared tone. The shop opens it from a new Workshop button, and
/upgrades opens it directly.

The pack now reports its output size against a budget, blanks vanilla's
experience bar and draws the wave bar in its place, and writes the clock HUD
with the raw API.
@oglassdev
oglassdev added this pull request to stack #101 October 11, 2026 13:13
…ave bar

Each workshop card is now a face per stage, so new and open cards are one
outlined hover target with "Click to upgrade" while a maxed card takes no
clicks and shows "Fully upgraded". The item icon and its handle are gone.

The shop's sort tabs are outlined like the category tabs, the bottom-centre
HUD loses its lamp row, and the status HUDs are resent every tick so the
wave bar advances smoothly.
@oglassdev
oglassdev merged commit ef78d15 into main Oct 11, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant