mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-29 19:15:38 +00:00
FullscreenUI: Add more missing options
This commit is contained in:
parent
35f272b336
commit
26159981ce
|
@ -943,38 +943,36 @@ void FullscreenUI::DrawLandingWindow()
|
|||
|
||||
BeginMenuButtons(7, 0.5f);
|
||||
|
||||
if (MenuButton(" " ICON_FA_PLAY_CIRCLE " Resume",
|
||||
"Starts the console from where it was before it was last closed."))
|
||||
if (MenuButton(ICON_FA_PLAY_CIRCLE " Resume", "Starts the console from where it was before it was last closed."))
|
||||
{
|
||||
System::GetMostRecentResumeSaveStatePath();
|
||||
DoResume();
|
||||
}
|
||||
|
||||
if (MenuButton(" " ICON_FA_FOLDER_OPEN " Start File", "Launch a game by selecting a file/disc image."))
|
||||
if (MenuButton(ICON_FA_FOLDER_OPEN " Start File", "Launch a game by selecting a file/disc image."))
|
||||
{
|
||||
DoStartFile();
|
||||
}
|
||||
|
||||
if (MenuButton(" " ICON_FA_TOOLBOX " Start BIOS", "Start the console without any disc inserted."))
|
||||
if (MenuButton(ICON_FA_TOOLBOX " Start BIOS", "Start the console without any disc inserted."))
|
||||
{
|
||||
DoStartBIOS();
|
||||
}
|
||||
|
||||
if (MenuButton(" " ICON_FA_UNDO " Load State", "Loads a global save state."))
|
||||
if (MenuButton(ICON_FA_UNDO " Load State", "Loads a global save state."))
|
||||
{
|
||||
OpenSaveStateSelector(true);
|
||||
}
|
||||
|
||||
if (MenuButton(" " ICON_FA_LIST " Open Game List",
|
||||
"Launch a game from images scanned from your game directories."))
|
||||
if (MenuButton(ICON_FA_LIST " Open Game List", "Launch a game from images scanned from your game directories."))
|
||||
{
|
||||
SwitchToGameList();
|
||||
}
|
||||
|
||||
if (MenuButton(" " ICON_FA_SLIDERS_H " Settings", "Change settings for the emulator."))
|
||||
if (MenuButton(ICON_FA_SLIDERS_H " Settings", "Change settings for the emulator."))
|
||||
SwitchToSettings();
|
||||
|
||||
if (MenuButton(" " ICON_FA_SIGN_OUT_ALT " Exit", "Exits the program."))
|
||||
if (MenuButton(ICON_FA_SIGN_OUT_ALT " Exit", "Exits the program."))
|
||||
{
|
||||
DoRequestExit();
|
||||
}
|
||||
|
@ -1917,7 +1915,7 @@ void FullscreenUI::DrawSettingsWindow()
|
|||
|
||||
if (BeginFullscreenWindow(ImVec2(0.0f, 0.0f), heading_size, "settings_category", UIPrimaryColor))
|
||||
{
|
||||
static constexpr float ITEM_WIDTH = 22.0f;
|
||||
static constexpr float ITEM_WIDTH = 25.0f;
|
||||
|
||||
static constexpr const char* global_icons[] = {
|
||||
ICON_FA_WINDOW_MAXIMIZE, ICON_FA_LIST, ICON_FA_HDD, ICON_FA_SLIDERS_H,
|
||||
|
@ -1972,7 +1970,7 @@ void FullscreenUI::DrawSettingsWindow()
|
|||
ReturnToMainWindow();
|
||||
|
||||
if (s_game_settings_entry)
|
||||
NavTitle(fmt::format("{} ({})", titles[static_cast<u32>(pages[index])], s_game_settings_entry->title).c_str());
|
||||
NavTitle(s_game_settings_entry->title.c_str());
|
||||
else
|
||||
NavTitle(titles[static_cast<u32>(pages[index])]);
|
||||
|
||||
|
@ -2123,64 +2121,73 @@ void FullscreenUI::DrawInterfaceSettingsPage()
|
|||
|
||||
MenuHeading("Behavior");
|
||||
|
||||
DrawToggleSetting(bsi, "Pause On Start", "Pauses the emulator when a game is started.", "Main", "StartPaused", false);
|
||||
DrawToggleSetting(bsi, "Pause On Focus Loss",
|
||||
DrawToggleSetting(bsi, ICON_FA_PAUSE " Pause On Start", "Pauses the emulator when a game is started.", "Main",
|
||||
"StartPaused", false);
|
||||
DrawToggleSetting(bsi, ICON_FA_VIDEO " Pause On Focus Loss",
|
||||
"Pauses the emulator when you minimize the window or switch to another "
|
||||
"application, and unpauses when you switch back.",
|
||||
"Main", "PauseOnFocusLoss", false);
|
||||
DrawToggleSetting(bsi, "Pause On Menu",
|
||||
DrawToggleSetting(bsi, ICON_FA_WINDOW_MAXIMIZE " Pause On Menu",
|
||||
"Pauses the emulator when you open the quick menu, and unpauses when you close it.", "Main",
|
||||
"PauseOnMenu", true);
|
||||
DrawToggleSetting(bsi, "Confirm Power Off",
|
||||
DrawToggleSetting(bsi, ICON_FA_POWER_OFF " Confirm Power Off",
|
||||
"Determines whether a prompt will be displayed to confirm shutting down the emulator/game "
|
||||
"when the hotkey is pressed.",
|
||||
"Main", "ConfirmPowerOff", true);
|
||||
DrawToggleSetting(bsi, "Save State On Exit",
|
||||
DrawToggleSetting(bsi, ICON_FA_SAVE " Save State On Exit",
|
||||
"Automatically saves the emulator state when powering down or exiting. You can then "
|
||||
"resume directly from where you left off next time.",
|
||||
"Main", "SaveStateOnExit", true);
|
||||
DrawToggleSetting(bsi, "Start Fullscreen", "Automatically switches to fullscreen mode when the program is started.",
|
||||
"Main", "StartFullscreen", false);
|
||||
DrawToggleSetting(bsi, "Hide Cursor In Fullscreen",
|
||||
DrawToggleSetting(bsi, ICON_FA_TV " Start Fullscreen",
|
||||
"Automatically switches to fullscreen mode when the program is started.", "Main", "StartFullscreen",
|
||||
false);
|
||||
DrawToggleSetting(bsi, ICON_FA_MOUSE " Double-Click Toggles Fullscreen",
|
||||
"Switches between full screen and windowed when the window is double-clicked.", "Main",
|
||||
"DoubleClickTogglesFullscreen", true);
|
||||
DrawToggleSetting(bsi, ICON_FA_MOUSE_POINTER "Hide Cursor In Fullscreen",
|
||||
"Hides the mouse pointer/cursor when the emulator is in fullscreen mode.", "Main",
|
||||
"HideCursorInFullscreen", true);
|
||||
DrawToggleSetting(bsi, "Inhibit Screensaver",
|
||||
DrawToggleSetting(bsi, ICON_FA_MAGIC " Inhibit Screensaver",
|
||||
"Prevents the screen saver from activating and the host from sleeping while emulation is running.",
|
||||
"Main", "InhibitScreensaver", true);
|
||||
DrawToggleSetting(bsi, "Load Devices From Save States",
|
||||
DrawToggleSetting(bsi, ICON_FA_GAMEPAD " Load Devices From Save States",
|
||||
"When enabled, memory cards and controllers will be overwritten when save states are loaded.",
|
||||
"Main", "LoadDevicesFromSaveStates", false);
|
||||
DrawToggleSetting(bsi, "Apply Per-Game Settings",
|
||||
DrawToggleSetting(bsi, ICON_FA_COGS " Apply Per-Game Settings",
|
||||
"When enabled, per-game settings will be applied, and incompatible enhancements will be disabled.",
|
||||
"Main", "ApplyGameSettings", true);
|
||||
DrawToggleSetting(bsi, "Automatically Load Cheats", "Automatically loads and applies cheats on game start.", "Main",
|
||||
"AutoLoadCheats", true);
|
||||
DrawToggleSetting(bsi, ICON_FA_FROWN " Automatically Load Cheats",
|
||||
"Automatically loads and applies cheats on game start.", "Main", "AutoLoadCheats", true);
|
||||
|
||||
#ifdef WITH_DISCORD_PRESENCE
|
||||
MenuHeading("Integration");
|
||||
DrawToggleSetting(bsi, "Enable Discord Presence",
|
||||
DrawToggleSetting(bsi, ICON_FA_CHARGING_STATION " Enable Discord Presence",
|
||||
"Shows the game you are currently playing as part of your profile on Discord.", "Main",
|
||||
"EnableDiscordPresence", false);
|
||||
#endif
|
||||
|
||||
MenuHeading("On-Screen Display");
|
||||
DrawToggleSetting(bsi, "Show OSD Messages", "Shows on-screen-display messages when events occur.", "Display",
|
||||
"ShowOSDMessages", true);
|
||||
DrawToggleSetting(bsi, "Show Game Frame Rate",
|
||||
"Shows the internal frame rate of the game in the top-right corner of the display.", "Display",
|
||||
"ShowFPS", false);
|
||||
DrawToggleSetting(bsi, "Show FPS",
|
||||
"Shows the number of frames (or v-syncs) displayed per second by the system "
|
||||
"in the top-right corner of the display.",
|
||||
"Display", "ShowFPS", false);
|
||||
DrawIntRangeSetting(bsi, ICON_FA_SEARCH " OSD Scale", "Determines how large the on-screen messages and monitor are.",
|
||||
"Display", "OSDScale", 100, 25, 500, "%d%%");
|
||||
DrawToggleSetting(bsi, ICON_FA_LIST " Show OSD Messages", "Shows on-screen-display messages when events occur.",
|
||||
"Display", "ShowOSDMessages", true);
|
||||
DrawToggleSetting(
|
||||
bsi, "Show Speed",
|
||||
bsi, ICON_FA_CLOCK " Show Speed",
|
||||
"Shows the current emulation speed of the system in the top-right corner of the display as a percentage.",
|
||||
"Display", "ShowSpeed", false);
|
||||
DrawToggleSetting(bsi, "Show Resolution",
|
||||
DrawToggleSetting(bsi, ICON_FA_RULER " Show FPS",
|
||||
"Shows the number of frames (or v-syncs) displayed per second by the system in the top-right "
|
||||
"corner of the display.",
|
||||
"Display", "ShowFPS", false);
|
||||
DrawToggleSetting(bsi, ICON_FA_BATTERY_HALF " Show CPU Usage",
|
||||
"Shows the CPU usage based on threads in the top-right corner of the display.", "Display",
|
||||
"ShowCPU", false);
|
||||
DrawToggleSetting(bsi, ICON_FA_SPINNER " Show GPU Usage",
|
||||
"Shows the host's GPU usage in the top-right corner of the display.", "Display", "ShowGPU", false);
|
||||
DrawToggleSetting(bsi, ICON_FA_RULER_VERTICAL " Show Resolution",
|
||||
"Shows the current rendering resolution of the system in the top-right corner of the display.",
|
||||
"Display", "ShowResolution", false);
|
||||
DrawToggleSetting(bsi, "Show Controller Input",
|
||||
DrawToggleSetting(bsi, ICON_FA_GAMEPAD " Show Controller Input",
|
||||
"Shows the current controller state of the system in the bottom-left corner of the display.",
|
||||
"Display", "ShowInputs", false);
|
||||
|
||||
|
@ -2666,8 +2673,7 @@ void FullscreenUI::DrawControllerSettingsPage()
|
|||
}
|
||||
}
|
||||
|
||||
if (MenuButton(ICON_FA_FOLDER_OPEN " Load Profile",
|
||||
"Replaces these settings with a previously saved input profile."))
|
||||
if (MenuButton(ICON_FA_FOLDER_OPEN " Load Profile", "Replaces these settings with a previously saved input profile."))
|
||||
{
|
||||
DoLoadInputProfile();
|
||||
}
|
||||
|
@ -3426,8 +3432,8 @@ void FullscreenUI::DrawAchievementsSettingsPage()
|
|||
if (Achievements::IsUsingRAIntegration())
|
||||
{
|
||||
BeginMenuButtons();
|
||||
ActiveButton(ICON_FA_BAN " RAIntegration is being used instead of the built-in achievements implementation.",
|
||||
false, false, LAYOUT_MENU_BUTTON_HEIGHT_NO_SUMMARY);
|
||||
ActiveButton(ICON_FA_BAN " RAIntegration is being used instead of the built-in achievements implementation.", false,
|
||||
false, LAYOUT_MENU_BUTTON_HEIGHT_NO_SUMMARY);
|
||||
EndMenuButtons();
|
||||
return;
|
||||
}
|
||||
|
@ -3484,8 +3490,8 @@ void FullscreenUI::DrawAchievementsSettingsPage()
|
|||
ts_string.AppendFmtString(
|
||||
"{:%Y-%m-%d %H:%M:%S}",
|
||||
fmt::localtime(StringUtil::FromChars<u64>(bsi->GetStringValue("Cheevos", "LoginTimestamp", "0")).value_or(0)));
|
||||
ActiveButton(SmallString::FromFormat(ICON_FA_CLOCK " Login token generated on %s", ts_string.GetCharArray()),
|
||||
false, false, ImGuiFullscreen::LAYOUT_MENU_BUTTON_HEIGHT_NO_SUMMARY);
|
||||
ActiveButton(SmallString::FromFormat(ICON_FA_CLOCK " Login token generated on %s", ts_string.GetCharArray()), false,
|
||||
false, ImGuiFullscreen::LAYOUT_MENU_BUTTON_HEIGHT_NO_SUMMARY);
|
||||
ImGui::PopStyleColor();
|
||||
|
||||
if (MenuButton(ICON_FA_KEY " Logout", "Logs out of RetroAchievements."))
|
||||
|
|
|
@ -461,20 +461,21 @@ bool ImGuiManager::AddIconFonts(float size)
|
|||
static constexpr ImWchar range_fa[] = {
|
||||
0xf002, 0xf002, 0xf005, 0xf005, 0xf007, 0xf007, 0xf00c, 0xf00e, 0xf011, 0xf011, 0xf013, 0xf013, 0xf017, 0xf017,
|
||||
0xf019, 0xf019, 0xf021, 0xf021, 0xf025, 0xf025, 0xf027, 0xf028, 0xf02d, 0xf02e, 0xf030, 0xf030, 0xf03a, 0xf03a,
|
||||
0xf049, 0xf04c, 0xf050, 0xf050, 0xf059, 0xf059, 0xf05e, 0xf05e, 0xf065, 0xf065, 0xf067, 0xf067, 0xf071, 0xf071,
|
||||
0xf075, 0xf075, 0xf077, 0xf078, 0xf07b, 0xf07c, 0xf084, 0xf084, 0xf091, 0xf091, 0xf0a0, 0xf0a0, 0xf0ac, 0xf0ad,
|
||||
0xf0c5, 0xf0c5, 0xf0c7, 0xf0c8, 0xf0cb, 0xf0cb, 0xf0d0, 0xf0d0, 0xf0e2, 0xf0e2, 0xf0eb, 0xf0eb, 0xf0f1, 0xf0f1,
|
||||
0xf0f3, 0xf0f3, 0xf0fe, 0xf0fe, 0xf119, 0xf119, 0xf11b, 0xf11c, 0xf140, 0xf140, 0xf144, 0xf144, 0xf14a, 0xf14a,
|
||||
0xf15b, 0xf15b, 0xf188, 0xf188, 0xf191, 0xf192, 0xf1dd, 0xf1de, 0xf1e6, 0xf1e6, 0xf1eb, 0xf1eb, 0xf1f8, 0xf1f8,
|
||||
0xf26c, 0xf26c, 0xf279, 0xf279, 0xf2d0, 0xf2d0, 0xf2db, 0xf2db, 0xf2f2, 0xf2f2, 0xf2f5, 0xf2f5, 0xf410, 0xf410,
|
||||
0xf466, 0xf466, 0xf500, 0xf500, 0xf51f, 0xf51f, 0xf552, 0xf552, 0xf57a, 0xf57a, 0xf5a2, 0xf5a2, 0xf65d, 0xf65e,
|
||||
0xf6a9, 0xf6a9, 0xf7c2, 0xf7c2, 0xf807, 0xf807, 0xf815, 0xf815, 0xf818, 0xf818, 0x0, 0x0};
|
||||
0xf03d, 0xf03d, 0xf049, 0xf04c, 0xf050, 0xf050, 0xf059, 0xf059, 0xf05e, 0xf05e, 0xf065, 0xf065, 0xf067, 0xf067,
|
||||
0xf071, 0xf071, 0xf075, 0xf075, 0xf077, 0xf078, 0xf07b, 0xf07c, 0xf084, 0xf085, 0xf091, 0xf091, 0xf0a0, 0xf0a0,
|
||||
0xf0ac, 0xf0ad, 0xf0c5, 0xf0c5, 0xf0c7, 0xf0c8, 0xf0cb, 0xf0cb, 0xf0d0, 0xf0d0, 0xf0e2, 0xf0e2, 0xf0eb, 0xf0eb,
|
||||
0xf0f1, 0xf0f1, 0xf0f3, 0xf0f3, 0xf0fe, 0xf0fe, 0xf110, 0xf110, 0xf119, 0xf119, 0xf11b, 0xf11c, 0xf140, 0xf140,
|
||||
0xf144, 0xf144, 0xf14a, 0xf14a, 0xf15b, 0xf15b, 0xf188, 0xf188, 0xf191, 0xf192, 0xf1dd, 0xf1de, 0xf1e6, 0xf1e6,
|
||||
0xf1eb, 0xf1eb, 0xf1f8, 0xf1f8, 0xf242, 0xf242, 0xf245, 0xf245, 0xf26c, 0xf26c, 0xf279, 0xf279, 0xf2d0, 0xf2d0,
|
||||
0xf2db, 0xf2db, 0xf2f2, 0xf2f2, 0xf2f5, 0xf2f5, 0xf410, 0xf410, 0xf466, 0xf466, 0xf500, 0xf500, 0xf51f, 0xf51f,
|
||||
0xf545, 0xf545, 0xf548, 0xf548, 0xf552, 0xf552, 0xf57a, 0xf57a, 0xf5a2, 0xf5a2, 0xf5e7, 0xf5e7, 0xf65d, 0xf65e,
|
||||
0xf6a9, 0xf6a9, 0xf7c2, 0xf7c2, 0xf807, 0xf807, 0xf815, 0xf815, 0xf818, 0xf818, 0xf8cc, 0xf8cc, 0x0, 0x0};
|
||||
|
||||
ImFontConfig cfg;
|
||||
cfg.MergeMode = true;
|
||||
cfg.PixelSnapH = true;
|
||||
cfg.GlyphMinAdvanceX = size * 0.75f;
|
||||
cfg.GlyphMaxAdvanceX = size * 0.75f;
|
||||
cfg.GlyphMinAdvanceX = size;
|
||||
cfg.GlyphMaxAdvanceX = size;
|
||||
cfg.FontDataOwnedByAtlas = false;
|
||||
|
||||
return (ImGui::GetIO().Fonts->AddFontFromMemoryTTF(s_icon_font_data.data(), static_cast<int>(s_icon_font_data.size()),
|
||||
|
|
Loading…
Reference in a new issue