Added a toggle for persistent message. (#2106)
* Added a toggle for persistent message. Added a toggle to display settings to disable persistent messages (ff, pause) in the fullscreen UI. * Moved toggle for the icons to advanced settings. Moved the toggle to the advanced settings as suggested. Renamed the option from "show persistent messages" to "show speed icons", so that it's much more specific.
This commit is contained in:
parent
63b70e6c0c
commit
1fa4460590
|
@ -492,6 +492,7 @@ void HostInterface::SetDefaultSettings(SettingsInterface& si)
|
|||
si.SetBoolValue("Main", "ApplyGameSettings", true);
|
||||
si.SetBoolValue("Main", "AutoLoadCheats", true);
|
||||
si.SetBoolValue("Main", "DisableAllEnhancements", false);
|
||||
si.SetBoolValue("Main", "ShowSpeedIcons", true);
|
||||
si.SetBoolValue("Main", "RewindEnable", false);
|
||||
si.SetFloatValue("Main", "RewindFrequency", 10.0f);
|
||||
si.SetIntValue("Main", "RewindSaveSlots", 10);
|
||||
|
|
|
@ -166,6 +166,7 @@ void Settings::Load(SettingsInterface& si)
|
|||
apply_game_settings = si.GetBoolValue("Main", "ApplyGameSettings", true);
|
||||
auto_load_cheats = si.GetBoolValue("Main", "AutoLoadCheats", true);
|
||||
disable_all_enhancements = si.GetBoolValue("Main", "DisableAllEnhancements", false);
|
||||
show_speed_icons = si.GetBoolValue("Main", "ShowSpeedIcons", true);
|
||||
rewind_enable = si.GetBoolValue("Main", "RewindEnable", false);
|
||||
rewind_save_frequency = si.GetFloatValue("Main", "RewindFrequency", 10.0f);
|
||||
rewind_save_slots = static_cast<u32>(si.GetIntValue("Main", "RewindSaveSlots", 10));
|
||||
|
@ -358,6 +359,7 @@ void Settings::Save(SettingsInterface& si) const
|
|||
si.SetBoolValue("Main", "ApplyGameSettings", apply_game_settings);
|
||||
si.SetBoolValue("Main", "AutoLoadCheats", auto_load_cheats);
|
||||
si.SetBoolValue("Main", "DisableAllEnhancements", disable_all_enhancements);
|
||||
si.SetBoolValue("Main", "ShowSpeedIcons", show_speed_icons);
|
||||
si.SetBoolValue("Main", "RewindEnable", rewind_enable);
|
||||
si.SetFloatValue("Main", "RewindFrequency", rewind_save_frequency);
|
||||
si.SetIntValue("Main", "RewindSaveSlots", rewind_save_slots);
|
||||
|
|
|
@ -96,6 +96,7 @@ struct Settings
|
|||
bool apply_game_settings = true;
|
||||
bool auto_load_cheats = false;
|
||||
bool disable_all_enhancements = false;
|
||||
bool show_speed_icons = false;
|
||||
|
||||
bool rewind_enable = false;
|
||||
float rewind_save_frequency = 10.0f;
|
||||
|
|
|
@ -136,6 +136,7 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(QtHostInterface* host_interface,
|
|||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.logToFile, "Logging", "LogToFile");
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.showDebugMenu, "Main", "ShowDebugMenu");
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.showSpeedIcons, "Main", "ShowSpeedIcons", true);
|
||||
|
||||
connect(m_ui.resetToDefaultButton, &QPushButton::clicked, this, &AdvancedSettingsWidget::onResetToDefaultClicked);
|
||||
connect(m_ui.showDebugMenu, &QCheckBox::toggled, m_host_interface->getMainWindow(),
|
||||
|
@ -208,6 +209,8 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(QtHostInterface* host_interface,
|
|||
tr("Logs messages to duckstation.log in the user directory."));
|
||||
dialog->registerWidgetHelp(m_ui.showDebugMenu, tr("Show Debug Menu"), tr("Unchecked"),
|
||||
tr("Shows a debug menu bar with additional statistics and quick settings."));
|
||||
dialog->registerWidgetHelp(m_ui.showSpeedIcons, tr("Show Speed Icons"), tr("Checked"),
|
||||
tr("Shows persistent icons when turbo is active or when paused while using the fullscreen UI."));
|
||||
}
|
||||
|
||||
AdvancedSettingsWidget::~AdvancedSettingsWidget() = default;
|
||||
|
|
|
@ -104,6 +104,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="showSpeedIcons">
|
||||
<property name="text">
|
||||
<string>Show Speed Icons</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -2280,6 +2280,10 @@ void DrawSettingsWindow()
|
|||
s_host_interface->RunLater([debug_menu]() { SetDebugMenuEnabled(debug_menu); });
|
||||
}
|
||||
|
||||
settings_changed |= ToggleButton("Show Speed Icons",
|
||||
"Shows persistent icons when turbo is active or when paused.",
|
||||
&s_settings_copy.show_speed_icons);
|
||||
|
||||
settings_changed |=
|
||||
ToggleButton("Disable All Enhancements", "Temporarily disables all enhancements, useful when testing.",
|
||||
&s_settings_copy.disable_all_enhancements);
|
||||
|
@ -3122,13 +3126,14 @@ void DrawStatsOverlay()
|
|||
DRAW_LINE(g_large_font, g_large_font->FontSize, 0.0f, IM_COL32(255, 255, 255, 255));
|
||||
}
|
||||
|
||||
if (s_host_interface->IsFastForwardEnabled() || s_host_interface->IsTurboEnabled())
|
||||
if (g_settings.show_speed_icons &&
|
||||
(s_host_interface->IsFastForwardEnabled() || s_host_interface->IsTurboEnabled()))
|
||||
{
|
||||
text.Assign(ICON_FA_FAST_FORWARD);
|
||||
DRAW_LINE(g_large_font, g_large_font->FontSize * 2.0f, margin, IM_COL32(255, 255, 255, 255));
|
||||
}
|
||||
}
|
||||
else if (state == System::State::Paused)
|
||||
else if (g_settings.show_speed_icons && state == System::State::Paused)
|
||||
{
|
||||
text.Assign(ICON_FA_PAUSE);
|
||||
DRAW_LINE(g_large_font, g_large_font->FontSize * 2.0f, margin, IM_COL32(255, 255, 255, 255));
|
||||
|
|
Loading…
Reference in New Issue