From d4c89015a73cfb7be912cf6e8be8dca2154f13f3 Mon Sep 17 00:00:00 2001 From: adelikat Date: Thu, 27 Sep 2012 01:01:35 +0000 Subject: [PATCH] Message Config - fix X/Y values not updating when typing directly into the numeric boxes --- .../config/MessageConfig.Designer.cs | 50 ++++++++++--------- BizHawk.MultiClient/config/MessageConfig.cs | 13 +++-- 2 files changed, 36 insertions(+), 27 deletions(-) diff --git a/BizHawk.MultiClient/config/MessageConfig.Designer.cs b/BizHawk.MultiClient/config/MessageConfig.Designer.cs index 6154e6f9c4..6ba305f551 100644 --- a/BizHawk.MultiClient/config/MessageConfig.Designer.cs +++ b/BizHawk.MultiClient/config/MessageConfig.Designer.cs @@ -30,6 +30,8 @@ { this.OK = new System.Windows.Forms.Button(); this.MessageTypeBox = new System.Windows.Forms.GroupBox(); + this.AutoholdLabel = new System.Windows.Forms.Label(); + this.AutoholdRadio = new System.Windows.Forms.RadioButton(); this.MultitrackLabel = new System.Windows.Forms.Label(); this.MultitrackRadio = new System.Windows.Forms.RadioButton(); this.RerecLabel = new System.Windows.Forms.Label(); @@ -78,8 +80,6 @@ this.LInputColorDialog = new System.Windows.Forms.ColorDialog(); this.MovieInputColorDialog = new System.Windows.Forms.ColorDialog(); this.StackMessagesCheckbox = new System.Windows.Forms.CheckBox(); - this.AutoholdRadio = new System.Windows.Forms.RadioButton(); - this.AutoholdLabel = new System.Windows.Forms.Label(); this.MessageTypeBox.SuspendLayout(); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.XNumeric)).BeginInit(); @@ -123,6 +123,28 @@ this.MessageTypeBox.TabStop = false; this.MessageTypeBox.Text = "Message Type"; // + // AutoholdLabel + // + this.AutoholdLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.AutoholdLabel.AutoSize = true; + this.AutoholdLabel.Location = new System.Drawing.Point(126, 188); + this.AutoholdLabel.Name = "AutoholdLabel"; + this.AutoholdLabel.Size = new System.Drawing.Size(49, 13); + this.AutoholdLabel.TabIndex = 15; + this.AutoholdLabel.Text = "255, 255"; + // + // AutoholdRadio + // + this.AutoholdRadio.AutoSize = true; + this.AutoholdRadio.Location = new System.Drawing.Point(6, 186); + this.AutoholdRadio.Name = "AutoholdRadio"; + this.AutoholdRadio.Size = new System.Drawing.Size(67, 17); + this.AutoholdRadio.TabIndex = 14; + this.AutoholdRadio.TabStop = true; + this.AutoholdRadio.Text = "Autohold"; + this.AutoholdRadio.UseVisualStyleBackColor = true; + this.AutoholdRadio.CheckedChanged += new System.EventHandler(this.AutoholdRadio_CheckedChanged); + // // MultitrackLabel // this.MultitrackLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -505,6 +527,7 @@ 0, 0}); this.XNumeric.Click += new System.EventHandler(this.XNumeric_Click); + this.XNumeric.KeyUp += new System.Windows.Forms.KeyEventHandler(this.XNumeric_KeyUp); // // YNumeric // @@ -524,6 +547,7 @@ 0, 0}); this.YNumeric.Click += new System.EventHandler(this.YNumeric_Click); + this.YNumeric.KeyUp += new System.Windows.Forms.KeyEventHandler(this.YNumeric_KeyUp); // // label1 // @@ -632,28 +656,6 @@ this.StackMessagesCheckbox.Text = "Stack Messages"; this.StackMessagesCheckbox.UseVisualStyleBackColor = true; // - // AutoholdRadio - // - this.AutoholdRadio.AutoSize = true; - this.AutoholdRadio.Location = new System.Drawing.Point(6, 186); - this.AutoholdRadio.Name = "AutoholdRadio"; - this.AutoholdRadio.Size = new System.Drawing.Size(67, 17); - this.AutoholdRadio.TabIndex = 14; - this.AutoholdRadio.TabStop = true; - this.AutoholdRadio.Text = "Autohold"; - this.AutoholdRadio.UseVisualStyleBackColor = true; - this.AutoholdRadio.CheckedChanged += new System.EventHandler(this.AutoholdRadio_CheckedChanged); - // - // AutoholdLabel - // - this.AutoholdLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.AutoholdLabel.AutoSize = true; - this.AutoholdLabel.Location = new System.Drawing.Point(126, 188); - this.AutoholdLabel.Name = "AutoholdLabel"; - this.AutoholdLabel.Size = new System.Drawing.Size(49, 13); - this.AutoholdLabel.TabIndex = 15; - this.AutoholdLabel.Text = "255, 255"; - // // MessageConfig // this.AcceptButton = this.OK; diff --git a/BizHawk.MultiClient/config/MessageConfig.cs b/BizHawk.MultiClient/config/MessageConfig.cs index 4d02f580ae..9f99a98d1a 100644 --- a/BizHawk.MultiClient/config/MessageConfig.cs +++ b/BizHawk.MultiClient/config/MessageConfig.cs @@ -11,9 +11,6 @@ namespace BizHawk.MultiClient { public partial class MessageConfig : Form { - //TODO: - //Deal with typing into Numerics properly - int DispFPSx = Global.Config.DispFPSx; int DispFPSy = Global.Config.DispFPSy; int DispFrameCx = Global.Config.DispFrameCx; @@ -637,5 +634,15 @@ namespace BizHawk.MultiClient SetColorBox(); } } + + private void XNumeric_KeyUp(object sender, KeyEventArgs e) + { + XNumericChange(); + } + + private void YNumeric_KeyUp(object sender, KeyEventArgs e) + { + YNumericChange(); + } } }