mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-08-02 22:17:13 +02:00
settings: add Show Confirm Exist toggle (#1856)
This commit is contained in:
parent
5be6ec6364
commit
1e5b37c94f
8 changed files with 63 additions and 5 deletions
|
@ -154,7 +154,7 @@ namespace Ryujinx.Ui
|
|||
{
|
||||
if (keyboard.IsKeyDown(OpenTK.Input.Key.Escape))
|
||||
{
|
||||
if (GtkDialog.CreateExitDialog())
|
||||
if (!ConfigurationState.Instance.ShowConfirmExit || GtkDialog.CreateExitDialog())
|
||||
{
|
||||
Exit();
|
||||
}
|
||||
|
|
|
@ -907,7 +907,7 @@ namespace Ryujinx.Ui
|
|||
|
||||
private void Exit_Pressed(object sender, EventArgs args)
|
||||
{
|
||||
if (!_gameLoaded || GtkDialog.CreateExitDialog())
|
||||
if (!_gameLoaded || !ConfigurationState.Instance.ShowConfirmExit || GtkDialog.CreateExitDialog())
|
||||
{
|
||||
End();
|
||||
}
|
||||
|
@ -915,7 +915,7 @@ namespace Ryujinx.Ui
|
|||
|
||||
private void Window_Close(object sender, DeleteEventArgs args)
|
||||
{
|
||||
if (!_gameLoaded || GtkDialog.CreateExitDialog())
|
||||
if (!_gameLoaded || !ConfigurationState.Instance.ShowConfirmExit || GtkDialog.CreateExitDialog())
|
||||
{
|
||||
End();
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ namespace Ryujinx.Ui.Windows
|
|||
[GUI] CheckButton _dockedModeToggle;
|
||||
[GUI] CheckButton _discordToggle;
|
||||
[GUI] CheckButton _checkUpdatesToggle;
|
||||
[GUI] CheckButton _showConfirmExitToggle;
|
||||
[GUI] CheckButton _vSyncToggle;
|
||||
[GUI] CheckButton _shaderCacheToggle;
|
||||
[GUI] CheckButton _ptcToggle;
|
||||
|
@ -176,6 +177,11 @@ namespace Ryujinx.Ui.Windows
|
|||
_checkUpdatesToggle.Click();
|
||||
}
|
||||
|
||||
if (ConfigurationState.Instance.ShowConfirmExit)
|
||||
{
|
||||
_showConfirmExitToggle.Click();
|
||||
}
|
||||
|
||||
if (ConfigurationState.Instance.Graphics.EnableVsync)
|
||||
{
|
||||
_vSyncToggle.Click();
|
||||
|
@ -393,6 +399,7 @@ namespace Ryujinx.Ui.Windows
|
|||
ConfigurationState.Instance.System.EnableDockedMode.Value = _dockedModeToggle.Active;
|
||||
ConfigurationState.Instance.EnableDiscordIntegration.Value = _discordToggle.Active;
|
||||
ConfigurationState.Instance.CheckUpdatesOnStart.Value = _checkUpdatesToggle.Active;
|
||||
ConfigurationState.Instance.ShowConfirmExit.Value = _showConfirmExitToggle.Active;
|
||||
ConfigurationState.Instance.Graphics.EnableVsync.Value = _vSyncToggle.Active;
|
||||
ConfigurationState.Instance.Graphics.EnableShaderCache.Value = _shaderCacheToggle.Active;
|
||||
ConfigurationState.Instance.System.EnablePtc.Value = _ptcToggle.Active;
|
||||
|
|
|
@ -137,6 +137,22 @@
|
|||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="_showConfirmExitToggle">
|
||||
<property name="label" translatable="yes">Show "Confirm Exit" Dialog</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="padding">5</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue