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.
21 lines
507 B
C++
21 lines
507 B
C++
#pragma once
|
|
|
|
#include "PrismaUI_F4_API.h"
|
|
|
|
#include <nlohmann/json_fwd.hpp>
|
|
|
|
namespace F4T::ServerBrowser
|
|
{
|
|
class ServerBrowserBridge
|
|
{
|
|
public:
|
|
static void Initialize(PRISMA_UI_API::IVPrismaUI4* a_api, PrismaView a_view);
|
|
static void OnBrowserShown();
|
|
static void OnBrowserHidden();
|
|
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();
|
|
};
|
|
}
|