Implement correct word wrapping for popup notices that don't fit on the screen

This commit is contained in:
Henrik Rydgård
2025-11-27 19:34:46 +01:00
parent e5bafa4264
commit 56feb8692f
3 changed files with 34 additions and 30 deletions
+2 -2
View File
@@ -384,10 +384,10 @@ void DeveloperToolsScreen::CreateUITab(UI::LinearLayout *list) {
g_OSD.Show(OSDType::MESSAGE_ERROR, str);
});
list->Add(new Choice(si->T("Warning")))->OnClick.Add([&](UI::EventParams &) {
g_OSD.Show(OSDType::MESSAGE_WARNING, "Warning", "Some\nAdditional\nDetail");
g_OSD.Show(OSDType::MESSAGE_WARNING, "Warning, a pretty long warning heading", "Some\nAdditional\nDetail, some of which is very, very long and wide and will need line wrapping on most screens.");
});
list->Add(new Choice(si->T("Info")))->OnClick.Add([&](UI::EventParams &) {
g_OSD.Show(OSDType::MESSAGE_INFO, "Info");
g_OSD.Show(OSDType::MESSAGE_INFO, "Info, info info info info info info info info info info");
});
// This one is clickable
list->Add(new Choice(si->T("Success")))->OnClick.Add([&](UI::EventParams &) {