Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-10-06 20:57:28 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-10-06 20:57:28 +0300
commit3a7111a4c8cb629e0c96dfb50842fb4ef3979eed (patch)
tree86162e035b96d8a7d5fa719afcdf703f63fa65db /MainForm.cs
parent90bbb7552e5aaa9c99d23c4aa89ccac91f5669bb (diff)
New settings for SNES
Diffstat (limited to 'MainForm.cs')
-rw-r--r--MainForm.cs59
1 files changed, 44 insertions, 15 deletions
diff --git a/MainForm.cs b/MainForm.cs
index e2c49725..4d5d4109 100644
--- a/MainForm.cs
+++ b/MainForm.cs
@@ -181,15 +181,6 @@ namespace com.clusterrr.hakchi_gui
+ ")"
#endif
;
- // Some settnigs
- useExtendedFontToolStripMenuItem.Checked = ConfigIni.UseFont;
- epilepsyProtectionToolStripMenuItem.Checked = ConfigIni.AntiArmetLevel > 0;
- selectButtonCombinationToolStripMenuItem.Enabled = resetUsingCombinationOfButtonsToolStripMenuItem.Checked = ConfigIni.ResetHack;
- enableAutofireToolStripMenuItem.Checked = ConfigIni.AutofireHack;
- useXYOnClassicControllerAsAutofireABToolStripMenuItem.Checked = ConfigIni.AutofireXYHack;
- upABStartOnSecondControllerToolStripMenuItem.Checked = ConfigIni.FcStart;
- compressGamesToolStripMenuItem.Checked = ConfigIni.Compress;
-
disablePagefoldersToolStripMenuItem.Checked = (byte)ConfigIni.FoldersMode == 0;
automaticToolStripMenuItem.Checked = (byte)ConfigIni.FoldersMode == 2;
automaticOriginalToolStripMenuItem.Checked = (byte)ConfigIni.FoldersMode == 3;
@@ -543,7 +534,7 @@ namespace com.clusterrr.hakchi_gui
Thread.CurrentThread.CurrentUICulture = new CultureInfo(langCodes[language]);
this.Controls.Clear();
this.InitializeComponent();
- FormInitialize();
+ FormInitialize();
this.Invalidate(true);
};
item.Checked = Thread.CurrentThread.CurrentUICulture.Name.ToUpper() == langCodes[language].ToUpper();
@@ -1211,9 +1202,26 @@ namespace com.clusterrr.hakchi_gui
private void selectButtonCombinationToolStripMenuItem_Click(object sender, EventArgs e)
{
- var form = new SelectButtonsForm(ConfigIni.ResetCombination);
- if (form.ShowDialog() == DialogResult.OK)
- ConfigIni.ResetCombination = form.SelectedButtons;
+ switch (ConfigIni.ConsoleType)
+ {
+ default:
+ case ConsoleType.NES:
+ case ConsoleType.Famicom:
+ {
+ var form = new SelectNesButtonsForm((SelectNesButtonsForm.NesButtons)ConfigIni.ResetCombination);
+ if (form.ShowDialog() == DialogResult.OK)
+ ConfigIni.ResetCombination = (uint)form.SelectedButtons;
+ }
+ break;
+ case ConsoleType.SNES:
+ case ConsoleType.SuperFamicom:
+ {
+ var form = new SelectSnesButtonsForm((SelectSnesButtonsForm.SnesButtons)ConfigIni.ResetCombination);
+ if (form.ShowDialog() == DialogResult.OK)
+ ConfigIni.ResetCombination = (uint)form.SelectedButtons;
+ }
+ break;
+ }
}
static ConsoleType lastConsoleType = ConsoleType.Unknown;
@@ -1227,6 +1235,16 @@ namespace com.clusterrr.hakchi_gui
epilepsyProtectionToolStripMenuItem.Enabled = ConfigIni.ConsoleType == ConsoleType.NES || ConfigIni.ConsoleType == ConsoleType.Famicom;
useXYOnClassicControllerAsAutofireABToolStripMenuItem.Enabled = ConfigIni.ConsoleType == ConsoleType.NES || ConfigIni.ConsoleType == ConsoleType.Famicom;
upABStartOnSecondControllerToolStripMenuItem.Enabled = ConfigIni.ConsoleType == ConsoleType.Famicom;
+
+ // Some settnigs
+ useExtendedFontToolStripMenuItem.Checked = ConfigIni.UseFont;
+ epilepsyProtectionToolStripMenuItem.Checked = ConfigIni.AntiArmetLevel > 0 && epilepsyProtectionToolStripMenuItem.Enabled;
+ selectButtonCombinationToolStripMenuItem.Enabled = resetUsingCombinationOfButtonsToolStripMenuItem.Checked = ConfigIni.ResetHack;
+ enableAutofireToolStripMenuItem.Checked = ConfigIni.AutofireHack;
+ useXYOnClassicControllerAsAutofireABToolStripMenuItem.Checked = ConfigIni.AutofireXYHack && useXYOnClassicControllerAsAutofireABToolStripMenuItem.Enabled;
+ upABStartOnSecondControllerToolStripMenuItem.Checked = ConfigIni.FcStart && upABStartOnSecondControllerToolStripMenuItem.Enabled;
+ compressGamesToolStripMenuItem.Checked = ConfigIni.Compress;
+
LoadHidden();
LoadGames();
lastConsoleType = ConfigIni.ConsoleType;
@@ -1314,7 +1332,7 @@ namespace com.clusterrr.hakchi_gui
ConfigIni.RunCount++;
if (ConfigIni.RunCount == 1)
{
- new ConsoleSelectDialog().ShowDialog();
+ new SelectConsoleDialog().ShowDialog();
SyncConsoleType();
MessageBox.Show(this, Resources.FirstRun, Resources.Hello, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
@@ -1789,8 +1807,19 @@ namespace com.clusterrr.hakchi_gui
private void listViewGames_KeyDown(object sender, KeyEventArgs e)
{
- if (e.KeyCode == Keys.Delete && ((listViewGames.SelectedItems.Count > 1) ||(listViewGames.SelectedItems.Count == 1 && listViewGames.SelectedItems[0].Tag is NesMiniApplication)))
+ if (e.KeyCode == Keys.Delete && ((listViewGames.SelectedItems.Count > 1) || (listViewGames.SelectedItems.Count == 1 && listViewGames.SelectedItems[0].Tag is NesMiniApplication)))
DeleteSelectedGames();
}
+
+ private void MainForm_KeyDown(object sender, KeyEventArgs e)
+ {
+ if (listViewGames.SelectedItems.Count != 1) return;
+ var selected = listViewGames.SelectedItems[0].Tag;
+ if ((e.KeyCode == Keys.E) && (e.Modifiers == (Keys.Alt | Keys.Control)) && (selected is SnesGame))
+ {
+ new SnesPresetEditor(selected as SnesGame).ShowDialog();
+ ShowSelected();
+ }
+ }
}
}