App 2.36.0: Overview style Grid, after the Tron films
Neon lines on black over a perspective grid floor that moves with the speed; the battery as a light wall, power on a disc whose inner ring turns with it, and the last two minutes of power as a light-cycle trail of right angles (the Cockpit's PowerTrace, now in ClusterValues). Cyan, or the accent colour; in cyan the app turns cyan too. In THEMES.md with two screenshots. Emulator only; not tried on the car. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
This commit is contained in:
@@ -68,6 +68,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
/** The styles built on {@link ClusterCanvasView}, fed together. */
|
||||
private final java.util.List<ClusterCanvasView> canvasStyles = new java.util.ArrayList<>();
|
||||
private TerminalView terminalView;
|
||||
private GridView gridView;
|
||||
/** The pane of each Overview style, by its {@link OverviewStyle} ordinal. */
|
||||
private View[] stylePanes;
|
||||
private View consumptionPane;
|
||||
@@ -342,13 +343,14 @@ public class MainActivity extends AppCompatActivity {
|
||||
View sciFiPane = drawnPane(sciFiView), cartoonPane = drawnPane(cartoonView),
|
||||
mgPane = drawnPane(octagonView);
|
||||
terminalView = new TerminalView(this);
|
||||
gridView = new GridView(this);
|
||||
java.util.Collections.addAll(canvasStyles, new MinimalView(this), terminalView,
|
||||
new NixieView(this), new ChronographView(this));
|
||||
new NixieView(this), new ChronographView(this), gridView);
|
||||
View[] canvasPanes = new View[canvasStyles.size()];
|
||||
for (int i = 0; i < canvasPanes.length; i++) canvasPanes[i] = drawnPane(canvasStyles.get(i));
|
||||
stylePanes = new View[] { vehiclePane, gaugesPane, cockpitPane, retroPane,
|
||||
futuristicPane, sciFiPane, cartoonPane, mgPane,
|
||||
canvasPanes[0], canvasPanes[1], canvasPanes[2], canvasPanes[3] };
|
||||
canvasPanes[0], canvasPanes[1], canvasPanes[2], canvasPanes[3], canvasPanes[4] };
|
||||
// The Overview page holds every style; Settings → Overview style picks the one shown.
|
||||
android.widget.FrameLayout overviewPage = new android.widget.FrameLayout(this);
|
||||
overviewPage.setLayoutParams(new android.view.ViewGroup.LayoutParams(
|
||||
@@ -1713,9 +1715,10 @@ public class MainActivity extends AppCompatActivity {
|
||||
private void applyOverviewStyle() {
|
||||
OverviewStyle style = overviewStyle();
|
||||
for (View pane : stylePanes) pane.setVisibility(pane == stylePanes[style.ordinal()] ? View.VISIBLE : View.GONE);
|
||||
// Retro and Terminal: their original palette or the accent colour, as chosen for each.
|
||||
// Retro, Terminal and Grid: their original palette or the accent colour, as chosen for each.
|
||||
retroView.setAccentPalette(!originalColours(OverviewStyle.RETRO));
|
||||
terminalView.setAccentPalette(!originalColours(OverviewStyle.TERMINAL));
|
||||
gridView.setAccentPalette(!originalColours(OverviewStyle.GRID));
|
||||
// The accent choices depend on the style ("Original colours" for Retro and Terminal).
|
||||
if (settingsPane != null) bindAccentColor();
|
||||
}
|
||||
@@ -1746,7 +1749,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
getString(R.string.overview_style_mg),
|
||||
getString(R.string.overview_style_minimal), getString(R.string.overview_style_terminal),
|
||||
getString(R.string.overview_style_nixie),
|
||||
getString(R.string.overview_style_chronograph) };
|
||||
getString(R.string.overview_style_chronograph), getString(R.string.overview_style_grid) };
|
||||
}
|
||||
|
||||
/** The style drop-down; every style is fed on every reading, only the chosen one is shown. */
|
||||
@@ -1812,6 +1815,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
v.tyreFr = unit.format(s.getTirePressures().getFrontRightKpa());
|
||||
v.tyreRl = unit.format(s.getTirePressures().getRearLeftKpa());
|
||||
v.tyreRr = unit.format(s.getTirePressures().getRearRightKpa());
|
||||
v.powerTrail = cockpitTrace.snapshot();
|
||||
retroView.setValues(v);
|
||||
flowView.setValues(v);
|
||||
sciFiView.setValues(v);
|
||||
|
||||
Reference in New Issue
Block a user