FSUI: Fix and Tweak BPM Buttons and Legends

This commit is contained in:
KamFretoZ 2024-10-26 19:31:58 +07:00 committed by Ty
parent 0c204c3ebb
commit ac32e6ca92
2 changed files with 69 additions and 42 deletions

View File

@ -506,9 +506,9 @@ void FullscreenUI::GetStandardSelectionFooterText(SmallStringBase& dest, bool ba
{
ImGuiFullscreen::CreateFooterTextString(
dest,
std::array{std::make_pair(ICON_PF_XBOX_DPAD_UP_DOWN, FSUI_VSTR("Change Selection")),
std::make_pair(ICON_PF_BUTTON_A, FSUI_VSTR("Select")),
std::make_pair(ICON_PF_BUTTON_B, back_instead_of_cancel ? FSUI_VSTR("Back") : FSUI_VSTR("Cancel"))});
std::array{std::make_pair(ICON_PF_DPAD_UP_DOWN, FSUI_VSTR("Change Selection")),
std::make_pair(ICON_PF_BUTTON_CROSS, FSUI_VSTR("Select")),
std::make_pair(ICON_PF_BUTTON_CIRCLE, back_instead_of_cancel ? FSUI_VSTR("Back") : FSUI_VSTR("Cancel"))});
}
else
{
@ -536,10 +536,10 @@ void ImGuiFullscreen::GetFileSelectorHelpText(SmallStringBase& dest)
if (IsGamepadInputSource())
{
ImGuiFullscreen::CreateFooterTextString(
dest, std::array{std::make_pair(ICON_PF_XBOX_DPAD_UP_DOWN, FSUI_VSTR("Change Selection")),
std::make_pair(ICON_PF_BUTTON_Y, FSUI_VSTR("Parent Directory")),
std::make_pair(ICON_PF_BUTTON_A, FSUI_VSTR("Select")),
std::make_pair(ICON_PF_BUTTON_B, FSUI_VSTR("Cancel"))});
dest, std::array{std::make_pair(ICON_PF_DPAD_UP_DOWN, FSUI_VSTR("Change Selection")),
std::make_pair(ICON_PF_BUTTON_TRIANGLE, FSUI_VSTR("Parent Directory")),
std::make_pair(ICON_PF_BUTTON_CROSS, FSUI_VSTR("Select")),
std::make_pair(ICON_PF_BUTTON_CIRCLE, FSUI_VSTR("Cancel"))});
}
else
{
@ -556,8 +556,8 @@ void ImGuiFullscreen::GetInputDialogHelpText(SmallStringBase& dest)
if (IsGamepadInputSource())
{
CreateFooterTextString(dest, std::array{std::make_pair(ICON_PF_KEYBOARD, FSUI_VSTR("Enter Value")),
std::make_pair(ICON_PF_BUTTON_A, FSUI_VSTR("Select")),
std::make_pair(ICON_PF_BUTTON_B, FSUI_VSTR("Cancel"))});
std::make_pair(ICON_PF_BUTTON_CROSS, FSUI_VSTR("Select")),
std::make_pair(ICON_PF_BUTTON_CIRCLE, FSUI_VSTR("Cancel"))});
}
else
{
@ -1295,19 +1295,24 @@ void FullscreenUI::DrawLandingWindow()
if (!AreAnyDialogsOpen())
{
if (ImGui::IsKeyPressed(ImGuiKey_GamepadStart, false) || ImGui::IsKeyPressed(ImGuiKey_F1, false))
if (ImGui::IsKeyPressed(ImGuiKey_GamepadBack, false) || ImGui::IsKeyPressed(ImGuiKey_F1, false))
OpenAboutWindow();
else if (ImGui::IsKeyPressed(ImGuiKey_NavGamepadInput, false) || ImGui::IsKeyPressed(ImGuiKey_F11, false))
if (ImGui::IsKeyPressed(ImGuiKey_NavGamepadInput, false) || ImGui::IsKeyPressed(ImGuiKey_Space, false))
SwitchToGameList();
else if (ImGui::IsKeyPressed(ImGuiKey_NavGamepadMenu, false) || ImGui::IsKeyPressed(ImGuiKey_F11, false))
DoToggleFullscreen();
}
if (IsGamepadInputSource())
{
SetFullscreenFooterText(std::array{std::make_pair(ICON_PF_BURGER_MENU, FSUI_VSTR("About")),
std::make_pair(ICON_PF_BUTTON_X, FSUI_VSTR("Toggle Fullscreen")),
std::make_pair(ICON_PF_XBOX_DPAD_LEFT_RIGHT, FSUI_VSTR("Navigate")),
std::make_pair(ICON_PF_BUTTON_A, FSUI_VSTR("Select")),
std::make_pair(ICON_PF_BUTTON_B, FSUI_VSTR("Exit"))});
SetFullscreenFooterText(std::array{
std::make_pair(ICON_PF_SELECT_SHARE, FSUI_VSTR("About")),
std::make_pair(ICON_PF_DPAD_LEFT_RIGHT, FSUI_VSTR("Navigate")),
std::make_pair(ICON_PF_BUTTON_TRIANGLE, FSUI_VSTR("Game List")),
std::make_pair(ICON_PF_BUTTON_SQUARE, FSUI_VSTR("Toggle Fullscreen")),
std::make_pair(ICON_PF_BUTTON_CROSS, FSUI_VSTR("Select")),
std::make_pair(ICON_PF_BUTTON_CIRCLE, FSUI_VSTR("Exit"))
});
}
else
{
@ -1315,7 +1320,10 @@ void FullscreenUI::DrawLandingWindow()
std::make_pair(ICON_PF_F1, FSUI_VSTR("About")),
std::make_pair(ICON_PF_F11, FSUI_VSTR("Toggle Fullscreen")),
std::make_pair(ICON_PF_ARROW_LEFT ICON_PF_ARROW_RIGHT, FSUI_VSTR("Navigate")),
std::make_pair(ICON_PF_ENTER, FSUI_VSTR("Select")), std::make_pair(ICON_PF_ESC, FSUI_VSTR("Exit"))});
std::make_pair(ICON_PF_SPACE, FSUI_VSTR("Game List")),
std::make_pair(ICON_PF_ENTER, FSUI_VSTR("Select")),
std::make_pair(ICON_PF_ESC, FSUI_VSTR("Exit"))
});
}
}
@ -1369,10 +1377,10 @@ void FullscreenUI::DrawStartGameWindow()
if (IsGamepadInputSource())
{
SetFullscreenFooterText(std::array{std::make_pair(ICON_PF_XBOX_DPAD_LEFT_RIGHT, FSUI_VSTR("Navigate")),
std::make_pair(ICON_PF_BUTTON_Y, FSUI_VSTR("Load Global State")),
std::make_pair(ICON_PF_BUTTON_A, FSUI_VSTR("Select")),
std::make_pair(ICON_PF_BUTTON_B, FSUI_VSTR("Back"))});
SetFullscreenFooterText(std::array{std::make_pair(ICON_PF_DPAD_LEFT_RIGHT, FSUI_VSTR("Navigate")),
std::make_pair(ICON_PF_BUTTON_SQUARE, FSUI_VSTR("Load Global State")),
std::make_pair(ICON_PF_BUTTON_CROSS, FSUI_VSTR("Select")),
std::make_pair(ICON_PF_BUTTON_CIRCLE, FSUI_VSTR("Back"))});
}
else
{
@ -1419,7 +1427,22 @@ void FullscreenUI::DrawExitWindow()
ImGui::PopStyleColor();
SetStandardSelectionFooterText(true);
if (IsGamepadInputSource())
{
SetFullscreenFooterText(std::array{
std::make_pair(ICON_PF_DPAD_LEFT_RIGHT, FSUI_VSTR("Navigate")),
std::make_pair(ICON_PF_BUTTON_CROSS, FSUI_VSTR("Select")),
std::make_pair(ICON_PF_BUTTON_CIRCLE, FSUI_VSTR("Back"))}
);
}
else
{
SetFullscreenFooterText(std::array{
std::make_pair(ICON_PF_ARROW_LEFT ICON_PF_ARROW_RIGHT, FSUI_VSTR("Navigate")),
std::make_pair(ICON_PF_ENTER, FSUI_VSTR("Select")),
std::make_pair(ICON_PF_ESC, FSUI_VSTR("Back"))}
);
}
}
bool FullscreenUI::IsEditingGameSettings(SettingsInterface* bsi)
@ -2984,14 +3007,16 @@ void FullscreenUI::DrawSettingsWindow()
if (IsGamepadInputSource())
{
SetFullscreenFooterText(std::array{std::make_pair(ICON_PF_XBOX_DPAD_LEFT_RIGHT, FSUI_VSTR("Change Page")),
std::make_pair(ICON_PF_XBOX_DPAD_UP_DOWN, FSUI_VSTR("Navigate")),
std::make_pair(ICON_PF_BUTTON_A, FSUI_VSTR("Select")),
std::make_pair(ICON_PF_BUTTON_B, FSUI_VSTR("Back"))});
SetFullscreenFooterText(std::array{
std::make_pair(ICON_PF_DPAD_LEFT_RIGHT, FSUI_VSTR("Change Page")),
std::make_pair(ICON_PF_DPAD_UP_DOWN, FSUI_VSTR("Navigate")),
std::make_pair(ICON_PF_BUTTON_CROSS, FSUI_VSTR("Select")),
std::make_pair(ICON_PF_BUTTON_CIRCLE, FSUI_VSTR("Back"))});
}
else
{
SetFullscreenFooterText(std::array{std::make_pair(ICON_PF_ARROW_LEFT ICON_PF_ARROW_RIGHT, FSUI_VSTR("Change Page")),
SetFullscreenFooterText(std::array{
std::make_pair(ICON_PF_ARROW_LEFT ICON_PF_ARROW_RIGHT, FSUI_VSTR("Change Page")),
std::make_pair(ICON_PF_ARROW_UP ICON_PF_ARROW_DOWN, FSUI_VSTR("Navigate")),
std::make_pair(ICON_PF_ENTER, FSUI_VSTR("Select")),
std::make_pair(ICON_PF_ESC, FSUI_VSTR("Back"))});
@ -5222,9 +5247,9 @@ void FullscreenUI::DrawPauseMenu(MainWindowType type)
if (IsGamepadInputSource())
{
SetFullscreenFooterText(std::array{std::make_pair(ICON_PF_XBOX_DPAD_UP_DOWN, FSUI_VSTR("Change Selection")),
std::make_pair(ICON_PF_BUTTON_A, FSUI_VSTR("Select")),
std::make_pair(ICON_PF_BUTTON_B, FSUI_VSTR("Return To Game"))});
SetFullscreenFooterText(std::array{std::make_pair(ICON_PF_DPAD_UP_DOWN, FSUI_VSTR("Change Selection")),
std::make_pair(ICON_PF_BUTTON_CROSS, FSUI_VSTR("Select")),
std::make_pair(ICON_PF_BUTTON_CIRCLE, FSUI_VSTR("Return To Game"))});
}
else
{
@ -5655,16 +5680,17 @@ void FullscreenUI::DrawSaveStateSelector(bool is_loading)
{
if (IsGamepadInputSource())
{
SetFullscreenFooterText(std::array{std::make_pair(ICON_PF_XBOX_DPAD, FSUI_VSTR("Select State")),
std::make_pair(ICON_PF_BUTTON_Y, FSUI_VSTR("Delete State")),
std::make_pair(ICON_PF_BUTTON_A, FSUI_VSTR("Load State")),
std::make_pair(ICON_PF_BUTTON_B, FSUI_VSTR("Cancel"))});
SetFullscreenFooterText(std::array{
std::make_pair(ICON_PF_DPAD, FSUI_VSTR("Select State")),
std::make_pair(ICON_PF_BUTTON_SQUARE, FSUI_VSTR("Options")),
std::make_pair(ICON_PF_BUTTON_CROSS, FSUI_VSTR("Load/Save State")),
std::make_pair(ICON_PF_BUTTON_CIRCLE, FSUI_VSTR("Cancel"))});
}
else
{
SetFullscreenFooterText(std::array{
std::make_pair(ICON_PF_ARROW_UP ICON_PF_ARROW_DOWN ICON_PF_ARROW_LEFT ICON_PF_ARROW_RIGHT, FSUI_VSTR("Select State")),
std::make_pair(ICON_PF_F1, FSUI_VSTR("Delete State")), std::make_pair(ICON_PF_ENTER, FSUI_VSTR("Load State")),
std::make_pair(ICON_PF_F1, FSUI_VSTR("Options")), std::make_pair(ICON_PF_ENTER, FSUI_VSTR("Load/Save State")),
std::make_pair(ICON_PF_ESC, FSUI_VSTR("Cancel"))});
}
}
@ -5949,12 +5975,13 @@ void FullscreenUI::DrawGameListWindow()
if (IsGamepadInputSource())
{
SetFullscreenFooterText(std::array{std::make_pair(ICON_PF_XBOX_DPAD, FSUI_VSTR("Select Game")),
std::make_pair(ICON_PF_BUTTON_X, FSUI_VSTR("Change View")),
std::make_pair(ICON_PF_BURGER_MENU, FSUI_VSTR("Settings")),
std::make_pair(ICON_PF_BUTTON_Y, FSUI_VSTR("Launch Options")),
std::make_pair(ICON_PF_BUTTON_A, FSUI_VSTR("Start Game")),
std::make_pair(ICON_PF_BUTTON_B, FSUI_VSTR("Back"))});
SetFullscreenFooterText(std::array{
std::make_pair(ICON_PF_DPAD, FSUI_VSTR("Select Game")),
std::make_pair(ICON_PF_START, FSUI_VSTR("Settings")),
std::make_pair(ICON_PF_BUTTON_TRIANGLE, FSUI_VSTR("Change View")),
std::make_pair(ICON_PF_BUTTON_SQUARE, FSUI_VSTR("Launch Options")),
std::make_pair(ICON_PF_BUTTON_CROSS, FSUI_VSTR("Start Game")),
std::make_pair(ICON_PF_BUTTON_CIRCLE, FSUI_VSTR("Back"))});
}
else
{

View File

@ -491,7 +491,7 @@ bool ImGuiManager::AddIconFonts(float size)
{
// clang-format off
static constexpr ImWchar range_fa[] = { 0xe06f,0xe06f,0xf002,0xf002,0xf005,0xf005,0xf007,0xf007,0xf00c,0xf00e,0xf011,0xf011,0xf013,0xf013,0xf017,0xf017,0xf019,0xf019,0xf021,0xf023,0xf025,0xf028,0xf02b,0xf02b,0xf02e,0xf02e,0xf030,0xf030,0xf03a,0xf03a,0xf03d,0xf03e,0xf04b,0xf04c,0xf04e,0xf04e,0xf050,0xf050,0xf052,0xf052,0xf05e,0xf05e,0xf063,0xf063,0xf067,0xf067,0xf06a,0xf06a,0xf06e,0xf06e,0xf071,0xf071,0xf077,0xf078,0xf07b,0xf07c,0xf084,0xf084,0xf091,0xf091,0xf0ac,0xf0ad,0xf0b0,0xf0b0,0xf0c5,0xf0c5,0xf0c7,0xf0c8,0xf0cb,0xf0cb,0xf0d0,0xf0d0,0xf0dc,0xf0dc,0xf0e2,0xf0e2,0xf0eb,0xf0eb,0xf0f3,0xf0f3,0xf0fe,0xf0fe,0xf11b,0xf11c,0xf120,0xf121,0xf129,0xf12a,0xf140,0xf140,0xf14a,0xf14a,0xf15b,0xf15b,0xf15d,0xf15d,0xf187,0xf188,0xf191,0xf192,0xf1b3,0xf1b3,0xf1de,0xf1de,0xf1e6,0xf1e6,0xf1ea,0xf1eb,0xf1f8,0xf1f8,0xf1fc,0xf1fc,0xf21e,0xf21e,0xf245,0xf245,0xf26c,0xf26c,0xf279,0xf279,0xf2bd,0xf2bd,0xf2db,0xf2db,0xf2f2,0xf2f2,0xf302,0xf302,0xf3c1,0xf3c1,0xf3fd,0xf3fd,0xf410,0xf410,0xf462,0xf462,0xf466,0xf466,0xf4e2,0xf4e2,0xf51f,0xf51f,0xf545,0xf545,0xf54c,0xf54c,0xf553,0xf553,0xf56d,0xf56d,0xf5a2,0xf5a2,0xf65d,0xf65e,0xf6a9,0xf6a9,0xf70e,0xf70e,0xf756,0xf756,0xf780,0xf780,0xf794,0xf794,0xf815,0xf815,0xf84c,0xf84c,0xf8cc,0xf8cc,0x0,0x0 };
static constexpr ImWchar range_pf[] = { 0x2198,0x2199,0x219e,0x21a1,0x21b0,0x21b3,0x21ba,0x21c3,0x21d0,0x21d4,0x21dc,0x21dd,0x21e0,0x21e3,0x21f3,0x21f3,0x21f7,0x21f8,0x21fa,0x21fb,0x221a,0x221a,0x227a,0x227f,0x2284,0x2284,0x22bf,0x22c8,0x2349,0x2349,0x235a,0x235e,0x2360,0x2361,0x2364,0x2367,0x237a,0x237b,0x237d,0x237d,0x237f,0x237f,0x23b2,0x23b5,0x23cc,0x23cc,0x23f4,0x23f7,0x2427,0x243a,0x243d,0x243d,0x2443,0x2443,0x2460,0x246b,0x248f,0x248f,0x24f5,0x24fd,0x24ff,0x24ff,0x2605,0x2605,0x2699,0x2699,0x278a,0x278e,0xe001,0xe001,0xff21,0xff3a,0x0,0x0 };
static constexpr ImWchar range_pf[] = { 0x2198,0x2199,0x219e,0x21a3,0x21b0,0x21b3,0x21ba,0x21c3,0x21ce,0x21ce,0x21d0,0x21d4,0x21dc,0x21dd,0x21e0,0x21e3,0x21f3,0x21f3,0x21f7,0x21f8,0x21fa,0x21fb,0x221a,0x221a,0x227a,0x227d,0x22bf,0x22c8,0x2349,0x2349,0x235a,0x235e,0x2360,0x2361,0x2364,0x2367,0x237a,0x237b,0x237d,0x237d,0x237f,0x237f,0x23b2,0x23b5,0x23cc,0x23cc,0x23f4,0x23f7,0x2427,0x243a,0x243d,0x243d,0x2443,0x2443,0x2460,0x246b,0x248f,0x248f,0x24f5,0x24fd,0x24ff,0x24ff,0x2605,0x2605,0x2699,0x2699,0x278a,0x278e,0xe001,0xe001,0xff21,0xff3a,0x0,0x0 };
// clang-format on
{