NES PPU - Settings dropdown menu in toolstrip - implement autoload & save window position toggling
This commit is contained in:
parent
09ea99323e
commit
28a093adac
|
@ -28,17 +28,23 @@
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NESPPU));
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.PalettesGroup = new System.Windows.Forms.GroupBox();
|
||||
this.DetailsBox = new System.Windows.Forms.GroupBox();
|
||||
this.SectionLabel = new System.Windows.Forms.Label();
|
||||
this.AddressLabel = new System.Windows.Forms.Label();
|
||||
this.ValueLabel = new System.Windows.Forms.Label();
|
||||
this.AddressLabel = new System.Windows.Forms.Label();
|
||||
this.SectionLabel = new System.Windows.Forms.Label();
|
||||
this.PaletteView = new BizHawk.MultiClient.PaletteViewer();
|
||||
this.PatternView = new BizHawk.MultiClient.PatternViewer();
|
||||
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
||||
this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();
|
||||
this.autoloadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveWindowPositionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.PalettesGroup.SuspendLayout();
|
||||
this.DetailsBox.SuspendLayout();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
|
@ -73,14 +79,14 @@
|
|||
this.DetailsBox.TabStop = false;
|
||||
this.DetailsBox.Text = "Details";
|
||||
//
|
||||
// SectionLabel
|
||||
// ValueLabel
|
||||
//
|
||||
this.SectionLabel.AutoSize = true;
|
||||
this.SectionLabel.Location = new System.Drawing.Point(6, 26);
|
||||
this.SectionLabel.Name = "SectionLabel";
|
||||
this.SectionLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.SectionLabel.TabIndex = 0;
|
||||
this.SectionLabel.Text = "label1";
|
||||
this.ValueLabel.AutoSize = true;
|
||||
this.ValueLabel.Location = new System.Drawing.Point(6, 73);
|
||||
this.ValueLabel.Name = "ValueLabel";
|
||||
this.ValueLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.ValueLabel.TabIndex = 2;
|
||||
this.ValueLabel.Text = "label1";
|
||||
//
|
||||
// AddressLabel
|
||||
//
|
||||
|
@ -91,14 +97,14 @@
|
|||
this.AddressLabel.TabIndex = 1;
|
||||
this.AddressLabel.Text = "label1";
|
||||
//
|
||||
// ValueLabel
|
||||
// SectionLabel
|
||||
//
|
||||
this.ValueLabel.AutoSize = true;
|
||||
this.ValueLabel.Location = new System.Drawing.Point(6, 73);
|
||||
this.ValueLabel.Name = "ValueLabel";
|
||||
this.ValueLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.ValueLabel.TabIndex = 2;
|
||||
this.ValueLabel.Text = "label1";
|
||||
this.SectionLabel.AutoSize = true;
|
||||
this.SectionLabel.Location = new System.Drawing.Point(6, 26);
|
||||
this.SectionLabel.Name = "SectionLabel";
|
||||
this.SectionLabel.Size = new System.Drawing.Size(35, 13);
|
||||
this.SectionLabel.TabIndex = 0;
|
||||
this.SectionLabel.Text = "label1";
|
||||
//
|
||||
// PaletteView
|
||||
//
|
||||
|
@ -111,17 +117,57 @@
|
|||
this.PaletteView.MouseMove += new System.Windows.Forms.MouseEventHandler(this.PaletteView_MouseMove);
|
||||
this.PaletteView.MouseEnter += new System.EventHandler(this.PaletteView_MouseEnter);
|
||||
//
|
||||
// label1
|
||||
// PatternView
|
||||
//
|
||||
this.PatternView.BackColor = System.Drawing.Color.White;
|
||||
this.PatternView.Location = new System.Drawing.Point(17, 26);
|
||||
this.PatternView.Name = "PatternView";
|
||||
this.PatternView.Size = new System.Drawing.Size(35, 13);
|
||||
this.PatternView.TabIndex = 0;
|
||||
//
|
||||
// toolStrip1
|
||||
//
|
||||
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripDropDownButton1});
|
||||
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.toolStrip1.Name = "toolStrip1";
|
||||
this.toolStrip1.Size = new System.Drawing.Size(504, 25);
|
||||
this.toolStrip1.TabIndex = 3;
|
||||
this.toolStrip1.Text = "toolStrip1";
|
||||
//
|
||||
// toolStripDropDownButton1
|
||||
//
|
||||
this.toolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.autoloadToolStripMenuItem,
|
||||
this.saveWindowPositionToolStripMenuItem});
|
||||
this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image")));
|
||||
this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
|
||||
this.toolStripDropDownButton1.Size = new System.Drawing.Size(59, 22);
|
||||
this.toolStripDropDownButton1.Text = "Settings";
|
||||
this.toolStripDropDownButton1.DropDownOpened += new System.EventHandler(this.toolStripDropDownButton1_DropDownOpened);
|
||||
//
|
||||
// autoloadToolStripMenuItem
|
||||
//
|
||||
this.autoloadToolStripMenuItem.Name = "autoloadToolStripMenuItem";
|
||||
this.autoloadToolStripMenuItem.Size = new System.Drawing.Size(188, 22);
|
||||
this.autoloadToolStripMenuItem.Text = "Auto-load";
|
||||
this.autoloadToolStripMenuItem.Click += new System.EventHandler(this.autoloadToolStripMenuItem_Click);
|
||||
//
|
||||
// saveWindowPositionToolStripMenuItem
|
||||
//
|
||||
this.saveWindowPositionToolStripMenuItem.Name = "saveWindowPositionToolStripMenuItem";
|
||||
this.saveWindowPositionToolStripMenuItem.Size = new System.Drawing.Size(188, 22);
|
||||
this.saveWindowPositionToolStripMenuItem.Text = "Save window position";
|
||||
this.saveWindowPositionToolStripMenuItem.Click += new System.EventHandler(this.saveWindowPositionToolStripMenuItem_Click);
|
||||
//
|
||||
// NESPPU
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(504, 359);
|
||||
this.Controls.Add(this.toolStrip1);
|
||||
this.Controls.Add(this.DetailsBox);
|
||||
this.Controls.Add(this.PalettesGroup);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
|
@ -130,11 +176,13 @@
|
|||
this.Text = "PPU Viewer";
|
||||
this.Load += new System.EventHandler(this.NESPPU_Load);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.PalettesGroup.ResumeLayout(false);
|
||||
this.DetailsBox.ResumeLayout(false);
|
||||
this.DetailsBox.PerformLayout();
|
||||
this.toolStrip1.ResumeLayout(false);
|
||||
this.toolStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
|
@ -148,5 +196,9 @@
|
|||
private System.Windows.Forms.Label AddressLabel;
|
||||
private System.Windows.Forms.Label SectionLabel;
|
||||
private BizHawk.MultiClient.PatternViewer PatternView;
|
||||
private System.Windows.Forms.ToolStrip toolStrip1;
|
||||
private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButton1;
|
||||
private System.Windows.Forms.ToolStripMenuItem autoloadToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveWindowPositionToolStripMenuItem;
|
||||
}
|
||||
}
|
|
@ -96,5 +96,21 @@ namespace BizHawk.MultiClient
|
|||
val = PaletteView.spritePalettes[column].GetValue();
|
||||
ValueLabel.Text = "Color: 0x" + String.Format("{0:X2}", val, NumberStyles.HexNumber);
|
||||
}
|
||||
|
||||
private void autoloadToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.AutoLoadNESPPU ^= true;
|
||||
}
|
||||
|
||||
private void saveWindowPositionToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.NESPPUSaveWindowPosition ^= true;
|
||||
}
|
||||
|
||||
private void toolStripDropDownButton1_DropDownOpened(object sender, EventArgs e)
|
||||
{
|
||||
autoloadToolStripMenuItem.Checked = Global.Config.AutoLoadNESPPU;
|
||||
saveWindowPositionToolStripMenuItem.Checked = Global.Config.NESPPUSaveWindowPosition;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,4 +117,23 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="toolStripDropDownButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAgxJREFUOE+lkvtL
|
||||
U2EYx+0PEbtpFwnBKPGKiJImGP0gYhIYs1E5GF5gIxkpA00JRSmMEF0ohMh+GaRWYlqabMVcNdS2QpaI
|
||||
VqiDIYhk397vA6fXhCjyhYdzeM/5fp7vczkAdeL2cwho7v/wWzT1zcN+Pwhr51uY2/y41PQaF+wzKKiZ
|
||||
QvaN58g0jyLd5KEUcQbg+84P/Cm2tncQjW3j68YWIqubCC3FcOJc478BAuGoZM6zvoRnakXEruEIjhc4
|
||||
/g5gZop9c+voGAyLbQIfeBZxLL9BA1jzXvuGbWamuKh+GmmVbswE19A59FEBbmoAG7YbsLtm2mZmiml9
|
||||
cvabNDwpz6YB7LYBoMXCumkJr7LOmnnHzBQ/9X2Bo2cOibm1GsBREbAQiYmw/8lnuCeWkVzcgnZlnw1j
|
||||
3HV/wuNXK6i/9x5Hc6wawDlTXHbLJ+LZUBQPRyKwdQdxutwl1h+NLXHh5Ht1ewBHsiwawCW57HyDAfWR
|
||||
dvl0uhZQ1eqX8aVc7EKLqrum651ATLf9OJx5XQM4KmY0xPzZ0hFAiQJnXB0WwME0E3IsL5B17ZlADqWb
|
||||
NYDrOepdlcysmTWWOrxqbceRWtaLk0VO1XW72D5Vckd2gMBfq8zdpmUG62NJvKM4+XyziDk24xmfWoGE
|
||||
s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
Loading…
Reference in New Issue