diff --git a/BizHawk.MultiClient/BizHawk.MultiClient.csproj b/BizHawk.MultiClient/BizHawk.MultiClient.csproj index 79d917486b..c20a82dff6 100644 --- a/BizHawk.MultiClient/BizHawk.MultiClient.csproj +++ b/BizHawk.MultiClient/BizHawk.MultiClient.csproj @@ -246,6 +246,12 @@ HotkeyWindow.cs + + Form + + + TI83KeyPad.cs + Form @@ -382,6 +388,10 @@ HotkeyWindow.cs Designer + + TI83KeyPad.cs + Designer + Cheats.cs Designer diff --git a/BizHawk.MultiClient/Config.cs b/BizHawk.MultiClient/Config.cs index de464f1078..7347b0b68b 100644 --- a/BizHawk.MultiClient/Config.cs +++ b/BizHawk.MultiClient/Config.cs @@ -150,6 +150,13 @@ //Movie Settings public RecentFiles RecentMovies = new RecentFiles(8); + //TI83 + public bool TI83disableSaveSlotKeys = true; + public bool TI83autoloadKeyPad = true; + public bool TI83KeypadSaveWindowPosition = true; + public int TI83KeyPadWndx = -1; + public int TI83KeyPadWndy = -1; + // Client Hotkey Bindings public string HardResetBinding = "LeftShift+Tab"; //TODO: This needs to be Ctrl+R but how? public string FastForwardBinding = "J1 B6, Tab"; diff --git a/BizHawk.MultiClient/MainForm.Designer.cs b/BizHawk.MultiClient/MainForm.Designer.cs index e3a41009d8..579516271c 100644 --- a/BizHawk.MultiClient/MainForm.Designer.cs +++ b/BizHawk.MultiClient/MainForm.Designer.cs @@ -119,6 +119,7 @@ this.configToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.controllersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.hotkeysToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.messagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator(); this.soundToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.gUIToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -166,12 +167,16 @@ this.pPUViewerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.nametableViewerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.gameGenieCodesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tI83ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.keypadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator(); + this.autoloadVirtualKeyboardToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.disableSaveslotKeysOnLoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.helpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.EmuStatus = new System.Windows.Forms.ToolStripStatusLabel(); - this.messagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip1.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.SuspendLayout(); @@ -185,6 +190,7 @@ this.configToolStripMenuItem, this.toolsToolStripMenuItem, this.NESToolStripMenuItem, + this.tI83ToolStripMenuItem, this.helpToolStripMenuItem}); this.menuStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow; this.menuStrip1.Location = new System.Drawing.Point(0, 0); @@ -886,26 +892,33 @@ // controllersToolStripMenuItem // this.controllersToolStripMenuItem.Name = "controllersToolStripMenuItem"; - this.controllersToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.controllersToolStripMenuItem.Size = new System.Drawing.Size(149, 22); this.controllersToolStripMenuItem.Text = "&Controllers..."; this.controllersToolStripMenuItem.Click += new System.EventHandler(this.controllersToolStripMenuItem_Click); // // hotkeysToolStripMenuItem // this.hotkeysToolStripMenuItem.Name = "hotkeysToolStripMenuItem"; - this.hotkeysToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.hotkeysToolStripMenuItem.Size = new System.Drawing.Size(149, 22); this.hotkeysToolStripMenuItem.Text = "&Hotkeys..."; this.hotkeysToolStripMenuItem.Click += new System.EventHandler(this.hotkeysToolStripMenuItem_Click); // + // messagesToolStripMenuItem + // + this.messagesToolStripMenuItem.Name = "messagesToolStripMenuItem"; + this.messagesToolStripMenuItem.Size = new System.Drawing.Size(149, 22); + this.messagesToolStripMenuItem.Text = "&Messages..."; + this.messagesToolStripMenuItem.Click += new System.EventHandler(this.messagesToolStripMenuItem_Click); + // // toolStripSeparator9 // this.toolStripSeparator9.Name = "toolStripSeparator9"; - this.toolStripSeparator9.Size = new System.Drawing.Size(149, 6); + this.toolStripSeparator9.Size = new System.Drawing.Size(146, 6); // // soundToolStripMenuItem // this.soundToolStripMenuItem.Name = "soundToolStripMenuItem"; - this.soundToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.soundToolStripMenuItem.Size = new System.Drawing.Size(149, 22); this.soundToolStripMenuItem.Text = "&Sound"; this.soundToolStripMenuItem.Click += new System.EventHandler(this.soundToolStripMenuItem_Click); // @@ -918,7 +931,7 @@ this.enableRewindToolStripMenuItem, this.forceGDIPPresentationToolStripMenuItem}); this.gUIToolStripMenuItem.Name = "gUIToolStripMenuItem"; - this.gUIToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.gUIToolStripMenuItem.Size = new System.Drawing.Size(149, 22); this.gUIToolStripMenuItem.Text = "GUI"; this.gUIToolStripMenuItem.DropDownOpened += new System.EventHandler(this.gUIToolStripMenuItem_DropDownOpened); // @@ -981,7 +994,7 @@ this.miSpeed150, this.miSpeed200}); this.frameSkipToolStripMenuItem.Name = "frameSkipToolStripMenuItem"; - this.frameSkipToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.frameSkipToolStripMenuItem.Size = new System.Drawing.Size(149, 22); this.frameSkipToolStripMenuItem.Text = "Speed/Skip"; this.frameSkipToolStripMenuItem.DropDownOpened += new System.EventHandler(this.frameSkipToolStripMenuItem_DropDownOpened); // @@ -1124,19 +1137,19 @@ // toolStripSeparator10 // this.toolStripSeparator10.Name = "toolStripSeparator10"; - this.toolStripSeparator10.Size = new System.Drawing.Size(149, 6); + this.toolStripSeparator10.Size = new System.Drawing.Size(146, 6); // // saveConfigToolStripMenuItem // this.saveConfigToolStripMenuItem.Name = "saveConfigToolStripMenuItem"; - this.saveConfigToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.saveConfigToolStripMenuItem.Size = new System.Drawing.Size(149, 22); this.saveConfigToolStripMenuItem.Text = "Save Config"; this.saveConfigToolStripMenuItem.Click += new System.EventHandler(this.saveConfigToolStripMenuItem_Click); // // loadConfigToolStripMenuItem // this.loadConfigToolStripMenuItem.Name = "loadConfigToolStripMenuItem"; - this.loadConfigToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.loadConfigToolStripMenuItem.Size = new System.Drawing.Size(149, 22); this.loadConfigToolStripMenuItem.Text = "Load Config"; // // toolsToolStripMenuItem @@ -1254,6 +1267,48 @@ this.gameGenieCodesToolStripMenuItem.Text = "&Game Genie Encoder/Decoder"; this.gameGenieCodesToolStripMenuItem.Click += new System.EventHandler(this.gameGenieCodesToolStripMenuItem_Click); // + // tI83ToolStripMenuItem + // + this.tI83ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.keypadToolStripMenuItem, + this.toolStripSeparator13, + this.autoloadVirtualKeyboardToolStripMenuItem, + this.disableSaveslotKeysOnLoToolStripMenuItem}); + this.tI83ToolStripMenuItem.Name = "tI83ToolStripMenuItem"; + this.tI83ToolStripMenuItem.Size = new System.Drawing.Size(41, 17); + this.tI83ToolStripMenuItem.Text = "TI83"; + this.tI83ToolStripMenuItem.DropDownOpened += new System.EventHandler(this.tI83ToolStripMenuItem_DropDownOpened); + // + // keypadToolStripMenuItem + // + this.keypadToolStripMenuItem.Name = "keypadToolStripMenuItem"; + this.keypadToolStripMenuItem.Size = new System.Drawing.Size(230, 22); + this.keypadToolStripMenuItem.Text = "Keypad"; + this.keypadToolStripMenuItem.Click += new System.EventHandler(this.keypadToolStripMenuItem_Click); + // + // toolStripSeparator13 + // + this.toolStripSeparator13.Name = "toolStripSeparator13"; + this.toolStripSeparator13.Size = new System.Drawing.Size(227, 6); + // + // autoloadVirtualKeyboardToolStripMenuItem + // + this.autoloadVirtualKeyboardToolStripMenuItem.Checked = true; + this.autoloadVirtualKeyboardToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; + this.autoloadVirtualKeyboardToolStripMenuItem.Name = "autoloadVirtualKeyboardToolStripMenuItem"; + this.autoloadVirtualKeyboardToolStripMenuItem.Size = new System.Drawing.Size(230, 22); + this.autoloadVirtualKeyboardToolStripMenuItem.Text = "Autoload Keypad"; + this.autoloadVirtualKeyboardToolStripMenuItem.Click += new System.EventHandler(this.autoloadVirtualKeyboardToolStripMenuItem_Click); + // + // disableSaveslotKeysOnLoToolStripMenuItem + // + this.disableSaveslotKeysOnLoToolStripMenuItem.Checked = true; + this.disableSaveslotKeysOnLoToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; + this.disableSaveslotKeysOnLoToolStripMenuItem.Name = "disableSaveslotKeysOnLoToolStripMenuItem"; + this.disableSaveslotKeysOnLoToolStripMenuItem.Size = new System.Drawing.Size(230, 22); + this.disableSaveslotKeysOnLoToolStripMenuItem.Text = "Disable Saveslot Keys on Load"; + this.disableSaveslotKeysOnLoToolStripMenuItem.Click += new System.EventHandler(this.disableSaveslotKeysOnLoToolStripMenuItem_Click); + // // helpToolStripMenuItem // this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -1295,13 +1350,6 @@ this.EmuStatus.Size = new System.Drawing.Size(143, 17); this.EmuStatus.Text = "Currently emulating: ur mom"; // - // messagesToolStripMenuItem - // - this.messagesToolStripMenuItem.Name = "messagesToolStripMenuItem"; - this.messagesToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.messagesToolStripMenuItem.Text = "&Messages..."; - this.messagesToolStripMenuItem.Click += new System.EventHandler(this.messagesToolStripMenuItem_Click); - // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1471,6 +1519,11 @@ private System.Windows.Forms.StatusStrip statusStrip1; private System.Windows.Forms.ToolStripStatusLabel EmuStatus; private System.Windows.Forms.ToolStripMenuItem messagesToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem tI83ToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem autoloadVirtualKeyboardToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem keypadToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator13; + private System.Windows.Forms.ToolStripMenuItem disableSaveslotKeysOnLoToolStripMenuItem; } } diff --git a/BizHawk.MultiClient/MainForm.MenuItems.cs b/BizHawk.MultiClient/MainForm.MenuItems.cs index 14a812c5b4..d59d77325f 100644 --- a/BizHawk.MultiClient/MainForm.MenuItems.cs +++ b/BizHawk.MultiClient/MainForm.MenuItems.cs @@ -511,5 +511,30 @@ namespace BizHawk.MultiClient MessageConfig m = new MessageConfig(); m.ShowDialog(); } + + private void autoloadVirtualKeyboardToolStripMenuItem_Click(object sender, EventArgs e) + { + if (!(Global.Emulator is TI83)) return; + Global.Config.TI83autoloadKeyPad ^= true; + } + + private void keypadToolStripMenuItem_Click(object sender, EventArgs e) + { + if (!(Global.Emulator is TI83)) + return; + LoadTI83KeyPad(); + } + + private void disableSaveslotKeysOnLoToolStripMenuItem_Click(object sender, EventArgs e) + { + if (!(Global.Emulator is TI83)) return; + Global.Config.TI83disableSaveSlotKeys ^= true; + } + + private void tI83ToolStripMenuItem_DropDownOpened(object sender, EventArgs e) + { + disableSaveslotKeysOnLoToolStripMenuItem.Checked = Global.Config.TI83disableSaveSlotKeys; + autoloadVirtualKeyboardToolStripMenuItem.Checked = Global.Config.TI83autoloadKeyPad; + } } } \ No newline at end of file diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index 33f3907bd9..c48c519f67 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -52,6 +52,7 @@ namespace BizHawk.MultiClient public NESDebugger NESDebug1 = new NESDebugger(); public Cheats Cheats1 = new Cheats(); public ToolBox ToolBox1 = new ToolBox(); + public TI83KeyPad TI83KeyPad1 = new TI83KeyPad(); public MainForm(string[] args) { @@ -481,10 +482,16 @@ namespace BizHawk.MultiClient system = Global.Game.System; switch (system) { + case "TI83": + tI83ToolStripMenuItem.Visible = true; + NESToolStripMenuItem.Visible = false; + break; case "NES": NESToolStripMenuItem.Visible = true; + tI83ToolStripMenuItem.Visible = false; break; default: + tI83ToolStripMenuItem.Visible = false; NESToolStripMenuItem.Visible = false; break; } @@ -575,6 +582,8 @@ namespace BizHawk.MultiClient break; case "TI83": nextEmulator = new TI83(); + if (Global.Config.TI83autoloadKeyPad) + LoadTI83KeyPad(); break; case "NES": nextEmulator = new NES(); @@ -644,6 +653,7 @@ namespace BizHawk.MultiClient NESPPU1.Restart(); NESNameTableViewer1.Restart(); NESDebug1.Restart(); + TI83KeyPad1.Restart(); if (Global.Config.LoadCheatFileByGame) { if (Cheats1.AttemptLoadCheatFile()) @@ -1341,6 +1351,17 @@ namespace BizHawk.MultiClient NESDebug1.Focus(); } + public void LoadTI83KeyPad() + { + if (!TI83KeyPad1.IsHandleCreated || TI83KeyPad1.IsDisposed) + { + TI83KeyPad1 = new TI83KeyPad(); + TI83KeyPad1.Show(); + } + else + TI83KeyPad1.Focus(); + } + public void LoadCheatsWindow() { if (!Cheats1.IsHandleCreated || Cheats1.IsDisposed) @@ -1523,6 +1544,7 @@ namespace BizHawk.MultiClient NESPPU1.Restart(); NESNameTableViewer1.Restart(); NESDebug1.Restart(); + TI83KeyPad1.Restart(); Cheats1.Restart(); Text = "BizHawk"; HandlePlatformMenus(); diff --git a/BizHawk.MultiClient/images/calculator.ico b/BizHawk.MultiClient/images/calculator.ico new file mode 100644 index 0000000000..e2a8a24abd Binary files /dev/null and b/BizHawk.MultiClient/images/calculator.ico differ