feat(achievements): black fade in and out from home and settings screen
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
const { onRender } = useScreen();
|
||||
const store = useAchievementsScreen();
|
||||
const achievementsStore = useAchievementsStore();
|
||||
const { assets } = useAssets();
|
||||
|
||||
const PROGRESS_BAR_WIDTH = 140;
|
||||
const PROGRESS_BAR_HEIGHT = 10;
|
||||
@@ -15,21 +14,14 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
onRender((ctx) => {
|
||||
assets.images.home.topScreen.background.draw(ctx, 0, 0);
|
||||
|
||||
ctx.globalAlpha = store.isIntro
|
||||
? store.intro.stage1Opacity
|
||||
: store.isOutro
|
||||
? store.outro.stage1Opacity
|
||||
: 1;
|
||||
ctx.fillStyle = "#000000";
|
||||
ctx.fillRect(0, 0, LOGICAL_WIDTH, LOGICAL_HEIGHT);
|
||||
|
||||
// header
|
||||
ctx.globalAlpha = store.isIntro
|
||||
? store.intro.stage2Opacity
|
||||
? store.intro.stage1Opacity
|
||||
: store.isOutro
|
||||
? store.outro.stage3Opacity
|
||||
? store.outro.stage2Opacity
|
||||
: 1;
|
||||
ctx.fillStyle = "#ffffff";
|
||||
ctx.textBaseline = "top";
|
||||
@@ -87,9 +79,9 @@ onRender((ctx) => {
|
||||
|
||||
// achievement list (reversed iteration because they appear in cascade)
|
||||
ctx.globalAlpha = store.isIntro
|
||||
? store.intro.stage2Opacity
|
||||
? store.intro.stage1Opacity
|
||||
: store.isOutro
|
||||
? store.outro.stage2Opacity
|
||||
? store.outro.stage1Opacity
|
||||
: 1;
|
||||
ctx.font = "7px NDS7";
|
||||
for (let i = ACHIEVEMENTS_TOP_SCREEN_COUNT - 1; i >= 0; i--) {
|
||||
|
||||
Reference in New Issue
Block a user