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:
@@ -15,5 +15,6 @@ namespace F4T::ServerBrowser
|
||||
static void HandleAction(const nlohmann::json& a_action);
|
||||
static void ForwardControllerInput(const char* a_button, const char* a_phase);
|
||||
static void PushConnectionStatus();
|
||||
static void PushUITheme();
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user