feat(achievements): distinguish regular and secret achievements
This commit is contained in:
@@ -86,7 +86,7 @@ onRender((ctx) => {
|
||||
ctx.font = "7px NDS7";
|
||||
for (let i = ACHIEVEMENTS_TOP_SCREEN_COUNT - 1; i >= 0; i--) {
|
||||
const achievement = ACHIEVEMENTS[i]!;
|
||||
const isUnlocked = achievementsStore.isUnlocked(achievement);
|
||||
const isUnlocked = achievementsStore.isUnlocked(achievement.id);
|
||||
|
||||
const offset = store.getItemOffset(i);
|
||||
if (offset === -ACHIEVEMENTS_LINE_HEIGHT) continue;
|
||||
@@ -98,11 +98,12 @@ onRender((ctx) => {
|
||||
ctx.fillStyle = "#000000";
|
||||
ctx.fillRect(0, y, LOGICAL_WIDTH, ACHIEVEMENTS_LINE_HEIGHT);
|
||||
|
||||
// TODO: draw ??? for secret ones
|
||||
ctx.fillStyle = isUnlocked ? "#ffffff" : "#666666";
|
||||
drawCheckbox(ctx, ACHIEVEMENTS_X, y, isUnlocked);
|
||||
ctx.fillText(
|
||||
$t(`achievements.${achievement}`).replace("\n", " "),
|
||||
achievement.secret && !isUnlocked
|
||||
? "???"
|
||||
: $t(`achievements.${achievement.id}`).replace("\n", " "),
|
||||
ACHIEVEMENTS_X + CHECKBOX_SIZE + CHECKBOX_TEXT_GAP,
|
||||
y,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user