From f5059f994851cb6c30d8b434053cd747d292f1b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 22 Oct 2026 08:54:05 +0200 Subject: [PATCH] DevTools: Encode the notification positions like the other screens do None is -1, but the developer tools list had it last at index 8, which is CENTER. Building the tab clamped None to Bottom Left, and picking None showed notifications centered instead. Co-Authored-By: Claude Opus 5.5 (1M context) --- UI/DeveloperToolsScreen.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/UI/DeveloperToolsScreen.cpp b/UI/DeveloperToolsScreen.cpp index d2fb09a7ad..38e1c9471e 100644 --- a/UI/DeveloperToolsScreen.cpp +++ b/UI/DeveloperToolsScreen.cpp @@ -425,7 +425,8 @@ void DeveloperToolsScreen::CreateUITab(UI::LinearLayout *list) { list->Add(new ItemHeader(si->T("Slider test"))); list->Add(new Slider(&testSliderValue_, 0, 100, 1, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT))); - static const char *positions[] = {"Bottom Left", "Bottom Center", "Bottom Right", "Top Left", "Top Center", "Top Right", "Center Left", "Center Right", "None"}; + // Same encoding as in GameSettingsScreen: None is -1. + static const char *positions[] = { "None", "Bottom Left", "Bottom Center", "Bottom Right", "Top Left", "Top Center", "Top Right", "Center Left", "Center Right" }; list->Add(new ItemHeader(si->T("Notification tests"))); list->Add(new Choice(si->T("Error")))->OnClick.Add([&](UI::EventParams &) { @@ -476,8 +477,8 @@ void DeveloperToolsScreen::CreateUITab(UI::LinearLayout *list) { }); list->Add(new ItemHeader(ac->T("Notifications"))); - list->Add(new PopupMultiChoice(&g_Config.iNotificationPos, sy->T("Notification screen position"), positions, 0, ARRAY_SIZE(positions), I18NCat::DIALOG, screenManager())); - list->Add(new PopupMultiChoice(&g_Config.iAchievementsLeaderboardTrackerPos, ac->T("Leaderboard tracker"), positions, 0, ARRAY_SIZE(positions), I18NCat::DIALOG, screenManager())); + list->Add(new PopupMultiChoice(&g_Config.iNotificationPos, sy->T("Notification screen position"), positions, -1, ARRAY_SIZE(positions), I18NCat::DIALOG, screenManager())); + list->Add(new PopupMultiChoice(&g_Config.iAchievementsLeaderboardTrackerPos, ac->T("Leaderboard tracker"), positions, -1, ARRAY_SIZE(positions), I18NCat::DIALOG, screenManager())); #ifdef _DEBUG list->Add(new CheckBox(&pretendIngame_, ac->T("Pretend to be in-game (for testing)")));