Repository navigation
feat(example): show the newer authoring features in a themed workshop window - #108
Merged
Merged
Conversation
…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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The example had fallen behind the API: it showed nothing of indexed handles, choices, sprite and value handles, styles, themes, the
rawAPI, the size report, or thevanilla.hudoverrides. It now covers them, mostly in one new window rather than by crowding the shop.upgrades.tsx,MyUpgrades.kt,Workshop.kt): ageneric_9x3window under its owncreateThemeover industrial'scolors. Three upgrade cards read indexed action, text, fraction and value handles; each card'svaluehandle 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/MaxChoicegroup sets how many levels a click buys, a balanceHotspotopts into the hover outline, and a rank badge is aspritehandle (only, with catalog sprites) tinted by the sharedtone. Styles usecreateandvariants, text colours and padding usedefineVars. It opens from a new Workshop button in the shop and from/upgrades, and spends the shop's coins.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.raw(clock_hud.ts), so the example mixes both styles; its compiled entry is unchanged.size: { report: true, budget: 1_000_000 }.outlines: true), the clock and the wave bar.No compiler, plugin, or runtime code changes, and no golden hashes change (the
examplegolden 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_9x3window'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
tinthandles cannot be indexed;Repeater, because its tooltip and click are fixed per cell and the cards need them to follow their stage;hover={false}; andSlotsandHeader, 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