Skip to content

Add highlight_color, highlight_textcolor style props, and tooltip styling via style_type in formspecs.#17041

Closed
sofar wants to merge 2 commits intoluanti-org:masterfrom
sofar:sofar/selection_color
Closed

Add highlight_color, highlight_textcolor style props, and tooltip styling via style_type in formspecs.#17041
sofar wants to merge 2 commits intoluanti-org:masterfrom
sofar:sofar/selection_color

Conversation

@sofar
Copy link
Copy Markdown
Contributor

@sofar sofar commented Mar 21, 2026

Allow games to customize tooltip appearance through the style system:

  • bgcolor/textcolor: override default tooltip colors
  • bgimg/bgimg_middle: 9-slice background image
  • border: enable/disable the 3D sunken border
  • bordercolor/borderwidths: flat colored border with custom thickness

The tooltip element is drawn once explicitly in drawMenu() with custom
background and borders, then hidden so the GUI tree's second draw pass
doesn't overwrite the custom rendering.

Allow games to control the selection/highlight colors in formspec elements
via style[] and style_type[] properties. Previously these were hardcoded
to skin defaults (green highlight, white text) with no way to override
them to match a custom UI theme.

Supported elements: field, textarea, textlist, table, dropdown.

sofar and others added 2 commits March 16, 2026 22:56
…pecs

Allow games to control the selection/highlight colors in formspec elements
via style[] and style_type[] properties. Previously these were hardcoded
to skin defaults (green highlight, white text) with no way to override
them to match a custom UI theme.

Supported elements: field, textarea, textlist, table, dropdown.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Allow games to customize tooltip appearance through the style system:
- bgcolor/textcolor: override default tooltip colors
- bgimg/bgimg_middle: 9-slice background image
- border: enable/disable the 3D sunken border
- bordercolor/borderwidths: flat colored border with custom thickness

The tooltip element is drawn once explicitly in drawMenu() with custom
background and borders, then hidden so the GUI tree's second draw pass
doesn't overwrite the custom rendering.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sofar
Copy link
Copy Markdown
Contributor Author

sofar commented Mar 21, 2026

Screenshots:

image image

And tooltips:

image image image image image

@CrazyladMT
Copy link
Copy Markdown
Contributor

CrazyladMT commented Mar 21, 2026

This is great! It will be very nice for games.

@sofar
Copy link
Copy Markdown
Contributor Author

sofar commented Mar 21, 2026

Just some background: I've been heavily re-styling my game for Inside the Box and these are some of the last few remaining items where I can't style things the way I'd like to see it. So it definitely closes a big gap.

@sfan5 sfan5 added Feature ✨ PRs that add or enhance a feature Formspec labels Mar 22, 2026
@sofar
Copy link
Copy Markdown
Contributor Author

sofar commented Apr 16, 2026

Closing for now. This is better suited after a new layout engine is merged that implements - #14263

@sofar sofar closed this Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature ✨ PRs that add or enhance a feature Formspec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants