mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-10 13:04:36 +00:00
Add Classic Icons toggle to Graphics Settings
Adds a "Classic icons" toggle in the structure-icons section of the Graphics Settings modal. Off (default) keeps today's renderer look; on switches to a classic style — lighter player-colored shape behind a dark icon glyph, with 0.75 alpha for a subtle translucent feel. Exposes the underlying tuning as new render-settings knobs (`structure.fillDarken`, `borderDarken`, `iconAlpha`, `iconR/G/B`) and threads them through the structure shader as uniforms, replacing the previously hardcoded `darken(_, 0.65)` / `darken(_, 0.35)` calls and the hardcoded white `vec3(1.0)` icon color. The `classicIcons` boolean in the override schema is the single user-facing knob; the generator derives the five underlying field values from it. Extends the ClientGameRunner live-apply path to copy the `structure` slice too, and adds tests covering the schema and preset derivation.
This commit is contained in:
@@ -491,6 +491,7 @@ async function createClientGame(
|
||||
);
|
||||
const live = view.getSettings();
|
||||
Object.assign(live.name, generated.name);
|
||||
Object.assign(live.structure, generated.structure);
|
||||
};
|
||||
applyGraphicsOverrides();
|
||||
globalThis.addEventListener(
|
||||
|
||||
Reference in New Issue
Block a user