Don't inform the user they've hit cancel, they already know
This commit is contained in:
parent
3c111c3947
commit
e4f142c0d1
|
@ -842,31 +842,21 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void ControllersMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var controller = new ControllerConfig(this, Emulator, Config);
|
||||
if (controller.ShowDialog().IsOk())
|
||||
{
|
||||
AddOnScreenMessage("Controller settings saved");
|
||||
InitControls();
|
||||
InputManager.SyncControls(Emulator, MovieSession, Config);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddOnScreenMessage("Controller config aborted");
|
||||
}
|
||||
if (!controller.ShowDialog().IsOk()) return;
|
||||
AddOnScreenMessage("Controller settings saved");
|
||||
|
||||
InitControls();
|
||||
InputManager.SyncControls(Emulator, MovieSession, Config);
|
||||
}
|
||||
|
||||
private void HotkeysMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var hotkeyConfig = new HotkeyConfig(Config);
|
||||
if (hotkeyConfig.ShowDialog().IsOk())
|
||||
{
|
||||
AddOnScreenMessage("Hotkey settings saved");
|
||||
InitControls();
|
||||
InputManager.SyncControls(Emulator, MovieSession, Config);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddOnScreenMessage("Hotkey config aborted");
|
||||
}
|
||||
if (!hotkeyConfig.ShowDialog().IsOk()) return;
|
||||
AddOnScreenMessage("Hotkey settings saved");
|
||||
|
||||
InitControls();
|
||||
InputManager.SyncControls(Emulator, MovieSession, Config);
|
||||
}
|
||||
|
||||
private void FirmwaresMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -887,10 +877,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void MessagesMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var form = new MessageConfig(Config);
|
||||
var result = form.ShowDialog();
|
||||
AddOnScreenMessage(result.IsOk()
|
||||
? "Message settings saved"
|
||||
: "Message config aborted");
|
||||
if (form.ShowDialog().IsOk()) AddOnScreenMessage("Message settings saved");
|
||||
}
|
||||
|
||||
private void PathsMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -909,13 +896,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
_ => Enumerable.Empty<string>()
|
||||
};
|
||||
using var form = new SoundConfig(this, Config, GetDeviceNamesCallback);
|
||||
if (!form.ShowDialog().IsOk())
|
||||
{
|
||||
AddOnScreenMessage("Sound config aborted");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!form.ShowDialog().IsOk()) return;
|
||||
AddOnScreenMessage("Sound settings saved");
|
||||
|
||||
if (form.ApplyNewSoundDevice)
|
||||
{
|
||||
Sound.Dispose();
|
||||
|
@ -933,10 +916,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void AutofireMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var form = new AutofireConfig(Config, InputManager.AutoFireController, InputManager.AutofireStickyXorAdapter);
|
||||
var result = form.ShowDialog();
|
||||
AddOnScreenMessage(result.IsOk()
|
||||
? "Autofire settings saved"
|
||||
: "Autofire config aborted");
|
||||
if (form.ShowDialog().IsOk()) AddOnScreenMessage("Autofire settings saved");
|
||||
}
|
||||
|
||||
private void RewindOptionsMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -944,19 +924,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (Emulator.HasSavestates())
|
||||
{
|
||||
using var form = new RewindConfig(Config, CreateRewinder, () => this.Rewinder, Emulator.AsStatable());
|
||||
AddOnScreenMessage(form.ShowDialog().IsOk()
|
||||
? "Rewind and State settings saved"
|
||||
: "Rewind config aborted");
|
||||
if (form.ShowDialog().IsOk()) AddOnScreenMessage("Rewind and State settings saved");
|
||||
}
|
||||
}
|
||||
|
||||
private void FileExtensionsMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var form = new FileExtensionPreferences(Config.PreferredPlatformsForExtensions);
|
||||
var result = form.ShowDialog();
|
||||
AddOnScreenMessage(result.IsOk()
|
||||
? "Rom Extension Preferences changed"
|
||||
: "Rom Extension Preferences cancelled");
|
||||
if (form.ShowDialog().IsOk()) AddOnScreenMessage("Rom Extension Preferences changed");
|
||||
}
|
||||
|
||||
private void BumpAutoFlushSaveRamTimer()
|
||||
|
@ -976,19 +951,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void ProfilesMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var form = new ProfileConfig(this, Emulator, Config);
|
||||
if (form.ShowDialog().IsOk())
|
||||
{
|
||||
AddOnScreenMessage("Profile settings saved");
|
||||
if (!form.ShowDialog().IsOk()) return;
|
||||
AddOnScreenMessage("Profile settings saved");
|
||||
|
||||
// We hide the FirstBoot items since the user setup a Profile
|
||||
// Is it a bad thing to do this constantly?
|
||||
Config.FirstBoot = false;
|
||||
ProfileFirstBootLabel.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
AddOnScreenMessage("Profile config aborted");
|
||||
}
|
||||
// We hide the FirstBoot items since the user setup a Profile
|
||||
// Is it a bad thing to do this constantly?
|
||||
Config.FirstBoot = false;
|
||||
ProfileFirstBootLabel.Visible = false;
|
||||
}
|
||||
|
||||
private void ClockThrottleMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -1536,9 +1505,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (Emulator is TI83 ti83)
|
||||
{
|
||||
using var form = new TI83PaletteConfig(this, ti83.GetSettings().Clone());
|
||||
AddOnScreenMessage(form.ShowDialog().IsOk()
|
||||
? "Palette settings saved"
|
||||
: "Palette config aborted");
|
||||
if (form.ShowDialog().IsOk()) AddOnScreenMessage("Palette settings saved");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1724,20 +1691,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void N64PluginSettingsMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var form = new N64VideoPluginConfig(this, Config, Emulator);
|
||||
if (form.ShowDialog().IsOk())
|
||||
if (form.ShowDialog().IsOk()
|
||||
&& Emulator is not N64) // If it's loaded, the reboot required message will appear
|
||||
{
|
||||
if (Emulator.IsNull())
|
||||
{
|
||||
AddOnScreenMessage("Plugin settings saved");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Do nothing, Reboot is being flagged already if they changed anything
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AddOnScreenMessage("Plugin settings aborted");
|
||||
AddOnScreenMessage("Plugin settings saved");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void CancelBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
_mainForm.AddOnScreenMessage("Controller settings aborted");
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
|
|
@ -48,7 +48,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void CancelBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
_mainForm.AddOnScreenMessage("Filter settings aborted");
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
|
|
@ -59,7 +59,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void CancelBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
_mainForm.AddOnScreenMessage("Misc settings aborted");
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
|
|
@ -73,7 +73,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void CancelBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
_mainForm.AddOnScreenMessage("Core emulator settings aborted");
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
|
|
@ -54,7 +54,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void CancelBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
_mainForm.AddOnScreenMessage("Misc settings aborted");
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void CancelBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
_mainForm.AddOnScreenMessage("POKE memory aborted");
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
|
|
@ -51,7 +51,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void CancelBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
_mainForm.AddOnScreenMessage("Controller settings aborted");
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
|
|
@ -162,7 +162,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
Close();
|
||||
DialogResult = DialogResult.Cancel;
|
||||
_osdMessageCallback("Customizing aborted.");
|
||||
}
|
||||
|
||||
private void AcceptBackgroundInputCheckbox_CheckedChanged(object sender, EventArgs e)
|
||||
|
|
|
@ -51,7 +51,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void CancelBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
_mainForm.AddOnScreenMessage("Controller settings aborted");
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
|
|
@ -62,7 +62,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void CancelBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
_mainForm.AddOnScreenMessage("Controller settings aborted");
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
|
|
@ -267,7 +267,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
_mainForm.AddOnScreenMessage("Path config aborted");
|
||||
Close();
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void CancelBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
_mainForm.AddOnScreenMessage("Controller settings aborted");
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
|
|
@ -53,7 +53,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void CancelBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
_mainForm.AddOnScreenMessage("Controller settings aborted");
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
|
|
@ -63,7 +63,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void CancelBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
_mainForm.AddOnScreenMessage("Misc settings aborted");
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
|
|
@ -69,7 +69,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void CancelBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
_mainForm.AddOnScreenMessage("Core emulator settings aborted");
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
|
|
@ -122,7 +122,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void CancelBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
_mainForm.AddOnScreenMessage("Joystick settings aborted");
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
|
|
@ -72,7 +72,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void CancelBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
_mainForm.AddOnScreenMessage("Misc settings aborted");
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
|
|
@ -32,7 +32,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void CancelBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
_mainForm.AddOnScreenMessage("POKE memory aborted");
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue