Repository navigation
feat: outline the hovered control with coreShaders.hover - #107
Merged
Merged
Conversation
…nilla.slotHighlight
…sized extent A translatable tooltip encoded the maximum width and a long one a clamped line count, so the shader erased visible outline outside the tooltip or left it inside. Such tooltips now encode size zero, which the shader treats as no cut-out: the whole outline is drawn.
oglassdev
added this pull request to stack #101
October 11, 2026 07:03
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.
Window UIs gave no feedback about what is clickable: vanilla highlights one inventory slot at a time, which doesn't match controls that span several slots. With
coreShaders.hoveron, the control under the cursor gets an outline around its whole rectangle. This reworks the approach from #66 on the current option layout.hover={false}opts one out andhoveropts in a region that takes no clicks, so disabled states and hotspots stay quiet by default. The industrial controls pass the prop through.hoveron a region whilecoreShaders.hoveris off fails the build, naming the region and the option.vanilla.slotHighlight: falseblanks vanilla's own slot highlight; a string replaces it with a 24x24 catalog sprite.How it works: the compiler adds one outline glyph per distinct region size, and the runtime puts it in the tooltip title of the region's hitbox item, so the client only draws it while that region is hovered. The text shader moves it onto the region and cuts it out where the tooltip box covers it. Regions without a tooltip get an invisible tooltip style, so no box appears.
Limits:
hover={false}.<Items>or a collection show a stack.Checked in a real 26.2 client at GUI scales 2 and 3, and again at scale 2 on this branch after the rebase onto the bar branch: the outline sits exactly on the region's rectangle for a tab with a tooltip and for a button without one (no tooltip box appears), nothing is drawn for a
hover={false}tab, an item slot or a disabled button, vanilla's highlight is gone, and the HUDs render unchanged with both shaders on.Not checked in a client: multi-line tooltips, the no-cut-out fallback, a catalog-sprite
slotHighlight, formats 85–87, anvil windows and other container sizes, and Multistom.Supersedes #66.
Checks:
just test-rust -p window-core,just gradle :runtime:test --rerun,just check-ts,just test-ts,just golden,just lint,just fmt-check.Stacked on #106.
🤖 Generated with Claude Code