diff --git a/BizHawk.MultiClient/Config.cs b/BizHawk.MultiClient/Config.cs index ca1fc2cce3..5706a50c5d 100644 --- a/BizHawk.MultiClient/Config.cs +++ b/BizHawk.MultiClient/Config.cs @@ -239,6 +239,9 @@ namespace BizHawk.MultiClient public int DispMessagex = 3; public int DispMessagey = 0; public int DispMessageanchor = 2; + public int DispAutoholdx = 0; + public int DispAutoholdy = 0; + public int DispAutoholdanchor = 1; // Sound options public bool SoundEnabled = true; diff --git a/BizHawk.MultiClient/DisplayManager/DisplayManager.cs b/BizHawk.MultiClient/DisplayManager/DisplayManager.cs index ba662d5bae..c351c9f559 100644 --- a/BizHawk.MultiClient/DisplayManager/DisplayManager.cs +++ b/BizHawk.MultiClient/DisplayManager/DisplayManager.cs @@ -573,7 +573,8 @@ namespace BizHawk.MultiClient disp.Append(' '); } - g.DrawString(disp.ToString(), MessageFont, Color.White, GetX(g, 0, 3, MessageFont, disp.ToString()), 0); + g.DrawString(disp.ToString(), MessageFont, Color.White, GetX(g, Global.Config.DispAutoholdx, Global.Config.DispAutoholdanchor, MessageFont, + disp.ToString()), GetY(g, Global.Config.DispAutoholdy, Global.Config.DispAutoholdanchor, MessageFont, disp.ToString())); } //TODO diff --git a/BizHawk.MultiClient/config/MessageConfig.Designer.cs b/BizHawk.MultiClient/config/MessageConfig.Designer.cs index 8f2c05d53f..6154e6f9c4 100644 --- a/BizHawk.MultiClient/config/MessageConfig.Designer.cs +++ b/BizHawk.MultiClient/config/MessageConfig.Designer.cs @@ -78,6 +78,8 @@ 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(); @@ -98,6 +100,8 @@ // // MessageTypeBox // + this.MessageTypeBox.Controls.Add(this.AutoholdLabel); + this.MessageTypeBox.Controls.Add(this.AutoholdRadio); this.MessageTypeBox.Controls.Add(this.MultitrackLabel); this.MessageTypeBox.Controls.Add(this.MultitrackRadio); this.MessageTypeBox.Controls.Add(this.RerecLabel); @@ -114,16 +118,16 @@ this.MessageTypeBox.Controls.Add(this.FPSRadio); this.MessageTypeBox.Location = new System.Drawing.Point(12, 12); this.MessageTypeBox.Name = "MessageTypeBox"; - this.MessageTypeBox.Size = new System.Drawing.Size(177, 187); + this.MessageTypeBox.Size = new System.Drawing.Size(177, 216); this.MessageTypeBox.TabIndex = 2; this.MessageTypeBox.TabStop = false; this.MessageTypeBox.Text = "Message Type"; // // MultitrackLabel // - this.MultitrackLabel.Anchor = System.Windows.Forms.AnchorStyles.None; + this.MultitrackLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.MultitrackLabel.AutoSize = true; - this.MultitrackLabel.Location = new System.Drawing.Point(126, 163); + this.MultitrackLabel.Location = new System.Drawing.Point(126, 164); this.MultitrackLabel.Name = "MultitrackLabel"; this.MultitrackLabel.Size = new System.Drawing.Size(49, 13); this.MultitrackLabel.TabIndex = 13; @@ -132,7 +136,7 @@ // MultitrackRadio // this.MultitrackRadio.AutoSize = true; - this.MultitrackRadio.Location = new System.Drawing.Point(6, 161); + this.MultitrackRadio.Location = new System.Drawing.Point(6, 162); this.MultitrackRadio.Name = "MultitrackRadio"; this.MultitrackRadio.Size = new System.Drawing.Size(71, 17); this.MultitrackRadio.TabIndex = 12; @@ -143,9 +147,9 @@ // // RerecLabel // - this.RerecLabel.Anchor = System.Windows.Forms.AnchorStyles.None; + this.RerecLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.RerecLabel.AutoSize = true; - this.RerecLabel.Location = new System.Drawing.Point(126, 141); + this.RerecLabel.Location = new System.Drawing.Point(126, 140); this.RerecLabel.Name = "RerecLabel"; this.RerecLabel.Size = new System.Drawing.Size(49, 13); this.RerecLabel.TabIndex = 11; @@ -154,7 +158,7 @@ // RerecordsRadio // this.RerecordsRadio.AutoSize = true; - this.RerecordsRadio.Location = new System.Drawing.Point(6, 137); + this.RerecordsRadio.Location = new System.Drawing.Point(6, 138); this.RerecordsRadio.Name = "RerecordsRadio"; this.RerecordsRadio.Size = new System.Drawing.Size(74, 17); this.RerecordsRadio.TabIndex = 10; @@ -164,7 +168,7 @@ // // MessLabel // - this.MessLabel.Anchor = System.Windows.Forms.AnchorStyles.None; + this.MessLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.MessLabel.AutoSize = true; this.MessLabel.Location = new System.Drawing.Point(126, 116); this.MessLabel.Name = "MessLabel"; @@ -174,7 +178,7 @@ // // InpLabel // - this.InpLabel.Anchor = System.Windows.Forms.AnchorStyles.None; + this.InpLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.InpLabel.AutoSize = true; this.InpLabel.Location = new System.Drawing.Point(126, 92); this.InpLabel.Name = "InpLabel"; @@ -184,7 +188,7 @@ // // LagLabel // - this.LagLabel.Anchor = System.Windows.Forms.AnchorStyles.None; + this.LagLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.LagLabel.AutoSize = true; this.LagLabel.Location = new System.Drawing.Point(126, 68); this.LagLabel.Name = "LagLabel"; @@ -194,7 +198,7 @@ // // FCLabel // - this.FCLabel.Anchor = System.Windows.Forms.AnchorStyles.None; + this.FCLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.FCLabel.AutoSize = true; this.FCLabel.Location = new System.Drawing.Point(126, 44); this.FCLabel.Name = "FCLabel"; @@ -204,7 +208,7 @@ // // FpsPosLabel // - this.FpsPosLabel.Anchor = System.Windows.Forms.AnchorStyles.None; + this.FpsPosLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.FpsPosLabel.AutoSize = true; this.FpsPosLabel.Location = new System.Drawing.Point(126, 20); this.FpsPosLabel.Name = "FpsPosLabel"; @@ -287,9 +291,9 @@ this.groupBox2.Controls.Add(this.label4); this.groupBox2.Controls.Add(this.label3); this.groupBox2.Controls.Add(this.ColorText); - this.groupBox2.Location = new System.Drawing.Point(12, 205); + this.groupBox2.Location = new System.Drawing.Point(12, 234); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(177, 252); + this.groupBox2.Size = new System.Drawing.Size(177, 223); this.groupBox2.TabIndex = 4; this.groupBox2.TabStop = false; this.groupBox2.Text = "Message Colors"; @@ -628,6 +632,28 @@ 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; @@ -713,5 +739,7 @@ private System.Windows.Forms.Label MultitrackLabel; private System.Windows.Forms.RadioButton MultitrackRadio; private System.Windows.Forms.CheckBox StackMessagesCheckbox; + private System.Windows.Forms.Label AutoholdLabel; + private System.Windows.Forms.RadioButton AutoholdRadio; } } \ No newline at end of file diff --git a/BizHawk.MultiClient/config/MessageConfig.cs b/BizHawk.MultiClient/config/MessageConfig.cs index c891098a4e..a742227f54 100644 --- a/BizHawk.MultiClient/config/MessageConfig.cs +++ b/BizHawk.MultiClient/config/MessageConfig.cs @@ -31,6 +31,8 @@ namespace BizHawk.MultiClient int DispMultiy = Global.Config.DispMultiy; int DispMessagex = Global.Config.DispMessagex; int DispMessagey = Global.Config.DispMessagey; + int DispAutoholdx = Global.Config.DispAutoholdx; + int DispAutoholdy = Global.Config.DispAutoholdy; int MessageColor = Global.Config.MessagesColor; int AlertColor = Global.Config.AlertMessageColor; @@ -43,6 +45,7 @@ namespace BizHawk.MultiClient int DispRecanchor = Global.Config.DispRecanchor; int DispMultiAnchor = Global.Config.DispMultianchor; int DispMessageAnchor = Global.Config.DispMessageanchor; + int DispAutoholdAnchor = Global.Config.DispAutoholdanchor; public Brush brush = Brushes.Black; int px = 0; @@ -174,6 +177,14 @@ namespace BizHawk.MultiClient py = DispMultiy; SetAnchorRadio(DispMultiAnchor); } + else if (AutoholdRadio.Checked) + { + XNumeric.Value = DispAutoholdx; + YNumeric.Value = DispAutoholdy; + px = DispAutoholdx; + py = DispAutoholdy; + SetAnchorRadio(DispAutoholdAnchor); + } PositionPanel.Refresh(); XNumeric.Refresh(); @@ -197,6 +208,8 @@ namespace BizHawk.MultiClient Global.Config.DispMultiy = DispMultiy; Global.Config.DispMessagex = DispMessagex; Global.Config.DispMessagey = DispMessagey; + Global.Config.DispAutoholdx = DispAutoholdx; + Global.Config.DispAutoholdy = DispAutoholdy; Global.Config.MessagesColor = MessageColor; Global.Config.AlertMessageColor = AlertColor; @@ -209,6 +222,7 @@ namespace BizHawk.MultiClient Global.Config.DispRecanchor = DispRecanchor; Global.Config.DispMultianchor = DispMultiAnchor; Global.Config.DispMessageanchor = DispMessageAnchor; + Global.Config.DispAutoholdanchor = DispAutoholdAnchor; Global.Config.StackOSDMessages = StackMessagesCheckbox.Checked; } @@ -255,6 +269,11 @@ namespace BizHawk.MultiClient SetPositionInfo(); } + private void AutoholdRadio_CheckedChanged(object sender, EventArgs e) + { + SetPositionInfo(); + } + private void XNumericChange() { px = (int)XNumeric.Value; @@ -350,10 +369,6 @@ namespace BizHawk.MultiClient DispInpx = px; DispInpy = py; } - else if (MessagesRadio.Checked) - { - //TODO - } else if (RerecordsRadio.Checked) { DispRecx = px; @@ -369,6 +384,11 @@ namespace BizHawk.MultiClient DispMessagex = px; DispMessagey = py; } + else if (AutoholdRadio.Checked) + { + DispAutoholdx = px; + DispAutoholdy = py; + } FpsPosLabel.Text = DispFPSx.ToString() + ", " + DispFPSy.ToString(); FCLabel.Text = DispFrameCx.ToString() + ", " + DispFrameCy.ToString(); @@ -377,6 +397,7 @@ namespace BizHawk.MultiClient RerecLabel.Text = DispRecx.ToString() + ", " + DispRecy.ToString(); MultitrackLabel.Text = DispMultix.ToString() + ", " + DispMultiy.ToString(); MessLabel.Text = DispMessagex.ToString() + ", " + DispMessagey.ToString(); + AutoholdLabel.Text = DispAutoholdx.ToString() + ", " + DispAutoholdy.ToString(); } private void ResetDefaultsButton_Click(object sender, EventArgs e) @@ -395,6 +416,8 @@ namespace BizHawk.MultiClient Global.Config.DispMultiy = 0; Global.Config.DispMessagex = 3; Global.Config.DispMessagey = 0; + Global.Config.DispAutoholdx = 0; + Global.Config.DispAutoholdy = 0; Global.Config.MessagesColor = -1; Global.Config.AlertMessageColor = -65536; @@ -418,6 +441,7 @@ namespace BizHawk.MultiClient Global.Config.DispRecanchor = 0; Global.Config.DispMultianchor = 0; Global.Config.DispMessageanchor = 2; + Global.Config.DispAutoholdanchor = 1; DispFPSx = Global.Config.DispFPSx; DispFPSy = Global.Config.DispFPSy; @@ -433,6 +457,8 @@ namespace BizHawk.MultiClient DispMultiy = Global.Config.DispMultiy; DispMessagex = Global.Config.DispMessagex; DispMessagey = Global.Config.DispMessagey; + DispAutoholdx = Global.Config.DispAutoholdx; + DispAutoholdy = Global.Config.DispAutoholdy; DispFPSanchor = Global.Config.DispFPSanchor; DispFrameanchor = Global.Config.DispFrameanchor; @@ -441,6 +467,7 @@ namespace BizHawk.MultiClient DispRecanchor = Global.Config.DispRecanchor; DispMultiAnchor = Global.Config.DispMultianchor; DispMessageAnchor = Global.Config.DispMessageanchor; + DispAutoholdAnchor = Global.Config.DispAutoholdanchor; SetMaxXY(); SetColorBox(); @@ -479,6 +506,10 @@ namespace BizHawk.MultiClient { DispMultiAnchor = value; } + else if (AutoholdRadio.Checked) + { + DispAutoholdAnchor = value; + } } private void TL_CheckedChanged(object sender, EventArgs e)