Add dynamic UI theme for server browser

Introduce runtime-driven UI theming for the server browser

- Expose PushUITheme() in F4TServerBrowserBridge and implement ColorToJson + PushUIThemeInternal to serialize HUD colors and invoke a JS hook.
- Call PushUITheme on UI initialization and when the browser is shown so the webview receives current HUD colors.
- Add frontend handler for "uiTheme" in app.js and a new components/theme.js that implements window.applyCoTheme to set CSS vars and tint the cursor SVG.
- Update styles.css to use RGB component CSS variables (--co-r/--co-g/--co-b and background equivalents) so colors can be overridden at runtime.
- Update index.html to include the new theme script and tweak cursor SVG stroke width; cursor asset updated as well.

This enables the plugin to synchronize the in-game HUD colors with the browser UI dynamically.
This commit is contained in:
2026-06-09 15:19:03 +12:00
parent 1f80b8ea49
commit fb4e238fcc
9 changed files with 131 additions and 17 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 911 B

@@ -6,6 +6,7 @@
.st0 {
fill: #fff;
stroke: #000;
stroke-width: 3.2px;
stroke-miterlimit: 10;
}
</style>

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 479 B