From b48752733952af350b61f952e1a9ee839b6a834c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Krzy=C5=9Bk=C3=B3w?= <46760021+Flower35@users.noreply.github.com> Date: Mon, 1 Jul 2024 16:44:35 +0200 Subject: [PATCH] Minor UI/language improvements (#88) * Revised Polish translation (given the UI constraints) * Added explicit DJUI Menu Panel alignment parameter Previous version was prone to name clashing and could break the UI with some translations and some mod names. --- lang/Polish.ini | 20 ++++++++++---------- src/pc/djui/djui_panel_camera.c | 2 +- src/pc/djui/djui_panel_confirm.c | 2 +- src/pc/djui/djui_panel_controls.c | 2 +- src/pc/djui/djui_panel_controls_extra.c | 2 +- src/pc/djui/djui_panel_controls_n64.c | 2 +- src/pc/djui/djui_panel_display.c | 2 +- src/pc/djui/djui_panel_dynos.c | 2 +- src/pc/djui/djui_panel_host.c | 12 ++++++------ src/pc/djui/djui_panel_host_message.c | 2 +- src/pc/djui/djui_panel_host_mods.c | 7 +++---- src/pc/djui/djui_panel_host_save.c | 4 ++-- src/pc/djui/djui_panel_host_settings.c | 2 +- src/pc/djui/djui_panel_info.c | 2 +- src/pc/djui/djui_panel_join.c | 2 +- src/pc/djui/djui_panel_join_direct.c | 2 +- src/pc/djui/djui_panel_join_lobbies.c | 4 +++- src/pc/djui/djui_panel_join_message.c | 2 +- src/pc/djui/djui_panel_join_private.c | 2 +- src/pc/djui/djui_panel_language.c | 2 +- src/pc/djui/djui_panel_main.c | 2 +- src/pc/djui/djui_panel_menu.c | 12 ++---------- src/pc/djui/djui_panel_menu.h | 2 +- src/pc/djui/djui_panel_menu_options.c | 2 +- src/pc/djui/djui_panel_misc.c | 6 +++--- src/pc/djui/djui_panel_mod_menu.c | 4 ++-- src/pc/djui/djui_panel_modlist.c | 2 +- src/pc/djui/djui_panel_options.c | 2 +- src/pc/djui/djui_panel_pause.c | 2 +- src/pc/djui/djui_panel_player.c | 4 ++-- src/pc/djui/djui_panel_playerlist.c | 2 +- src/pc/djui/djui_panel_rules.c | 2 +- src/pc/djui/djui_panel_sound.c | 2 +- 33 files changed, 57 insertions(+), 64 deletions(-) diff --git a/lang/Polish.ini b/lang/Polish.ini index d15da618..c038876f 100644 --- a/lang/Polish.ini +++ b/lang/Polish.ini @@ -164,7 +164,7 @@ DYNOS = "DYNOS" LOCAL_PLAYER_MODEL_ONLY = "Tylko lokalny model gracza" [HOST_MESSAGE] -INFO_TITLE = "INFORMACJE" +INFO_TITLE = "INFORMACJA" WARN_DISCORD = "Zaproś znajomych do gry, klikając PPM w ich nazwę na Discordzie, a potem klikając\n'\\#d0d0ff\\Zaproś do gry\\#c8c8c8\\'.\n\nMożesz zapraszać na kanałach serwerów klikając w \\#d0d0ff\\plusik\\#c8c8c8\\ obok paska czatu.\n\n \\#ffa0a0\\Należy\\#c8c8c8\\ mieć włączoną Aktywność w grze w\nUstawieniach użytkownika Discorda.\n\nTryb offline \\#ffa0a0\\uniemożliwi\\#c8c8c8\\ wysyłanie zaproszeń." WARN_DISCORD2 = "\\#ffa0a0\\Błąd:\\#c8c8c8\\ Nie wykryto Discorda.\n\n\\#a0a0a0\\Spróbuj zamknąć grę,\nzrestartować Discorda\ni uruchomić grę ponownie." WARN_SOCKET = "Połączenie bezpośrednie \\#ffa0a0\\wymaga\\#c8c8c8\\ konfiguracji przekierowania portów w routerze.\n\nPrzekieruj port '\\#d0d0ff\\%d\\#c8c8c8\\' dla UDP." @@ -238,12 +238,12 @@ PRIVATE_LOBBIES = "Lobby Prywatne" DIRECT = "Połączenie Bezpośrednie" [RULES] -RULES_TITLE = "RULES" +RULES_TITLE = "ZASADY" RULE_1 = "1. Musisz mieć ukończone 13 lat." RULE_2 = "2. Zakaz używania mowy nienawiści, obelg lub jakiegokolwiek obraźliwego języka." -RULE_3 = "3. Nie używaj żadnych zmodyfikowanych konstrukcji." +RULE_3 = "3. Nie korzystaj z nieoficjalnych/zhakowanych wersji gry." RULE_4 = "4. Nie hostuj niewydanych modów bez zgody ich autora." -RULE_5 = "5. Jakakolwiek forma treści NSFW nie będzie tolerowana." +RULE_5 = "5. Jakakolwiek forma treści niecenzuralnych nie będzie tolerowana." SUBJECT_TO_CHANGE = "Zasady te mogą ulec zmianie w przyszłych aktualizacjach." NOTICE = "Łącząc się z CoopNet, zgadzasz się przestrzegać tych zasad podczas gry w lobby publicznym." RULES = "Zasady" @@ -275,23 +275,23 @@ DEBUG_ERRORS = "Błędy z Debugowania" MISC_TITLE = "POZOSTAŁE OPCJE" PAUSE_IN_SINGLEPLAYER = "Pauza w Trybie Pojedynczego Gracza" DISABLE_POPUPS = "Wyłącz Dymki Powiadomień" -USE_STANDARD_KEY_BINDINGS_CHAT = "Klasyczne sterowanie czatem" +USE_STANDARD_KEY_BINDINGS_CHAT = "Klasyczna Historia Czatu" MENU_OPTIONS = "Opcje Menu" -INFORMATION = "Informacje" +INFORMATION = "Informacja" DEBUG = "Debugowanie" LANGUAGE = "Język" COOP_COMPATIBILITY = "Włącz kompatybilność z sm64ex-coop" R_BUTTON = "Przycisk R - Opcje" [INFORMATION] -INFORMATION_TITLE = "INFORMACJE" +INFORMATION_TITLE = "INFORMACJA" CHANGELOG = "Rejestr Zmian" [CONSOLE] CONSOLE = "KONSOLA" [MODLIST] -MODS = "MODYFIKACJE" +MODS = "MODY" [OPTIONS] OPTIONS = "OPCJE" @@ -368,8 +368,8 @@ MUTE_FOCUS_LOSS = "Wycisz dźwięk, gdy okno traci fokus" LANGUAGE = "JĘZYK" [LOBBIES] -PUBLIC_LOBBIES = "LOBBY PUBLICZNE" -PRIVATE_LOBBIES = "LOBBY PRYWATNE" +PUBLIC_LOBBIES = "GRY PUBLICZNE" +PRIVATE_LOBBIES = "GRY PRYWATNE" REFRESH = "Odśwież" REFRESHING = "Odświeżanie..." ENTER_PASSWORD = "Wprowadź hasło do prywatnego lobby:" diff --git a/src/pc/djui/djui_panel_camera.c b/src/pc/djui/djui_panel_camera.c index e14e7143..9cc35aa9 100644 --- a/src/pc/djui/djui_panel_camera.c +++ b/src/pc/djui/djui_panel_camera.c @@ -12,7 +12,7 @@ static void djui_panel_camera_value_changed(UNUSED struct DjuiBase* caller) { } void djui_panel_camera_create(struct DjuiBase* caller) { - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(CAMERA, CAMERA)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(CAMERA, CAMERA), false); struct DjuiBase* body = djui_three_panel_get_body(panel); { djui_checkbox_create(body, DLANG(CAMERA, FREE_CAMERA), &configEnableCamera, djui_panel_camera_value_changed); diff --git a/src/pc/djui/djui_panel_confirm.c b/src/pc/djui/djui_panel_confirm.c index 18f9ce1f..fc9dc948 100644 --- a/src/pc/djui/djui_panel_confirm.c +++ b/src/pc/djui/djui_panel_confirm.c @@ -4,7 +4,7 @@ #include "pc/utils/misc.h" void djui_panel_confirm_create(struct DjuiBase* caller, char* title, char* message, void (*on_yes_click)(struct DjuiBase*)) { - struct DjuiThreePanel* panel = djui_panel_menu_create(title); + struct DjuiThreePanel* panel = djui_panel_menu_create(title, false); struct DjuiBase* body = djui_three_panel_get_body(panel); { struct DjuiText* text = djui_text_create(body, message); diff --git a/src/pc/djui/djui_panel_controls.c b/src/pc/djui/djui_panel_controls.c index 4c946b3b..a0b5357d 100644 --- a/src/pc/djui/djui_panel_controls.c +++ b/src/pc/djui/djui_panel_controls.c @@ -13,7 +13,7 @@ void djui_panel_controls_value_change(UNUSED struct DjuiBase* caller) { } void djui_panel_controls_create(struct DjuiBase* caller) { - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(CONTROLS, CONTROLS)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(CONTROLS, CONTROLS), false); struct DjuiBase* body = djui_three_panel_get_body(panel); { djui_button_create(body, DLANG(CONTROLS, N64_BINDS), DJUI_BUTTON_STYLE_NORMAL, djui_panel_controls_n64_create); diff --git a/src/pc/djui/djui_panel_controls_extra.c b/src/pc/djui/djui_panel_controls_extra.c index 54f8a80e..e4727b45 100644 --- a/src/pc/djui/djui_panel_controls_extra.c +++ b/src/pc/djui/djui_panel_controls_extra.c @@ -6,7 +6,7 @@ void djui_panel_controls_extra_create(struct DjuiBase* caller) { f32 bindBodyHeight = 28 * 12 + 1 * 10; - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(CONTROLS, CONTROLS)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(CONTROLS, CONTROLS), false); struct DjuiBase* body = djui_three_panel_get_body(panel); { struct DjuiFlowLayout* bindBody = djui_flow_layout_create(body); diff --git a/src/pc/djui/djui_panel_controls_n64.c b/src/pc/djui/djui_panel_controls_n64.c index 0359902e..6eb7fa7f 100644 --- a/src/pc/djui/djui_panel_controls_n64.c +++ b/src/pc/djui/djui_panel_controls_n64.c @@ -6,7 +6,7 @@ void djui_panel_controls_n64_create(struct DjuiBase* caller) { f32 bindBodyHeight = 28 * 14 + 1 * 13; - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(CONTROLS, CONTROLS)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(CONTROLS, CONTROLS), false); struct DjuiBase* body = djui_three_panel_get_body(panel); { struct DjuiFlowLayout* bindBody = djui_flow_layout_create(body); diff --git a/src/pc/djui/djui_panel_display.c b/src/pc/djui/djui_panel_display.c index e71ed730..9dd68dad 100644 --- a/src/pc/djui/djui_panel_display.c +++ b/src/pc/djui/djui_panel_display.c @@ -52,7 +52,7 @@ static void djui_panel_display_msaa_change(UNUSED struct DjuiBase* caller) { } void djui_panel_display_create(struct DjuiBase* caller) { - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(DISPLAY, DISPLAY)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(DISPLAY, DISPLAY), false); struct DjuiBase* body = djui_three_panel_get_body(panel); struct DjuiSelectionbox* msaa = NULL; diff --git a/src/pc/djui/djui_panel_dynos.c b/src/pc/djui/djui_panel_dynos.c index 7df1ee1b..caa42439 100644 --- a/src/pc/djui/djui_panel_dynos.c +++ b/src/pc/djui/djui_panel_dynos.c @@ -38,7 +38,7 @@ static void djui_panel_dynos_destroy(UNUSED struct DjuiBase* caller) { void djui_panel_dynos_create(struct DjuiBase* caller) { gDjuiInPlayerMenu = true; int packCount = dynos_pack_get_count(); - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(DYNOS, DYNOS)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(DYNOS, DYNOS), true); struct DjuiBase* body = djui_three_panel_get_body(panel); { diff --git a/src/pc/djui/djui_panel_host.c b/src/pc/djui/djui_panel_host.c index fb62da18..0bd65008 100644 --- a/src/pc/djui/djui_panel_host.c +++ b/src/pc/djui/djui_panel_host.c @@ -73,12 +73,12 @@ static void djui_panel_host_do_host(struct DjuiBase* caller) { djui_inputbox_select_all(sInputboxPort); return; } - + // Doesn't let you host if the player limit is not good if (configAmountofPlayers < 1 || configAmountofPlayers > MAX_PLAYERS) { return; } - + configHostPort = atoi(sInputboxPort->buffer); if (gNetworkType == NT_SERVER) { @@ -99,9 +99,9 @@ static void djui_panel_host_do_host(struct DjuiBase* caller) { void djui_panel_host_create(struct DjuiBase* caller) { struct DjuiBase* defaultBase = NULL; - struct DjuiThreePanel* panel = djui_panel_menu_create((gNetworkType == NT_SERVER) - ? DLANG(HOST, SERVER_TITLE) - : DLANG(HOST, HOST_TITLE)); + struct DjuiThreePanel* panel = djui_panel_menu_create( + (gNetworkType == NT_SERVER) ? DLANG(HOST, SERVER_TITLE) : DLANG(HOST, HOST_TITLE), + false); struct DjuiBase* body = djui_three_panel_get_body(panel); { char* nChoices[] = { DLANG(HOST, DIRECT_CONNECTION), DLANG(HOST, COOPNET) }; @@ -170,7 +170,7 @@ void djui_panel_host_create(struct DjuiBase* caller) { } } } - + struct DjuiRect* rect2 = djui_rect_container_create(body, 32); { struct DjuiText* text1 = djui_text_create(&rect2->base, DLANG(HOST, SAVE_SLOT)); diff --git a/src/pc/djui/djui_panel_host_message.c b/src/pc/djui/djui_panel_host_message.c index 17361dec..283b5a80 100644 --- a/src/pc/djui/djui_panel_host_message.c +++ b/src/pc/djui/djui_panel_host_message.c @@ -57,7 +57,7 @@ void djui_panel_host_message_create(struct DjuiBase* caller) { f32 textHeight = 32 * 0.8125f * warningLines + 8; - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(HOST_MESSAGE, INFO_TITLE)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(HOST_MESSAGE, INFO_TITLE), false); struct DjuiBase* body = djui_three_panel_get_body(panel); { struct DjuiText* text1 = djui_text_create(body, warningMessage); diff --git a/src/pc/djui/djui_panel_host_mods.c b/src/pc/djui/djui_panel_host_mods.c index aab07ac4..3b73c465 100644 --- a/src/pc/djui/djui_panel_host_mods.c +++ b/src/pc/djui/djui_panel_host_mods.c @@ -124,10 +124,9 @@ void djui_panel_host_mods_create(struct DjuiBase* caller) { mods_update_selectable(); djui_panel_host_mods_description_create(); - struct DjuiThreePanel* panel = djui_panel_menu_create(isRomHacks - ? DLANG(HOST_MODS, ROMHACKS) - : DLANG(HOST_MODS, MODS) - ); + struct DjuiThreePanel* panel = djui_panel_menu_create( + isRomHacks ? DLANG(HOST_MODS, ROMHACKS) : DLANG(HOST_MODS, MODS), + true); struct DjuiBase* body = djui_three_panel_get_body(panel); { diff --git a/src/pc/djui/djui_panel_host_save.c b/src/pc/djui/djui_panel_host_save.c index 364f5773..4a836888 100644 --- a/src/pc/djui/djui_panel_host_save.c +++ b/src/pc/djui/djui_panel_host_save.c @@ -31,7 +31,7 @@ static bool djui_panel_edit_back(UNUSED struct DjuiBase* caller) { } static void djui_panel_edit_create(struct DjuiBase* caller) { - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(HOST_SAVE, EDIT_TITLE)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(HOST_SAVE, EDIT_TITLE), false); struct DjuiBase* body = djui_three_panel_get_body(panel); { struct DjuiRect* rect1 = djui_rect_container_create(body, 32); @@ -96,7 +96,7 @@ static void djui_panel_host_save_edit(struct DjuiBase* caller) { void djui_panel_host_save_create(struct DjuiBase* caller) { sSaveButtonCaller = caller; - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(HOST_SAVE, SAVE_TITLE)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(HOST_SAVE, SAVE_TITLE), false); struct DjuiBase* body = djui_three_panel_get_body(panel); { for (int i = 0; i < NUM_SAVE_FILES; i++) { diff --git a/src/pc/djui/djui_panel_host_settings.c b/src/pc/djui/djui_panel_host_settings.c index 190c0b54..33e15fbc 100644 --- a/src/pc/djui/djui_panel_host_settings.c +++ b/src/pc/djui/djui_panel_host_settings.c @@ -43,7 +43,7 @@ static void djui_panel_host_player_text_change(struct DjuiBase* caller) { } void djui_panel_host_settings_create(struct DjuiBase* caller) { - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(HOST_SETTINGS, SETTINGS)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(HOST_SETTINGS, SETTINGS), false); struct DjuiBase* body = djui_three_panel_get_body(panel); { char* iChoices[3] = { DLANG(HOST_SETTINGS, NONSOLID), DLANG(HOST_SETTINGS, SOLID), DLANG(HOST_SETTINGS, FRIENDLY_FIRE) }; diff --git a/src/pc/djui/djui_panel_info.c b/src/pc/djui/djui_panel_info.c index 22b71e64..b978657a 100644 --- a/src/pc/djui/djui_panel_info.c +++ b/src/pc/djui/djui_panel_info.c @@ -6,7 +6,7 @@ static char sInfo[512]; void djui_panel_info_create(struct DjuiBase *caller) { - struct DjuiThreePanel *panel = djui_panel_menu_create(DLANG(INFORMATION, INFORMATION_TITLE)); + struct DjuiThreePanel *panel = djui_panel_menu_create(DLANG(INFORMATION, INFORMATION_TITLE), false); struct DjuiBase *body = djui_three_panel_get_body(panel); { snprintf(sInfo, 512, "\ diff --git a/src/pc/djui/djui_panel_join.c b/src/pc/djui/djui_panel_join.c index 8c25f487..d88c75b1 100644 --- a/src/pc/djui/djui_panel_join.c +++ b/src/pc/djui/djui_panel_join.c @@ -21,7 +21,7 @@ void djui_panel_join_create(struct DjuiBase* caller) { #ifndef COOPNET djui_panel_join_direct_create(caller); #else - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(JOIN, JOIN_TITLE)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(JOIN, JOIN_TITLE), false); struct DjuiBase* body = djui_three_panel_get_body(panel); { djui_button_create(body, DLANG(JOIN, PUBLIC_LOBBIES), DJUI_BUTTON_STYLE_NORMAL, djui_panel_join_public_lobbies); diff --git a/src/pc/djui/djui_panel_join_direct.c b/src/pc/djui/djui_panel_join_direct.c index 56e81898..a2690505 100644 --- a/src/pc/djui/djui_panel_join_direct.c +++ b/src/pc/djui/djui_panel_join_direct.c @@ -155,7 +155,7 @@ void djui_panel_join_direct_do_join(struct DjuiBase* caller) { void djui_panel_join_direct_create(struct DjuiBase* caller) { struct DjuiBase* defaultBase = NULL; - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(JOIN, JOIN_TITLE)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(JOIN, JOIN_TITLE), false); struct DjuiBase* body = djui_three_panel_get_body(panel); { struct DjuiText* text1 = djui_text_create(body, DLANG(JOIN, JOIN_SOCKET)); diff --git a/src/pc/djui/djui_panel_join_lobbies.c b/src/pc/djui/djui_panel_join_lobbies.c index 869346db..4a05a15e 100644 --- a/src/pc/djui/djui_panel_join_lobbies.c +++ b/src/pc/djui/djui_panel_join_lobbies.c @@ -152,7 +152,9 @@ void djui_panel_join_lobbies_create(struct DjuiBase* caller, const char* passwor djui_panel_join_lobby_description_create(); struct DjuiBase* defaultBase = NULL; - struct DjuiThreePanel* panel = djui_panel_menu_create(private ? DLANG(LOBBIES, PRIVATE_LOBBIES) : DLANG(LOBBIES, PUBLIC_LOBBIES)); + struct DjuiThreePanel* panel = djui_panel_menu_create( + private ? DLANG(LOBBIES, PRIVATE_LOBBIES) : DLANG(LOBBIES, PUBLIC_LOBBIES), + true); struct DjuiBase* body = djui_three_panel_get_body(panel); { sLobbyPaginated = djui_paginated_create(body, 10); diff --git a/src/pc/djui/djui_panel_join_message.c b/src/pc/djui/djui_panel_join_message.c index 82c96ba8..8a3b9df5 100644 --- a/src/pc/djui/djui_panel_join_message.c +++ b/src/pc/djui/djui_panel_join_message.c @@ -54,7 +54,7 @@ void djui_panel_join_message_create(struct DjuiBase* caller) { // don't recreate panel if it's already visible if (gDjuiPanelJoinMessageVisible) { return; } - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(JOIN_MESSAGE, JOINING)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(JOIN_MESSAGE, JOINING), true); struct DjuiBase* body = djui_three_panel_get_body(panel); { snprintf(gDownloadEstimate, 32, " "); diff --git a/src/pc/djui/djui_panel_join_private.c b/src/pc/djui/djui_panel_join_private.c index da58b145..5e92cdd5 100644 --- a/src/pc/djui/djui_panel_join_private.c +++ b/src/pc/djui/djui_panel_join_private.c @@ -17,7 +17,7 @@ static void djui_panel_join_private_lobbies(struct DjuiBase* caller) { void djui_panel_join_private_create(struct DjuiBase* caller) { struct DjuiBase* defaultBase = NULL; - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(LOBBIES, PRIVATE_LOBBIES)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(LOBBIES, PRIVATE_LOBBIES), true); struct DjuiBase* body = djui_three_panel_get_body(panel); { struct DjuiText* text1 = djui_text_create(body, DLANG(LOBBIES, ENTER_PASSWORD)); diff --git a/src/pc/djui/djui_panel_language.c b/src/pc/djui/djui_panel_language.c index 9dfaa0dc..813b8dec 100644 --- a/src/pc/djui/djui_panel_language.c +++ b/src/pc/djui/djui_panel_language.c @@ -75,7 +75,7 @@ static void djui_panel_language_destroy(UNUSED struct DjuiBase* caller) { } void djui_panel_language_create(struct DjuiBase* caller) { - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(LANGUAGE, LANGUAGE)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(LANGUAGE, LANGUAGE), false); struct DjuiBase* body = djui_three_panel_get_body(panel); sLanguageChanged = false; diff --git a/src/pc/djui/djui_panel_main.c b/src/pc/djui/djui_panel_main.c index 38163714..4b4b889e 100644 --- a/src/pc/djui/djui_panel_main.c +++ b/src/pc/djui/djui_panel_main.c @@ -25,7 +25,7 @@ static void djui_panel_main_quit(struct DjuiBase* caller) { } void djui_panel_main_create(struct DjuiBase* caller) { - struct DjuiThreePanel* panel = djui_panel_menu_create(""); + struct DjuiThreePanel* panel = djui_panel_menu_create("", false); { struct DjuiBase* body = djui_three_panel_get_body(panel); { diff --git a/src/pc/djui/djui_panel_menu.c b/src/pc/djui/djui_panel_menu.c index 8abb416d..75a7c657 100644 --- a/src/pc/djui/djui_panel_menu.c +++ b/src/pc/djui/djui_panel_menu.c @@ -46,19 +46,11 @@ void djui_panel_menu_back(UNUSED struct DjuiBase* base) { djui_panel_back(); } -struct DjuiThreePanel* djui_panel_menu_create(char* headerText) { +struct DjuiThreePanel* djui_panel_menu_create(char* headerText, bool forcedLeftSide) { struct DjuiThreePanel* panel = djui_three_panel_create(&gDjuiRoot->base, 64, 0, 0); struct DjuiTheme* theme = gDjuiThemes[configDjuiTheme]; struct DjuiThreePanelTheme three = theme->threePanels; - bool center = configDjuiThemeCenter && - strcmp(headerText, DLANG(HOST_MODS, MODS)) && - strcmp(headerText, DLANG(HOST_MODS, ROMHACKS)) && - strcmp(headerText, DLANG(LOBBIES, PUBLIC_LOBBIES)) && - strcmp(headerText, DLANG(LOBBIES, PRIVATE_LOBBIES)) && - strcmp(headerText, DLANG(JOIN_MESSAGE, JOINING)) && - strcmp(headerText, DLANG(PLAYER, PLAYER_TITLE)) && - strcmp(headerText, DLANG(PLAYER, PALETTE)) && - strcmp(headerText, DLANG(DYNOS, DYNOS)); + bool center = !forcedLeftSide && configDjuiThemeCenter; f32 widthMultiplier = center ? DJUI_THEME_CENTERED_WIDTH : 1.0f; f32 heightMultiplier = center ? DJUI_THEME_CENTERED_HEIGHT : 1.0f; diff --git a/src/pc/djui/djui_panel_menu.h b/src/pc/djui/djui_panel_menu.h index 4c8f731d..db15f91e 100644 --- a/src/pc/djui/djui_panel_menu.h +++ b/src/pc/djui/djui_panel_menu.h @@ -2,4 +2,4 @@ #include "djui.h" void djui_panel_menu_back(struct DjuiBase* base); -struct DjuiThreePanel* djui_panel_menu_create(char* headerText); +struct DjuiThreePanel* djui_panel_menu_create(char* headerText, bool forcedLeftSide); diff --git a/src/pc/djui/djui_panel_menu_options.c b/src/pc/djui/djui_panel_menu_options.c index f186e62c..264816cd 100644 --- a/src/pc/djui/djui_panel_menu_options.c +++ b/src/pc/djui/djui_panel_menu_options.c @@ -50,7 +50,7 @@ static void djui_panel_menu_options_djui_setting_change(UNUSED struct DjuiBase* } void djui_panel_main_menu_create(struct DjuiBase* caller) { - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(MENU_OPTIONS, MENU_TITLE)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(MENU_OPTIONS, MENU_TITLE), false); struct DjuiBase* body = djui_three_panel_get_body(panel); { diff --git a/src/pc/djui/djui_panel_misc.c b/src/pc/djui/djui_panel_misc.c index ccce9960..4407f6ac 100644 --- a/src/pc/djui/djui_panel_misc.c +++ b/src/pc/djui/djui_panel_misc.c @@ -23,7 +23,7 @@ static void djui_panel_compatibility_checkbox_on_value_change(UNUSED struct Djui #ifdef DEVELOPMENT void djui_panel_options_debug_create(struct DjuiBase* caller) { - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(MISC, DEBUG_TITLE)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(MISC, DEBUG_TITLE), false); struct DjuiBase* body = djui_three_panel_get_body(panel); { @@ -59,7 +59,7 @@ static void djui_panel_options_open_user_folder(UNUSED struct DjuiBase* caller) } void djui_panel_misc_create(struct DjuiBase* caller) { - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(MISC, MISC_TITLE)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(MISC, MISC_TITLE), false); struct DjuiBase* body = djui_three_panel_get_body(panel); djui_themes_init(); @@ -69,7 +69,7 @@ void djui_panel_misc_create(struct DjuiBase* caller) { #ifndef DEVELOPMENT djui_checkbox_create(body, DLANG(MISC, LUA_PROFILER), &configLuaProfiler, NULL); #endif - + djui_button_create(body, DLANG(MISC, LANGUAGE), DJUI_BUTTON_STYLE_NORMAL, djui_panel_language_create); djui_button_create(body, DLANG(MISC, MENU_OPTIONS), DJUI_BUTTON_STYLE_NORMAL, djui_panel_main_menu_create); djui_button_create(body, DLANG(MISC, INFORMATION), DJUI_BUTTON_STYLE_NORMAL, djui_panel_info_create); diff --git a/src/pc/djui/djui_panel_mod_menu.c b/src/pc/djui/djui_panel_mod_menu.c index abd18d06..fcf081cf 100644 --- a/src/pc/djui/djui_panel_mod_menu.c +++ b/src/pc/djui/djui_panel_mod_menu.c @@ -96,7 +96,7 @@ void djui_panel_mod_menu_mod_create(struct DjuiBase* caller) { } if (mod == NULL) { return; } - struct DjuiThreePanel* panel = djui_panel_menu_create(to_uppercase(mod->name)); + struct DjuiThreePanel* panel = djui_panel_menu_create(to_uppercase(mod->name), false); struct DjuiBase* body = djui_three_panel_get_body(panel); { struct DjuiPaginated* paginated = djui_paginated_create(body, 8); @@ -115,7 +115,7 @@ void djui_panel_mod_menu_mod_create(struct DjuiBase* caller) { } void djui_panel_mod_menu_create(struct DjuiBase* caller) { - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(PAUSE, MOD_MENU_TITLE)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(PAUSE, MOD_MENU_TITLE), false); struct DjuiBase* body = djui_three_panel_get_body(panel); { struct DjuiPaginated* paginated = djui_paginated_create(body, 8); diff --git a/src/pc/djui/djui_panel_modlist.c b/src/pc/djui/djui_panel_modlist.c index ae83edb4..d1ad54e5 100644 --- a/src/pc/djui/djui_panel_modlist.c +++ b/src/pc/djui/djui_panel_modlist.c @@ -22,7 +22,7 @@ void djui_panel_modlist_create(UNUSED struct DjuiBase* caller) { if (gActiveMods.entryCount == 0) { return; } f32 bodyHeight = (gActiveMods.entryCount * 32) + (gActiveMods.entryCount - 1) * 4; - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(MODLIST, MODS)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(MODLIST, MODS), false); djui_three_panel_set_body_size(panel, bodyHeight); gDjuiModList = panel; diff --git a/src/pc/djui/djui_panel_options.c b/src/pc/djui/djui_panel_options.c index 977939d2..37e8ea1b 100644 --- a/src/pc/djui/djui_panel_options.c +++ b/src/pc/djui/djui_panel_options.c @@ -18,7 +18,7 @@ static void djui_panel_options_back(struct DjuiBase* caller) { } void djui_panel_options_create(struct DjuiBase* caller) { - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(OPTIONS, OPTIONS)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(OPTIONS, OPTIONS), false); struct DjuiBase* body = djui_three_panel_get_body(panel); { if (gDjuiInMainMenu) { diff --git a/src/pc/djui/djui_panel_pause.c b/src/pc/djui/djui_panel_pause.c index 16c82887..3636da3f 100644 --- a/src/pc/djui/djui_panel_pause.c +++ b/src/pc/djui/djui_panel_pause.c @@ -55,7 +55,7 @@ void djui_panel_pause_create(struct DjuiBase* caller) { if (gDjuiChatBoxFocus) { djui_chat_box_toggle(); } struct DjuiBase* defaultBase = NULL; - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(PAUSE, PAUSE_TITLE)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(PAUSE, PAUSE_TITLE), false); struct DjuiBase* body = djui_three_panel_get_body(panel); { struct DjuiRect* rect1 = djui_rect_container_create(body, 64); diff --git a/src/pc/djui/djui_panel_player.c b/src/pc/djui/djui_panel_player.c index 219f7b58..8ccc9dd0 100644 --- a/src/pc/djui/djui_panel_player.c +++ b/src/pc/djui/djui_panel_player.c @@ -221,7 +221,7 @@ static void djui_panel_player_edit_palette_create(struct DjuiBase* caller) { char* sPartStrings[PLAYER_PART_MAX] = { DLANG(PLAYER, OVERALLS), DLANG(PLAYER, SHIRT), DLANG(PLAYER, GLOVES), DLANG(PLAYER, SHOES), DLANG(PLAYER, HAIR), DLANG(PLAYER, SKIN), DLANG(PLAYER, CAP), DLANG(PLAYER, EMBLEM) }; - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(PLAYER, PALETTE)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(PLAYER, PALETTE), true); // A bit of a gross hack to send out palette changes and update the palette preset selection box on unpause AND // pressing the Back button @@ -395,7 +395,7 @@ void djui_panel_player_create(struct DjuiBase* caller) { djui_panel_player_update_camera_cutscene(); gDjuiInPlayerMenu = true; - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(PLAYER, PLAYER_TITLE)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(PLAYER, PLAYER_TITLE), true); struct DjuiBase* body = djui_three_panel_get_body(panel); { struct DjuiRect* rect1 = djui_rect_container_create(body, 32); diff --git a/src/pc/djui/djui_panel_playerlist.c b/src/pc/djui/djui_panel_playerlist.c index 82119f22..f2f168a0 100644 --- a/src/pc/djui/djui_panel_playerlist.c +++ b/src/pc/djui/djui_panel_playerlist.c @@ -82,7 +82,7 @@ void djui_panel_playerlist_on_render_pre(UNUSED struct DjuiBase* base, UNUSED bo void djui_panel_playerlist_create(UNUSED struct DjuiBase* caller) { f32 bodyHeight = (sPlayerListSize * 32) + (sPlayerListSize - 1) * 4; - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(PLAYER_LIST, PLAYERS)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(PLAYER_LIST, PLAYERS), false); djui_three_panel_set_body_size(panel, bodyHeight); gDjuiPlayerList = panel; panel->base.on_render_pre = djui_panel_playerlist_on_render_pre; diff --git a/src/pc/djui/djui_panel_rules.c b/src/pc/djui/djui_panel_rules.c index e8ae5e1d..dab0998a 100644 --- a/src/pc/djui/djui_panel_rules.c +++ b/src/pc/djui/djui_panel_rules.c @@ -19,7 +19,7 @@ static void djui_panel_rules_accept(struct DjuiBase* caller) { } void djui_panel_rules_create(struct DjuiBase* caller) { - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(RULES, RULES_TITLE)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(RULES, RULES_TITLE), false); struct DjuiBase* body = djui_three_panel_get_body(panel); { snprintf(sRules, 512, "%s\n\ diff --git a/src/pc/djui/djui_panel_sound.c b/src/pc/djui/djui_panel_sound.c index 2ffd0f42..f30d08ea 100644 --- a/src/pc/djui/djui_panel_sound.c +++ b/src/pc/djui/djui_panel_sound.c @@ -10,7 +10,7 @@ static void djui_panel_sound_value_change(UNUSED struct DjuiBase* caller) { } void djui_panel_sound_create(struct DjuiBase* caller) { - struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(SOUND, SOUND)); + struct DjuiThreePanel* panel = djui_panel_menu_create(DLANG(SOUND, SOUND), false); struct DjuiBase* body = djui_three_panel_get_body(panel); { djui_slider_create(body, DLANG(SOUND, MASTER_VOLUME), &configMasterVolume, 0, 127, djui_panel_sound_value_change);