Message config - add movie input color

This commit is contained in:
andres.delikat 2011-07-10 03:13:07 +00:00
parent 4991b95def
commit 9ea996b0fe
5 changed files with 99 additions and 25 deletions

View File

@ -122,6 +122,7 @@
public int AlertMessageColor = -65536; public int AlertMessageColor = -65536;
public int LastInputColor = -23296; public int LastInputColor = -23296;
public int MovieColor = -65536; public int MovieColor = -65536;
public int MovieInput = -8355712;
public bool DisplayFPS = false; public bool DisplayFPS = false;
public int DispFPSx = 0; public int DispFPSx = 0;
public int DispFPSy = 0; public int DispFPSy = 0;

View File

@ -326,7 +326,6 @@ namespace BizHawk.MultiClient
public void DrawScreenInfo() public void DrawScreenInfo()
{ {
int x, y; int x, y;
//TODO: If movie loaded use that frame counter, and also display total movie frame count if read-only
if (Global.Config.DisplayFrameCounter) if (Global.Config.DisplayFrameCounter)
{ {
x = GetX(Global.Config.DispFrameCx, Global.Config.DispFrameanchor); x = GetX(Global.Config.DispFrameCx, Global.Config.DispFrameanchor);
@ -343,7 +342,7 @@ namespace BizHawk.MultiClient
y = GetY(Global.Config.DispInpy, Global.Config.DispInpanchor); y = GetY(Global.Config.DispInpy, Global.Config.DispInpanchor);
if (Global.MainForm.UserMovie.GetMovieMode() == MOVIEMODE.PLAY) if (Global.MainForm.UserMovie.GetMovieMode() == MOVIEMODE.PLAY)
{ {
c = Color.Gray; c = Color.FromArgb(Global.Config.MovieInput);
} }
else else
c = Color.FromArgb(Global.Config.MessagesColor); c = Color.FromArgb(Global.Config.MessagesColor);

View File

@ -43,6 +43,11 @@
this.FrameCounterRadio = new System.Windows.Forms.RadioButton(); this.FrameCounterRadio = new System.Windows.Forms.RadioButton();
this.FPSRadio = new System.Windows.Forms.RadioButton(); this.FPSRadio = new System.Windows.Forms.RadioButton();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label12 = new System.Windows.Forms.Label();
this.MovieInputText = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.MovieInputColor = new System.Windows.Forms.Panel();
this.label10 = new System.Windows.Forms.Label();
this.MovieColorText = new System.Windows.Forms.TextBox(); this.MovieColorText = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label();
this.MovieColorPanel = new System.Windows.Forms.Panel(); this.MovieColorPanel = new System.Windows.Forms.Panel();
@ -74,7 +79,7 @@
this.AlertColorDialog = new System.Windows.Forms.ColorDialog(); this.AlertColorDialog = new System.Windows.Forms.ColorDialog();
this.LInputColorDialog = new System.Windows.Forms.ColorDialog(); this.LInputColorDialog = new System.Windows.Forms.ColorDialog();
this.MovieColorDialog = new System.Windows.Forms.ColorDialog(); this.MovieColorDialog = new System.Windows.Forms.ColorDialog();
this.label10 = new System.Windows.Forms.Label(); this.MovieInputColorDialog = new System.Windows.Forms.ColorDialog();
this.MessageTypeBox.SuspendLayout(); this.MessageTypeBox.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.XNumeric)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.XNumeric)).BeginInit();
@ -245,6 +250,10 @@
// //
// groupBox2 // groupBox2
// //
this.groupBox2.Controls.Add(this.label12);
this.groupBox2.Controls.Add(this.MovieInputText);
this.groupBox2.Controls.Add(this.label11);
this.groupBox2.Controls.Add(this.MovieInputColor);
this.groupBox2.Controls.Add(this.label10); this.groupBox2.Controls.Add(this.label10);
this.groupBox2.Controls.Add(this.MovieColorText); this.groupBox2.Controls.Add(this.MovieColorText);
this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label9);
@ -263,15 +272,61 @@
this.groupBox2.Controls.Add(this.ColorText); this.groupBox2.Controls.Add(this.ColorText);
this.groupBox2.Location = new System.Drawing.Point(12, 205); this.groupBox2.Location = new System.Drawing.Point(12, 205);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(177, 223); this.groupBox2.Size = new System.Drawing.Size(177, 252);
this.groupBox2.TabIndex = 4; this.groupBox2.TabIndex = 4;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "Message Colors"; this.groupBox2.Text = "Message Colors";
// //
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(1, 170);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(63, 13);
this.label12.TabIndex = 24;
this.label12.Text = "Movie Input";
//
// MovieInputText
//
this.MovieInputText.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.MovieInputText.Location = new System.Drawing.Point(45, 187);
this.MovieInputText.MaxLength = 8;
this.MovieInputText.Name = "MovieInputText";
this.MovieInputText.ReadOnly = true;
this.MovieInputText.Size = new System.Drawing.Size(59, 20);
this.MovieInputText.TabIndex = 23;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(28, 190);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(18, 13);
this.label11.TabIndex = 22;
this.label11.Text = "0x";
//
// MovieInputColor
//
this.MovieInputColor.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.MovieInputColor.Location = new System.Drawing.Point(4, 187);
this.MovieInputColor.Name = "MovieInputColor";
this.MovieInputColor.Size = new System.Drawing.Size(20, 20);
this.MovieInputColor.TabIndex = 9;
this.MovieInputColor.DoubleClick += new System.EventHandler(this.MovieInputColor_DoubleClick);
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(3, 214);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(86, 13);
this.label10.TabIndex = 21;
this.label10.Text = "Movie messages";
//
// MovieColorText // MovieColorText
// //
this.MovieColorText.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper; this.MovieColorText.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.MovieColorText.Location = new System.Drawing.Point(45, 186); this.MovieColorText.Location = new System.Drawing.Point(45, 229);
this.MovieColorText.MaxLength = 8; this.MovieColorText.MaxLength = 8;
this.MovieColorText.Name = "MovieColorText"; this.MovieColorText.Name = "MovieColorText";
this.MovieColorText.ReadOnly = true; this.MovieColorText.ReadOnly = true;
@ -281,7 +336,7 @@
// label9 // label9
// //
this.label9.AutoSize = true; this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(28, 189); this.label9.Location = new System.Drawing.Point(28, 234);
this.label9.Name = "label9"; this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(18, 13); this.label9.Size = new System.Drawing.Size(18, 13);
this.label9.TabIndex = 19; this.label9.TabIndex = 19;
@ -290,7 +345,7 @@
// MovieColorPanel // MovieColorPanel
// //
this.MovieColorPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.MovieColorPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.MovieColorPanel.Location = new System.Drawing.Point(6, 186); this.MovieColorPanel.Location = new System.Drawing.Point(4, 229);
this.MovieColorPanel.Name = "MovieColorPanel"; this.MovieColorPanel.Name = "MovieColorPanel";
this.MovieColorPanel.Size = new System.Drawing.Size(20, 20); this.MovieColorPanel.Size = new System.Drawing.Size(20, 20);
this.MovieColorPanel.TabIndex = 8; this.MovieColorPanel.TabIndex = 8;
@ -422,7 +477,7 @@
// ResetDefaultsButton // ResetDefaultsButton
// //
this.ResetDefaultsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.ResetDefaultsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.ResetDefaultsButton.Location = new System.Drawing.Point(12, 434); this.ResetDefaultsButton.Location = new System.Drawing.Point(195, 434);
this.ResetDefaultsButton.Name = "ResetDefaultsButton"; this.ResetDefaultsButton.Name = "ResetDefaultsButton";
this.ResetDefaultsButton.Size = new System.Drawing.Size(96, 23); this.ResetDefaultsButton.Size = new System.Drawing.Size(96, 23);
this.ResetDefaultsButton.TabIndex = 6; this.ResetDefaultsButton.TabIndex = 6;
@ -567,15 +622,6 @@
this.TL.UseVisualStyleBackColor = true; this.TL.UseVisualStyleBackColor = true;
this.TL.Click += new System.EventHandler(this.TL_CheckedChanged); this.TL.Click += new System.EventHandler(this.TL_CheckedChanged);
// //
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(3, 170);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(86, 13);
this.label10.TabIndex = 21;
this.label10.Text = "Movie messages";
//
// MessageConfig // MessageConfig
// //
this.AcceptButton = this.OK; this.AcceptButton = this.OK;
@ -655,5 +701,10 @@
private System.Windows.Forms.Panel MovieColorPanel; private System.Windows.Forms.Panel MovieColorPanel;
private System.Windows.Forms.ColorDialog MovieColorDialog; private System.Windows.Forms.ColorDialog MovieColorDialog;
private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox MovieInputText;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Panel MovieInputColor;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.ColorDialog MovieInputColorDialog;
} }
} }

View File

@ -36,6 +36,7 @@ namespace BizHawk.MultiClient
int MessageColor = Global.Config.MessagesColor; int MessageColor = Global.Config.MessagesColor;
int AlertColor = Global.Config.AlertMessageColor; int AlertColor = Global.Config.AlertMessageColor;
int MovieColor = Global.Config.MovieColor; int MovieColor = Global.Config.MovieColor;
int MovieInput = Global.Config.MovieInput;
int DispFPSanchor = Global.Config.DispFPSanchor; int DispFPSanchor = Global.Config.DispFPSanchor;
int DispFrameanchor = Global.Config.DispFrameanchor; int DispFrameanchor = Global.Config.DispFrameanchor;
@ -60,6 +61,7 @@ namespace BizHawk.MultiClient
AlertColorDialog.Color = Color.FromArgb(AlertColor); AlertColorDialog.Color = Color.FromArgb(AlertColor);
LInputColorDialog.Color = Color.FromArgb(LastInputColor); LInputColorDialog.Color = Color.FromArgb(LastInputColor);
MovieColorDialog.Color = Color.FromArgb(MovieColor); MovieColorDialog.Color = Color.FromArgb(MovieColor);
MovieInputColorDialog.Color = Color.FromArgb(MovieInput);
SetColorBox(); SetColorBox();
SetPositionInfo(); SetPositionInfo();
} }
@ -96,6 +98,10 @@ namespace BizHawk.MultiClient
MovieColor = MovieColorDialog.Color.ToArgb(); MovieColor = MovieColorDialog.Color.ToArgb();
MovieColorPanel.BackColor = MovieColorDialog.Color; MovieColorPanel.BackColor = MovieColorDialog.Color;
MovieColorText.Text = String.Format("{0:X8}", MovieColor); MovieColorText.Text = String.Format("{0:X8}", MovieColor);
MovieInput = MovieInputColorDialog.Color.ToArgb();
MovieInputColor.BackColor = MovieInputColorDialog.Color;
MovieInputText.Text = String.Format("{0:X8}", MovieInput);
} }
private void SetAnchorRadio(int anchor) private void SetAnchorRadio(int anchor)
@ -186,6 +192,7 @@ namespace BizHawk.MultiClient
Global.Config.AlertMessageColor = AlertColor; Global.Config.AlertMessageColor = AlertColor;
Global.Config.LastInputColor = LastInputColor; Global.Config.LastInputColor = LastInputColor;
Global.Config.MovieColor = MovieColor; Global.Config.MovieColor = MovieColor;
Global.Config.MovieInput = MovieInput;
Global.Config.DispFPSanchor = DispFPSanchor; Global.Config.DispFPSanchor = DispFPSanchor;
Global.Config.DispFrameanchor = DispFrameanchor; Global.Config.DispFrameanchor = DispFrameanchor;
@ -353,17 +360,31 @@ namespace BizHawk.MultiClient
Global.Config.DispInpy = 24; Global.Config.DispInpy = 24;
Global.Config.DispRecx = 0; Global.Config.DispRecx = 0;
Global.Config.DispRecy = 48; Global.Config.DispRecy = 48;
Global.Config.MessagesColor = -1; Global.Config.MessagesColor = -1;
Global.Config.AlertMessageColor = -65536; Global.Config.AlertMessageColor = -65536;
Global.Config.LastInputColor = -23296; Global.Config.LastInputColor = -23296;
Global.Config.MovieColor = -65536; Global.Config.MovieColor = -65536;
Global.Config.MovieInput = -8355712;
MessageColor = Global.Config.MessagesColor;
AlertColor = Global.Config.AlertMessageColor;
LastInputColor = Global.Config.LastInputColor;
MovieColor = Global.Config.MovieColor;
MovieInput = Global.Config.MovieInput;
MessageColorDialog.Color = Color.FromArgb(MessageColor);
AlertColorDialog.Color = Color.FromArgb(AlertColor);
LInputColorDialog.Color = Color.FromArgb(LastInputColor);
MovieColorDialog.Color = Color.FromArgb(MovieColor);
MovieInputColorDialog.Color = Color.FromArgb(MovieInput);
Global.Config.DispFPSanchor = 0; Global.Config.DispFPSanchor = 0;
Global.Config.DispFrameanchor = 0; Global.Config.DispFrameanchor = 0;
Global.Config.DispLaganchor = 0; Global.Config.DispLaganchor = 0;
Global.Config.DispInpanchor = 0; Global.Config.DispInpanchor = 0;
Global.Config.DispRecanchor = 0; Global.Config.DispRecanchor = 0;
DispFPSx = Global.Config.DispFPSx; DispFPSx = Global.Config.DispFPSx;
DispFPSy = Global.Config.DispFPSy; DispFPSy = Global.Config.DispFPSy;
DispFrameCx = Global.Config.DispFrameCx; DispFrameCx = Global.Config.DispFrameCx;
@ -375,10 +396,6 @@ namespace BizHawk.MultiClient
DispRecx = Global.Config.DispRecx; DispRecx = Global.Config.DispRecx;
DispRecy = Global.Config.DispRecy; DispRecy = Global.Config.DispRecy;
MessageColor = Global.Config.MessagesColor;
AlertColor = Global.Config.AlertMessageColor;
LastInputColor = Global.Config.LastInputColor;
DispFPSanchor = Global.Config.DispFPSanchor; DispFPSanchor = Global.Config.DispFPSanchor;
DispFrameanchor = Global.Config.DispFrameanchor; DispFrameanchor = Global.Config.DispFrameanchor;
DispLaganchor = Global.Config.DispLaganchor; DispLaganchor = Global.Config.DispLaganchor;
@ -386,9 +403,6 @@ namespace BizHawk.MultiClient
DispRecanchor = Global.Config.DispRecanchor; DispRecanchor = Global.Config.DispRecanchor;
SetMaxXY(); SetMaxXY();
MessageColorDialog.Color = Color.FromArgb(MessageColor);
AlertColorDialog.Color = Color.FromArgb(AlertColor);
LInputColorDialog.Color = Color.FromArgb(LastInputColor);
SetColorBox(); SetColorBox();
SetPositionInfo(); SetPositionInfo();
} }
@ -494,5 +508,11 @@ namespace BizHawk.MultiClient
if (MovieColorDialog.ShowDialog() == DialogResult.OK) if (MovieColorDialog.ShowDialog() == DialogResult.OK)
SetColorBox(); SetColorBox();
} }
private void MovieInputColor_DoubleClick(object sender, EventArgs e)
{
if (MovieInputColorDialog.ShowDialog() == DialogResult.OK)
SetColorBox();
}
} }
} }

View File

@ -129,4 +129,7 @@
<metadata name="MovieColorDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="MovieColorDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>440, 17</value> <value>440, 17</value>
</metadata> </metadata>
<metadata name="MovieInputColorDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>577, 17</value>
</metadata>
</root> </root>