From 4b6d96834b4425a34e5e25108a1280e79c8177a0 Mon Sep 17 00:00:00 2001 From: Souryo Date: Mon, 14 Nov 2016 21:00:50 -0500 Subject: [PATCH] Debugger: Auto-focus on textbox for go to address form (+ same for add/edit cheat form) --- GUI.NET/Debugger/frmGoToLine.cs | 6 ++++++ GUI.NET/Forms/Cheats/frmCheat.cs | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/GUI.NET/Debugger/frmGoToLine.cs b/GUI.NET/Debugger/frmGoToLine.cs index fdd5aad1..d5cdedf4 100644 --- a/GUI.NET/Debugger/frmGoToLine.cs +++ b/GUI.NET/Debugger/frmGoToLine.cs @@ -20,6 +20,12 @@ namespace Mesen.GUI.Debugger Entity = address; AddBinding("Address", txtAddress); } + + protected override void OnShown(EventArgs e) + { + base.OnShown(e); + txtAddress.Focus(); + } } public class GoToAddress diff --git a/GUI.NET/Forms/Cheats/frmCheat.cs b/GUI.NET/Forms/Cheats/frmCheat.cs index 33b689c6..c0ca5ad3 100644 --- a/GUI.NET/Forms/Cheats/frmCheat.cs +++ b/GUI.NET/Forms/Cheats/frmCheat.cs @@ -48,6 +48,12 @@ namespace Mesen.GUI.Forms.Cheats AddBinding("IsRelativeAddress", radRelativeAddress.Parent); } + protected override void OnShown(EventArgs e) + { + base.OnShown(e); + txtCheatName.Focus(); + } + protected override Type BindedType { get { return typeof(CheatInfo); }