feat: colorize the ui based on the app color
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
// NOTE: calendar background is handled by TopScreenBackground
|
||||
const app = useAppStore();
|
||||
const store = useHomeStore();
|
||||
|
||||
const { assets } = useAssets();
|
||||
@@ -12,6 +13,7 @@ useRender((ctx) => {
|
||||
const CALENDAR_ROWS = 5;
|
||||
const CALENDAR_LEFT = 128;
|
||||
const CALENDAR_TOP = 64;
|
||||
const SELECTOR_SIZE = 13;
|
||||
|
||||
ctx.fillStyle = "#343434";
|
||||
|
||||
@@ -61,9 +63,15 @@ useRender((ctx) => {
|
||||
|
||||
if (now.getDate() === day) {
|
||||
ctx.drawImage(
|
||||
assets.home.topScreen.calendar.daySelector,
|
||||
cellLeft,
|
||||
cellTop,
|
||||
assets.home.topScreen.calendar.daySelectorsSheet,
|
||||
0,
|
||||
(app.color.row * 4 + app.color.col) * SELECTOR_SIZE,
|
||||
SELECTOR_SIZE,
|
||||
SELECTOR_SIZE,
|
||||
cellLeft + 1,
|
||||
cellTop + 1,
|
||||
SELECTOR_SIZE,
|
||||
SELECTOR_SIZE,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
const CENTER_X = 63;
|
||||
const CENTER_Y = 95;
|
||||
|
||||
const app = useAppStore();
|
||||
const store = useHomeStore();
|
||||
|
||||
const { assets } = useAssets();
|
||||
@@ -86,7 +87,7 @@ useRender((ctx) => {
|
||||
23,
|
||||
2,
|
||||
);
|
||||
renderHand(now.getSeconds() / 60, "#49db8a", 35, 2);
|
||||
renderHand(now.getSeconds() / 60, app.color.hex, 35, 2);
|
||||
|
||||
ctx.fillStyle = "#494949";
|
||||
ctx.fillRect(CENTER_X - 2, CENTER_Y - 2, 5, 5);
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
const app = useAppStore();
|
||||
const store = useHomeStore();
|
||||
|
||||
const { assets } = useAssets();
|
||||
|
||||
const BAR_WIDTH = 256;
|
||||
const BAR_HEIGHT = 16;
|
||||
|
||||
useRender((ctx) => {
|
||||
const TEXT_Y = 11;
|
||||
|
||||
@@ -10,7 +14,17 @@ useRender((ctx) => {
|
||||
|
||||
ctx.globalAlpha =
|
||||
store.isOutro && store.outro.animateTop ? store.outro.stage2Opacity : 1;
|
||||
ctx.drawImage(assets.home.topScreen.statusBar.statusBar, 0, 0);
|
||||
ctx.drawImage(
|
||||
assets.home.topScreen.statusBar.statusBarsSheet,
|
||||
0,
|
||||
(app.color.row * 4 + app.color.col) * BAR_HEIGHT,
|
||||
BAR_WIDTH,
|
||||
BAR_HEIGHT,
|
||||
0,
|
||||
0,
|
||||
BAR_WIDTH,
|
||||
BAR_HEIGHT,
|
||||
);
|
||||
|
||||
ctx.fillStyle = "#ffffff";
|
||||
ctx.font = "7px NDS7";
|
||||
|
||||
Reference in New Issue
Block a user