Skip to content

feat: bring repeaters, paging, and tooltips to full-screen windows - #128

Open
oglassdev wants to merge 3 commits into
feat/fullscreen-horsefrom
feat/fullscreen-elements
Open

oglassdev wants to merge 3 commits into
feat/fullscreen-horsefrom
feat/fullscreen-elements

Conversation

@oglassdev

Copy link
Copy Markdown
Contributor

Closes #119
Part of #115

What's supported on full-screen windows

  • Bound text, switches, tints, bars: already bound by feat(runtime): add the full-screen session with fake-survival input and a hidden HUD #125 and checked in a real client. This PR doesn't change them.
  • Repeaters: each cell is its own canvas control, with its own hit-test, hover outline and indexed action (onX(index, click: FullscreenClick)). The industrial <Repeater> now sizes cells at 18px per slot outside sections too. Before this, cells collapsed to their content on the canvas. Container goldens are unchanged.
  • Paging: FullscreenView.list(...) creates the same WindowList as WindowView.list(...). It feeds indexed renders through at(cell), and canPrevious()/canNext() back the flags on the paging buttons.
  • Tooltips: <Region tooltip> and the industrial controls built on it, including Tabs labels and Button disabled={{ tooltip }}. See the decision below.

Tooltip decision

The compiler lays each tooltip out beside its control: centred below it, or above it where the canvas runs out, and always kept on the canvas. The panel is vanilla-styled (dark fill, purple border, cut corners). The title is white and the lines are grey, both plain text. The panel is baked art, and the lines are static labels. The session sends the hovered control's tooltip next to its outline, in two new layers (252 panel, 253 text) under the overlay layer. That cuts the content layer limit from 252 to 250. Panels with the same rect share one texture.

I didn't make the tooltip follow the cursor, for two reasons:

  • Horse mode: text.vsh can't see the cursor there, because the entity shader draws it.
  • Font rows: vanilla text can't be shifted above its line (row ≥ −1), so a tooltip under the cursor couldn't flip up at the bottom edge. Composing it at the cursor's position on the server would need a font for every canvas row.

Anchoring to the control fits the existing server-driven hover. The runs are only re-sent when the hovered control changes, and it works the same in both modes. MiniMessage tags are a build error, because the panel is sized from the plain text at compile time.

Items decision

Real items stay container-only. These fail the build and say why: <Items>, <Collection>, a <Repeater item>, and <Section>s (the message now reads "only available in container windows"). I didn't build item icon rendering.

Rejected at compile time

Element Why
<Items>, <Collection>, <Repeater item> Real items need inventory slots
<Section>, slot patterns They describe container slot geometry
<Image bind> (runtime sprites) There are no sprite fonts on the canvas; use a <Switch> over images
<Input> Anvil only
Region itemModel It's the hitbox item of a slot
Text shadow Already rejected in #123

Checks

  • just test-rust -p window-core fullscreen / layout
  • just golden: only fullscreen was updated on purpose (repeater and tooltips added). Every other case is unchanged.
  • just gradle :runtime:test --tests '*Fullscreen*' :minestom:test --tests '*Fullscreen*'
  • just check-ts
  • just lint
  • The golden case's generated Kotlin compiled against the runtime in a throwaway check.

Not yet verified in a real client

  • Tooltip panel and text layering and position.
  • Per-cell hover and outline on repeaters.
  • Paging re-renders.

Repeater cells are separate canvas controls with their own hit-test, hover
outline, and indexed action. FullscreenView.list pages a list through them
like WindowView.list.

Region tooltips are laid out by the compiler beside their control, below it
or above it where the canvas ends, as a vanilla-styled panel of plain text.
The session sends the hovered control's tooltip in two layers reserved
below the overlay. Identical panels share a texture.

Real items, sections, runtime sprites, and hitbox item models stay
container-only and fail the build with errors that say why. The industrial
Repeater sizes its cells at 18px per slot outside sections too.
…ct § in tooltips

- <Repeater fixed> opts into 18px-per-slot sizing; the default again leaves
  sizing to the section area, so container click routing is unchanged.
- Embedded newlines in full-screen tooltips start separately positioned lines.
- Tooltips reject § formatting codes alongside MiniMessage tags.
- Newlines in bound full-screen slot text are sent as spaces.
@oglassdev
oglassdev changed the base branch from feat/fullscreen-session to feat/fullscreen-horse October 16, 2026 00:08
@oglassdev
oglassdev marked this pull request as ready for review October 16, 2026 00:08
@oglassdev
oglassdev added this pull request to stack #130 October 16, 2026 00:26
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