Some clean up of NES config dialogs, and menu item display logic

This commit is contained in:
adelikat 2014-01-10 17:41:13 +00:00
parent baf099afdf
commit 9b068a3cf2
6 changed files with 377 additions and 361 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1172,12 +1172,15 @@ namespace BizHawk.Client.EmuHawk
{
FDSControlsMenuItem.Enabled = Global.Emulator.BoardName == "FDS";
NESDebuggerMenuItem.Visible = VersionInfo.INTERIM;
NESDebuggerMenuItem.Visible =
MovieSettingsMenuItem.Visible =
VersionInfo.INTERIM;
NESDebuggerMenuItem.Enabled =
NESPPUViewerMenuItem.Enabled =
NESNametableViewerMenuItem.Enabled =
NESSoundChannelsMenuItem.Enabled =
MovieSettingsMenuItem.Enabled =
Global.Emulator is NES;
}

View File

@ -28,36 +28,36 @@
/// </summary>
private void InitializeComponent()
{
this.buttonOK = new System.Windows.Forms.Button();
this.buttonCancel = new System.Windows.Forms.Button();
this.OkBtn = new System.Windows.Forms.Button();
this.CancelBtn = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.buttonHelp = new System.Windows.Forms.Button();
this.HelpBtn = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
// buttonOK
// OkBtn
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.Location = new System.Drawing.Point(124, 238);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(75, 23);
this.buttonOK.TabIndex = 0;
this.buttonOK.Text = "OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
this.OkBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.OkBtn.Location = new System.Drawing.Point(140, 238);
this.OkBtn.Name = "OkBtn";
this.OkBtn.Size = new System.Drawing.Size(67, 23);
this.OkBtn.TabIndex = 0;
this.OkBtn.Text = "OK";
this.OkBtn.UseVisualStyleBackColor = true;
this.OkBtn.Click += new System.EventHandler(this.OkBtn_Click);
//
// buttonCancel
// CancelBtn
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(205, 238);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
this.buttonCancel.TabIndex = 1;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
this.CancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.CancelBtn.Location = new System.Drawing.Point(213, 238);
this.CancelBtn.Name = "CancelBtn";
this.CancelBtn.Size = new System.Drawing.Size(67, 23);
this.CancelBtn.TabIndex = 1;
this.CancelBtn.Text = "Cancel";
this.CancelBtn.UseVisualStyleBackColor = true;
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
//
// label1
//
@ -80,30 +80,31 @@
this.dataGridView1.Size = new System.Drawing.Size(268, 207);
this.dataGridView1.TabIndex = 3;
//
// buttonHelp
// HelpBtn
//
this.buttonHelp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonHelp.Location = new System.Drawing.Point(12, 238);
this.buttonHelp.Name = "buttonHelp";
this.buttonHelp.Size = new System.Drawing.Size(23, 23);
this.buttonHelp.TabIndex = 4;
this.buttonHelp.Text = "?";
this.buttonHelp.UseVisualStyleBackColor = true;
this.buttonHelp.Click += new System.EventHandler(this.buttonHelp_Click);
this.HelpBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.HelpBtn.Location = new System.Drawing.Point(12, 238);
this.HelpBtn.Name = "HelpBtn";
this.HelpBtn.Size = new System.Drawing.Size(23, 23);
this.HelpBtn.TabIndex = 4;
this.HelpBtn.Text = "?";
this.HelpBtn.UseVisualStyleBackColor = true;
this.HelpBtn.Click += new System.EventHandler(this.HelpBtn_Click);
//
// NESSyncSettingsForm
//
this.AcceptButton = this.buttonOK;
this.AcceptButton = this.OkBtn;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;
this.ClientSize = new System.Drawing.Size(292, 273);
this.Controls.Add(this.buttonHelp);
this.Controls.Add(this.HelpBtn);
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.label1);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.buttonOK);
this.Controls.Add(this.CancelBtn);
this.Controls.Add(this.OkBtn);
this.MinimumSize = new System.Drawing.Size(210, 150);
this.Name = "NESSyncSettingsForm";
this.ShowIcon = false;
this.Text = "NES Movie Settings";
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
@ -113,10 +114,10 @@
#endregion
private System.Windows.Forms.Button buttonOK;
private System.Windows.Forms.Button buttonCancel;
private System.Windows.Forms.Button OkBtn;
private System.Windows.Forms.Button CancelBtn;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Button buttonHelp;
private System.Windows.Forms.Button HelpBtn;
}
}

View File

@ -23,13 +23,13 @@ namespace BizHawk.Client.EmuHawk
dataGridView1.DataSource = DTDB.Table;
}
private void buttonCancel_Click(object sender, EventArgs e)
private void CancelBtn_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
Close();
}
private void buttonOK_Click(object sender, EventArgs e)
private void OkBtn_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
if (DTDB.WasModified)
@ -38,7 +38,7 @@ namespace BizHawk.Client.EmuHawk
}
}
private void buttonHelp_Click(object sender, EventArgs e)
private void HelpBtn_Click(object sender, EventArgs e)
{
MessageBox.Show(this, "Board Properties are special per-mapper system settings. They are only useful to advanced users creating Tool Assisted Superplays. No support will be provided if you break something with them.", "Help");
}

View File

@ -30,10 +30,10 @@
{
this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.buttonOK = new System.Windows.Forms.Button();
this.buttonCancel = new System.Windows.Forms.Button();
this.buttonPal = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.buttonPalReset = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
@ -42,6 +42,9 @@
//
// propertyGrid1
//
this.propertyGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.propertyGrid1.Location = new System.Drawing.Point(12, 12);
this.propertyGrid1.Name = "propertyGrid1";
this.propertyGrid1.PropertySort = System.Windows.Forms.PropertySort.Alphabetical;
@ -51,6 +54,8 @@
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.pictureBox1);
this.groupBox1.Location = new System.Drawing.Point(12, 207);
this.groupBox1.Name = "groupBox1";
@ -59,8 +64,17 @@
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Palette Preview:";
//
// pictureBox1
//
this.pictureBox1.Location = new System.Drawing.Point(6, 19);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(453, 131);
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// buttonOK
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.Location = new System.Drawing.Point(321, 369);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(75, 23);
@ -71,6 +85,7 @@
//
// buttonCancel
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(402, 369);
this.buttonCancel.Name = "buttonCancel";
@ -81,6 +96,7 @@
//
// buttonPal
//
this.buttonPal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonPal.Location = new System.Drawing.Point(61, 369);
this.buttonPal.Name = "buttonPal";
this.buttonPal.Size = new System.Drawing.Size(75, 23);
@ -89,16 +105,9 @@
this.buttonPal.UseVisualStyleBackColor = true;
this.buttonPal.Click += new System.EventHandler(this.buttonPal_Click);
//
// pictureBox1
//
this.pictureBox1.Location = new System.Drawing.Point(6, 19);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(453, 131);
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// buttonPalReset
//
this.buttonPalReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonPalReset.Location = new System.Drawing.Point(142, 369);
this.buttonPalReset.Name = "buttonPalReset";
this.buttonPalReset.Size = new System.Drawing.Size(75, 23);
@ -109,6 +118,7 @@
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 374);
this.label1.Name = "label1";
@ -130,8 +140,10 @@
this.Controls.Add(this.buttonOK);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.propertyGrid1);
this.MinimumSize = new System.Drawing.Size(390, 285);
this.Name = "QuickNesConfig";
this.Text = "QuickNesConfig";
this.ShowIcon = false;
this.Text = "NES Graphics Settings";
this.Load += new System.EventHandler(this.QuickNesConfig_Load);
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();

View File

@ -522,7 +522,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.QuickNES
void InitVideo()
{
int w = 0, h = 0;
//int w = 0, h = 0;
//LibQuickNES.qn_get_image_dimensions(Context, ref w, ref h);
//VideoInput = new byte[w * h];
//VideoInputH = GCHandle.Alloc(VideoInput, GCHandleType.Pinned);