diff --git a/BizHawk.MultiClient/config/MessageConfig.Designer.cs b/BizHawk.MultiClient/config/MessageConfig.Designer.cs index db756048e4..627a3761dd 100644 --- a/BizHawk.MultiClient/config/MessageConfig.Designer.cs +++ b/BizHawk.MultiClient/config/MessageConfig.Designer.cs @@ -30,6 +30,11 @@ { this.OK = new System.Windows.Forms.Button(); this.MessageTypeBox = new System.Windows.Forms.GroupBox(); + this.MessLabel = new System.Windows.Forms.Label(); + this.InpLabel = new System.Windows.Forms.Label(); + this.LagLabel = new System.Windows.Forms.Label(); + this.FCLabel = new System.Windows.Forms.Label(); + this.FpsPosLabel = new System.Windows.Forms.Label(); this.MessagesRadio = new System.Windows.Forms.RadioButton(); this.InputDisplayRadio = new System.Windows.Forms.RadioButton(); this.LagCounterRadio = new System.Windows.Forms.RadioButton(); @@ -46,6 +51,8 @@ this.MessageColorBox = new System.Windows.Forms.GroupBox(); this.MessageColorDialog = new System.Windows.Forms.ColorDialog(); this.Cancel = new System.Windows.Forms.Button(); + this.ResetDefaultsButton = new System.Windows.Forms.Button(); + this.textBox1 = new System.Windows.Forms.TextBox(); this.MessageTypeBox.SuspendLayout(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.YNumeric)).BeginInit(); @@ -56,7 +63,7 @@ // OK // this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.OK.Location = new System.Drawing.Point(336, 398); + this.OK.Location = new System.Drawing.Point(337, 316); this.OK.Name = "OK"; this.OK.Size = new System.Drawing.Size(75, 23); this.OK.TabIndex = 1; @@ -66,18 +73,68 @@ // // MessageTypeBox // + this.MessageTypeBox.Controls.Add(this.MessLabel); + this.MessageTypeBox.Controls.Add(this.InpLabel); + this.MessageTypeBox.Controls.Add(this.LagLabel); + this.MessageTypeBox.Controls.Add(this.FCLabel); + this.MessageTypeBox.Controls.Add(this.FpsPosLabel); this.MessageTypeBox.Controls.Add(this.MessagesRadio); this.MessageTypeBox.Controls.Add(this.InputDisplayRadio); this.MessageTypeBox.Controls.Add(this.LagCounterRadio); this.MessageTypeBox.Controls.Add(this.FrameCounterRadio); this.MessageTypeBox.Controls.Add(this.FPSRadio); - this.MessageTypeBox.Location = new System.Drawing.Point(18, 119); + this.MessageTypeBox.Location = new System.Drawing.Point(18, 23); this.MessageTypeBox.Name = "MessageTypeBox"; - this.MessageTypeBox.Size = new System.Drawing.Size(105, 139); + this.MessageTypeBox.Size = new System.Drawing.Size(149, 139); this.MessageTypeBox.TabIndex = 2; this.MessageTypeBox.TabStop = false; this.MessageTypeBox.Text = "Message Type"; // + // MessLabel + // + this.MessLabel.AutoSize = true; + this.MessLabel.Location = new System.Drawing.Point(98, 116); + this.MessLabel.Name = "MessLabel"; + this.MessLabel.Size = new System.Drawing.Size(49, 13); + this.MessLabel.TabIndex = 9; + this.MessLabel.Text = "255, 255"; + // + // InpLabel + // + this.InpLabel.AutoSize = true; + this.InpLabel.Location = new System.Drawing.Point(98, 92); + this.InpLabel.Name = "InpLabel"; + this.InpLabel.Size = new System.Drawing.Size(49, 13); + this.InpLabel.TabIndex = 8; + this.InpLabel.Text = "255, 255"; + // + // LagLabel + // + this.LagLabel.AutoSize = true; + this.LagLabel.Location = new System.Drawing.Point(98, 68); + this.LagLabel.Name = "LagLabel"; + this.LagLabel.Size = new System.Drawing.Size(49, 13); + this.LagLabel.TabIndex = 7; + this.LagLabel.Text = "255, 255"; + // + // FCLabel + // + this.FCLabel.AutoSize = true; + this.FCLabel.Location = new System.Drawing.Point(98, 44); + this.FCLabel.Name = "FCLabel"; + this.FCLabel.Size = new System.Drawing.Size(49, 13); + this.FCLabel.TabIndex = 6; + this.FCLabel.Text = "255, 255"; + // + // FpsPosLabel + // + this.FpsPosLabel.AutoSize = true; + this.FpsPosLabel.Location = new System.Drawing.Point(98, 20); + this.FpsPosLabel.Name = "FpsPosLabel"; + this.FpsPosLabel.Size = new System.Drawing.Size(49, 13); + this.FpsPosLabel.TabIndex = 5; + this.FpsPosLabel.Text = "255, 255"; + // // MessagesRadio // this.MessagesRadio.AutoSize = true; @@ -143,7 +200,7 @@ this.groupBox1.Controls.Add(this.YNumeric); this.groupBox1.Controls.Add(this.XNumeric); this.groupBox1.Controls.Add(this.PositionPanel); - this.groupBox1.Location = new System.Drawing.Point(144, 119); + this.groupBox1.Location = new System.Drawing.Point(182, 23); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(267, 166); this.groupBox1.TabIndex = 3; @@ -210,18 +267,19 @@ // // groupBox2 // + this.groupBox2.Controls.Add(this.textBox1); this.groupBox2.Controls.Add(this.button1); this.groupBox2.Controls.Add(this.MessageColorBox); - this.groupBox2.Location = new System.Drawing.Point(18, 13); + this.groupBox2.Location = new System.Drawing.Point(24, 212); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(393, 100); + this.groupBox2.Size = new System.Drawing.Size(156, 88); this.groupBox2.TabIndex = 4; this.groupBox2.TabStop = false; this.groupBox2.Text = "Message Color"; // // button1 // - this.button1.Location = new System.Drawing.Point(48, 45); + this.button1.Location = new System.Drawing.Point(77, 53); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(65, 23); this.button1.TabIndex = 1; @@ -231,7 +289,7 @@ // // MessageColorBox // - this.MessageColorBox.Location = new System.Drawing.Point(6, 38); + this.MessageColorBox.Location = new System.Drawing.Point(12, 19); this.MessageColorBox.Name = "MessageColorBox"; this.MessageColorBox.Size = new System.Drawing.Size(36, 30); this.MessageColorBox.TabIndex = 0; @@ -241,7 +299,7 @@ // this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.Cancel.Location = new System.Drawing.Point(417, 398); + this.Cancel.Location = new System.Drawing.Point(417, 314); this.Cancel.Name = "Cancel"; this.Cancel.Size = new System.Drawing.Size(75, 23); this.Cancel.TabIndex = 5; @@ -249,13 +307,34 @@ this.Cancel.UseVisualStyleBackColor = true; this.Cancel.Click += new System.EventHandler(this.Cancel_Click); // + // ResetDefaultsButton + // + this.ResetDefaultsButton.Location = new System.Drawing.Point(18, 316); + this.ResetDefaultsButton.Name = "ResetDefaultsButton"; + this.ResetDefaultsButton.Size = new System.Drawing.Size(96, 23); + this.ResetDefaultsButton.TabIndex = 6; + this.ResetDefaultsButton.Text = "Restore Defaults"; + this.ResetDefaultsButton.UseVisualStyleBackColor = true; + this.ResetDefaultsButton.Click += new System.EventHandler(this.ResetDefaultsButton_Click); + // + // textBox1 + // + this.textBox1.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper; + this.textBox1.Location = new System.Drawing.Point(12, 55); + this.textBox1.MaxLength = 8; + this.textBox1.Name = "textBox1"; + this.textBox1.ReadOnly = true; + this.textBox1.Size = new System.Drawing.Size(59, 20); + this.textBox1.TabIndex = 2; + // // MessageConfig // this.AcceptButton = this.OK; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.Cancel; - this.ClientSize = new System.Drawing.Size(504, 433); + this.ClientSize = new System.Drawing.Size(504, 349); + this.Controls.Add(this.ResetDefaultsButton); this.Controls.Add(this.Cancel); this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox1); @@ -271,6 +350,7 @@ ((System.ComponentModel.ISupportInitialize)(this.YNumeric)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.XNumeric)).EndInit(); this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); this.ResumeLayout(false); } @@ -295,5 +375,12 @@ private System.Windows.Forms.GroupBox MessageColorBox; private System.Windows.Forms.ColorDialog MessageColorDialog; private System.Windows.Forms.Button Cancel; + private System.Windows.Forms.Label MessLabel; + private System.Windows.Forms.Label InpLabel; + private System.Windows.Forms.Label LagLabel; + private System.Windows.Forms.Label FCLabel; + private System.Windows.Forms.Label FpsPosLabel; + private System.Windows.Forms.Button ResetDefaultsButton; + private System.Windows.Forms.TextBox textBox1; } } \ No newline at end of file diff --git a/BizHawk.MultiClient/config/MessageConfig.cs b/BizHawk.MultiClient/config/MessageConfig.cs index 07cc88cd55..d4aee7fe06 100644 --- a/BizHawk.MultiClient/config/MessageConfig.cs +++ b/BizHawk.MultiClient/config/MessageConfig.cs @@ -13,9 +13,12 @@ namespace BizHawk.MultiClient { //TODO: //crash if moving too far off drawing area while dragging - //Put x & y after each radio dial, right aligned on box and update those when necessary //Get message color box working //Add read only edit box to display message color as hex value + //Implement message position as a variable + //Make a checkbox to enable/disable the stacking effect of message label + //Implement restore defaults + //Deal with typing into Numerics properly int DispFPSx = Global.Config.DispFPSx; int DispFPSy = Global.Config.DispFPSy; @@ -96,6 +99,7 @@ namespace BizHawk.MultiClient } PositionPanel.Refresh(); + SetPositionLabels(); } private void SaveSettings() @@ -147,15 +151,22 @@ namespace BizHawk.MultiClient SetPositionInfo(); } - private void XNumeric_ValueChanged(object sender, EventArgs e) + private void XNumericChange() { px = (int)XNumeric.Value; + SetPositionLabels(); PositionPanel.Refresh(); } + private void XNumeric_ValueChanged(object sender, EventArgs e) + { + XNumericChange(); + } + private void YNumeric_ValueChanged(object sender, EventArgs e) { py = (int)XNumeric.Value; + SetPositionLabels(); PositionPanel.Refresh(); } @@ -201,6 +212,7 @@ namespace BizHawk.MultiClient px = mx; py = my; PositionPanel.Refresh(); + SetPositionLabels(); } private void PositionPanel_MouseMove(object sender, MouseEventArgs e) @@ -208,5 +220,43 @@ namespace BizHawk.MultiClient if (mousedown) SetNewPosition(e.X, e.Y); } + + private void SetPositionLabels() + { + if (FPSRadio.Checked) + { + DispFPSx = px; + DispFPSy = py; + } + else if (FrameCounterRadio.Checked) + { + DispFrameCx = px; + DispFrameCy = py; + } + else if (LagCounterRadio.Checked) + { + DispLagx = px; + DispLagy = py; + } + else if (InputDisplayRadio.Checked) + { + DispInpx = px; + DispInpy = py; + } + else if (MessagesRadio.Checked) + { + //TODO + } + FpsPosLabel.Text = DispFPSx.ToString() + ", " + DispFPSy.ToString(); + FCLabel.Text = DispFrameCx.ToString() + ", " + DispFrameCy.ToString(); + LagLabel.Text = DispLagx.ToString() + ", " + DispLagy.ToString(); + InpLabel.Text = DispInpx.ToString() + ", " + DispInpy.ToString(); + MessLabel.Text = "0, 0"; + } + + private void ResetDefaultsButton_Click(object sender, EventArgs e) + { + //TODO + } } }