From 00c4db8eeb34d81247b98b3168317cb0b460e9df Mon Sep 17 00:00:00 2001 From: goyuken Date: Wed, 14 Nov 2012 15:23:38 +0000 Subject: [PATCH] gb gpu view: save sprite back color in config, and set default to a gameboy-impossible color --- BizHawk.MultiClient/Config.cs | 2 +- .../GBtools/GBGPUView.Designer.cs | 32 +++++++++---------- BizHawk.MultiClient/GBtools/GBGPUView.cs | 3 +- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/BizHawk.MultiClient/Config.cs b/BizHawk.MultiClient/Config.cs index aa674a7945..7f8aa8381f 100644 --- a/BizHawk.MultiClient/Config.cs +++ b/BizHawk.MultiClient/Config.cs @@ -425,7 +425,7 @@ namespace BizHawk.MultiClient public bool GBGPUViewSaveWindowPosition = true; public int GBGPUViewWndx = -1; public int GBGPUViewWndy = -1; - + public Color GBGPUSpriteBack = Color.Lime; // SNES Graphics Debugger Dialog Settings public bool AutoLoadSNESGraphicsDebugger = false; diff --git a/BizHawk.MultiClient/GBtools/GBGPUView.Designer.cs b/BizHawk.MultiClient/GBtools/GBGPUView.Designer.cs index d95100eae8..70e64e6ff3 100644 --- a/BizHawk.MultiClient/GBtools/GBGPUView.Designer.cs +++ b/BizHawk.MultiClient/GBtools/GBGPUView.Designer.cs @@ -56,9 +56,9 @@ this.checkBoxSavePos = new System.Windows.Forms.CheckBox(); this.checkBoxAutoLoad = new System.Windows.Forms.CheckBox(); this.groupBox8 = new System.Windows.Forms.GroupBox(); - this.panelSpriteBackColor = new System.Windows.Forms.Panel(); - this.buttonChangeColor = new System.Windows.Forms.Button(); this.labelSpriteBackColor = new System.Windows.Forms.Label(); + this.buttonChangeColor = new System.Windows.Forms.Button(); + this.panelSpriteBackColor = new System.Windows.Forms.Panel(); this.bmpViewMemory = new BizHawk.MultiClient.GBtools.BmpView(); this.bmpViewDetails = new BizHawk.MultiClient.GBtools.BmpView(); this.bmpViewOAM = new BizHawk.MultiClient.GBtools.BmpView(); @@ -379,13 +379,14 @@ this.groupBox8.TabStop = false; this.groupBox8.Text = "Sprite Backdrop"; // - // panelSpriteBackColor + // labelSpriteBackColor // - this.panelSpriteBackColor.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.panelSpriteBackColor.Location = new System.Drawing.Point(6, 19); - this.panelSpriteBackColor.Name = "panelSpriteBackColor"; - this.panelSpriteBackColor.Size = new System.Drawing.Size(55, 23); - this.panelSpriteBackColor.TabIndex = 0; + this.labelSpriteBackColor.AutoSize = true; + this.labelSpriteBackColor.Location = new System.Drawing.Point(67, 24); + this.labelSpriteBackColor.Name = "labelSpriteBackColor"; + this.labelSpriteBackColor.Size = new System.Drawing.Size(35, 13); + this.labelSpriteBackColor.TabIndex = 2; + this.labelSpriteBackColor.Text = "label8"; // // buttonChangeColor // @@ -397,14 +398,13 @@ this.buttonChangeColor.UseVisualStyleBackColor = true; this.buttonChangeColor.Click += new System.EventHandler(this.buttonChangeColor_Click); // - // labelSpriteBackColor + // panelSpriteBackColor // - this.labelSpriteBackColor.AutoSize = true; - this.labelSpriteBackColor.Location = new System.Drawing.Point(67, 24); - this.labelSpriteBackColor.Name = "labelSpriteBackColor"; - this.labelSpriteBackColor.Size = new System.Drawing.Size(35, 13); - this.labelSpriteBackColor.TabIndex = 2; - this.labelSpriteBackColor.Text = "label8"; + this.panelSpriteBackColor.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.panelSpriteBackColor.Location = new System.Drawing.Point(6, 19); + this.panelSpriteBackColor.Name = "panelSpriteBackColor"; + this.panelSpriteBackColor.Size = new System.Drawing.Size(55, 23); + this.panelSpriteBackColor.TabIndex = 0; // // bmpViewMemory // @@ -520,7 +520,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(834, 580); + this.ClientSize = new System.Drawing.Size(834, 578); this.Controls.Add(this.groupBox8); this.Controls.Add(this.groupBox7); this.Controls.Add(this.groupBox6); diff --git a/BizHawk.MultiClient/GBtools/GBGPUView.cs b/BizHawk.MultiClient/GBtools/GBGPUView.cs index 31fcc9e66a..05ac394f49 100644 --- a/BizHawk.MultiClient/GBtools/GBGPUView.cs +++ b/BizHawk.MultiClient/GBtools/GBGPUView.cs @@ -67,7 +67,7 @@ namespace BizHawk.MultiClient.GBtools checkBoxSavePos.Checked = Global.Config.GBGPUViewSaveWindowPosition; // TODO: from config - spriteback = Color.Black; + spriteback = Color.FromArgb(255, Global.Config.GBGPUSpriteBack); } public void Restart() @@ -472,6 +472,7 @@ namespace BizHawk.MultiClient.GBtools gb.SetScanlineCallback(null, 0); gb = null; } + Global.Config.GBGPUSpriteBack = spriteback; } private void GBGPUView_Load(object sender, EventArgs e)