From 9b098f69357451b9787aaec795c8108abe88d35d Mon Sep 17 00:00:00 2001 From: Alex Taber Date: Sun, 12 May 2024 17:46:55 -0400 Subject: [PATCH] Add missing string, fix preview bug in browser --- include/ui_strings.h | 1 + source/draw.c | 2 +- source/remote.c | 11 ++++------- source/ui_strings.c | 22 ++++++++++++---------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/ui_strings.h b/include/ui_strings.h index 592bcdb..27446ee 100644 --- a/include/ui_strings.h +++ b/include/ui_strings.h @@ -80,6 +80,7 @@ typedef struct { const char *dump_single; const char *dump_all_official; float start_pos; + const char *shuffle; } Draw_Strings_s; typedef struct { diff --git a/source/draw.c b/source/draw.c index ce5feb8..372dc5b 100644 --- a/source/draw.c +++ b/source/draw.c @@ -663,7 +663,7 @@ void draw_interface(Entry_List_s * list, Instructions_s instructions, DrawMode d if(current_mode == MODE_THEMES) { char * shuffle_count_string = NULL; - asprintf(&shuffle_count_string, "Shuffle: %i/10", list->shuffle_count); + asprintf(&shuffle_count_string, language.draw.shuffle, list->shuffle_count); draw_text(7, 3, 0.6, 0.6, 0.6f, list->shuffle_count <= 10 && list->shuffle_count >= 2 ? colors[COLOR_WHITE] : colors[COLOR_RED], shuffle_count_string); free(shuffle_count_string); } diff --git a/source/remote.c b/source/remote.c index 5dff767..c5c6d8e 100644 --- a/source/remote.c +++ b/source/remote.c @@ -576,6 +576,7 @@ bool themeplaza_browser(EntryMode mode) stop_audio(&audio); } } + continue; } else if (kDown & KEY_B) { @@ -654,7 +655,8 @@ bool themeplaza_browser(EntryMode mode) } continue; } - else if (y < 24) + + if (y < 24) { if (BETWEEN(0, x, 80)) { @@ -695,12 +697,7 @@ bool themeplaza_browser(EntryMode mode) } else { - if (preview_mode) - { - preview_mode = false; - continue; - } - else if (BETWEEN(24, y, 240 - 24)) + if (BETWEEN(24, y, 240 - 24)) { if (BETWEEN(border, x, 320 - border)) { diff --git a/source/ui_strings.c b/source/ui_strings.c index 9085165..d929436 100644 --- a/source/ui_strings.c +++ b/source/ui_strings.c @@ -210,6 +210,7 @@ const Language_s language_english = { .download_bgm = "Downloading BGM, please wait...", .dump_single = "Dumping theme, please wait...", .dump_all_official = "Dumping official themes, please wait...", + .shuffle = "Shuffle: %i/10", }, .fs = { @@ -541,6 +542,7 @@ const Language_s language_french = { .download_bgm = "Téléchargement de la musique,\nveuillez patienter...", .dump_single = "Extraction du thème installé,\nveuillez patienter...", .dump_all_official = "Extraction des thèmes officiels,\nveuillez patienter...", + .shuffle = "Shuffle: %i/10", }, .fs = { @@ -693,18 +695,18 @@ Language_s init_strings(CFG_Language lang) { switch (lang) { - case CFG_LANGUAGE_JP: + //case CFG_LANGUAGE_JP: case CFG_LANGUAGE_FR: return language_french; - case CFG_LANGUAGE_DE: - case CFG_LANGUAGE_IT: - case CFG_LANGUAGE_ES: - case CFG_LANGUAGE_ZH: - case CFG_LANGUAGE_KO: - case CFG_LANGUAGE_NL: - case CFG_LANGUAGE_PT: - case CFG_LANGUAGE_RU: - case CFG_LANGUAGE_TW: + //case CFG_LANGUAGE_DE: + //case CFG_LANGUAGE_IT: + //case CFG_LANGUAGE_ES: + //case CFG_LANGUAGE_ZH: + //case CFG_LANGUAGE_KO: + //case CFG_LANGUAGE_NL: + //case CFG_LANGUAGE_PT: + //case CFG_LANGUAGE_RU: + //case CFG_LANGUAGE_TW: case CFG_LANGUAGE_EN: return language_english; default: