Files
mg4/app/src/main/java/com/evsuite/abrp/StylePalette.java
T
nilsandClaude Opus 5.5 adc2c86303 App 2.43.0: Overview styles Día de Muertos and Halloween
Día de Muertos is an ofrenda: papel picado for the battery, a calavera
with the speed in a ring of marigolds for the power, candles for the
range, a path of petals for the last two minutes of power. Halloween is
a graveyard hill: a jack-o'-lantern with the speed in its grin, embers
for the power, a potion flask for the battery, a tombstone and bats for
the range. Each has its own palette; Tally counts what a value lights.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
2026-10-31 09:24:56 +01:00

39 lines
1.8 KiB
Java

package com.evsuite.abrp;
/**
* The app's colours while an Overview style shows its own palette: the theme overlay
* (res/values/style_palettes.xml) that MainActivity lays over the accent colour, so the
* navigation and the rest of the app match the style — Retro's turquoise, Terminal's green
* phosphor, and so on. Styles drawn in the accent colour have none.
*/
final class StylePalette {
private StylePalette() {}
/** The overlay for a style's own palette, or 0 for a style that has none. */
static int overlay(OverviewStyle style) {
switch (style) {
case RETRO: return R.style.ThemeOverlay_EV_Style_Retro;
case TERMINAL: return R.style.ThemeOverlay_EV_Style_Terminal;
case SCIFI: return R.style.ThemeOverlay_EV_Style_SciFi;
case CARTOON: return R.style.ThemeOverlay_EV_Style_Cartoon;
case NIXIE: return R.style.ThemeOverlay_EV_Style_Nixie;
case GRID:
case GRID_MAP: return R.style.ThemeOverlay_EV_Style_Grid;
case TIME_CIRCUITS: return R.style.ThemeOverlay_EV_Style_TimeCircuits;
case QUEST: return R.style.ThemeOverlay_EV_Style_Quest;
case VISOR: return R.style.ThemeOverlay_EV_Style_Visor;
case EMPIRE: return R.style.ThemeOverlay_EV_Style_Empire;
case MUERTOS: return R.style.ThemeOverlay_EV_Style_Muertos;
case HALLOWEEN: return R.style.ThemeOverlay_EV_Style_Halloween;
default: return 0;
}
}
/** The overlay the app wears: the style's own when it shows its palette, else the accent's. */
static int appOverlay(OverviewStyle style, boolean originalChosen, AccentColor accent) {
int own = overlay(style);
return own != 0 && style.showsOwnPalette(originalChosen) ? own : accent.overlay;
}
}