ZXHawk: Added missing OSD Message Verbosity setting menu option
This commit is contained in:
parent
39e78db39c
commit
beee25619d
|
@ -37,12 +37,15 @@
|
||||||
this.panTypecomboBox1 = new System.Windows.Forms.ComboBox();
|
this.panTypecomboBox1 = new System.Windows.Forms.ComboBox();
|
||||||
this.lblBorderInfo = new System.Windows.Forms.Label();
|
this.lblBorderInfo = new System.Windows.Forms.Label();
|
||||||
this.lblAutoLoadText = new System.Windows.Forms.Label();
|
this.lblAutoLoadText = new System.Windows.Forms.Label();
|
||||||
|
this.lblOSDVerbinfo = new System.Windows.Forms.Label();
|
||||||
|
this.label4 = new System.Windows.Forms.Label();
|
||||||
|
this.osdMessageVerbositycomboBox1 = new System.Windows.Forms.ComboBox();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// OkBtn
|
// OkBtn
|
||||||
//
|
//
|
||||||
this.OkBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.OkBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.OkBtn.Location = new System.Drawing.Point(247, 158);
|
this.OkBtn.Location = new System.Drawing.Point(247, 215);
|
||||||
this.OkBtn.Name = "OkBtn";
|
this.OkBtn.Name = "OkBtn";
|
||||||
this.OkBtn.Size = new System.Drawing.Size(60, 23);
|
this.OkBtn.Size = new System.Drawing.Size(60, 23);
|
||||||
this.OkBtn.TabIndex = 3;
|
this.OkBtn.TabIndex = 3;
|
||||||
|
@ -54,7 +57,7 @@
|
||||||
//
|
//
|
||||||
this.CancelBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
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.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
this.CancelBtn.Location = new System.Drawing.Point(313, 158);
|
this.CancelBtn.Location = new System.Drawing.Point(313, 215);
|
||||||
this.CancelBtn.Name = "CancelBtn";
|
this.CancelBtn.Name = "CancelBtn";
|
||||||
this.CancelBtn.Size = new System.Drawing.Size(60, 23);
|
this.CancelBtn.Size = new System.Drawing.Size(60, 23);
|
||||||
this.CancelBtn.TabIndex = 4;
|
this.CancelBtn.TabIndex = 4;
|
||||||
|
@ -123,13 +126,47 @@
|
||||||
"e correct traps are detected";
|
"e correct traps are detected";
|
||||||
this.lblAutoLoadText.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
this.lblAutoLoadText.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
//
|
//
|
||||||
|
// lblOSDVerbinfo
|
||||||
|
//
|
||||||
|
this.lblOSDVerbinfo.Font = new System.Drawing.Font("Lucida Console", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.lblOSDVerbinfo.Location = new System.Drawing.Point(175, 174);
|
||||||
|
this.lblOSDVerbinfo.Name = "lblOSDVerbinfo";
|
||||||
|
this.lblOSDVerbinfo.Size = new System.Drawing.Size(196, 21);
|
||||||
|
this.lblOSDVerbinfo.TabIndex = 28;
|
||||||
|
this.lblOSDVerbinfo.Text = "null";
|
||||||
|
this.lblOSDVerbinfo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.AutoSize = true;
|
||||||
|
this.label4.Location = new System.Drawing.Point(12, 158);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(125, 13);
|
||||||
|
this.label4.TabIndex = 27;
|
||||||
|
this.label4.Text = "OSD Message Verbosity:";
|
||||||
|
//
|
||||||
|
// osdMessageVerbositycomboBox1
|
||||||
|
//
|
||||||
|
this.osdMessageVerbositycomboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.osdMessageVerbositycomboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
|
this.osdMessageVerbositycomboBox1.FormattingEnabled = true;
|
||||||
|
this.osdMessageVerbositycomboBox1.Location = new System.Drawing.Point(12, 174);
|
||||||
|
this.osdMessageVerbositycomboBox1.Name = "osdMessageVerbositycomboBox1";
|
||||||
|
this.osdMessageVerbositycomboBox1.Size = new System.Drawing.Size(157, 21);
|
||||||
|
this.osdMessageVerbositycomboBox1.TabIndex = 26;
|
||||||
|
this.osdMessageVerbositycomboBox1.SelectionChangeCommitted += new System.EventHandler(this.OSDComboBox_SelectionChangeCommitted);
|
||||||
|
//
|
||||||
// ZXSpectrumNonSyncSettings
|
// ZXSpectrumNonSyncSettings
|
||||||
//
|
//
|
||||||
this.AcceptButton = this.OkBtn;
|
this.AcceptButton = this.OkBtn;
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.CancelButton = this.CancelBtn;
|
this.CancelButton = this.CancelBtn;
|
||||||
this.ClientSize = new System.Drawing.Size(385, 193);
|
this.ClientSize = new System.Drawing.Size(385, 250);
|
||||||
|
this.Controls.Add(this.lblOSDVerbinfo);
|
||||||
|
this.Controls.Add(this.label4);
|
||||||
|
this.Controls.Add(this.osdMessageVerbositycomboBox1);
|
||||||
this.Controls.Add(this.lblAutoLoadText);
|
this.Controls.Add(this.lblAutoLoadText);
|
||||||
this.Controls.Add(this.lblBorderInfo);
|
this.Controls.Add(this.lblBorderInfo);
|
||||||
this.Controls.Add(this.label2);
|
this.Controls.Add(this.label2);
|
||||||
|
@ -158,5 +195,8 @@
|
||||||
private System.Windows.Forms.ComboBox panTypecomboBox1;
|
private System.Windows.Forms.ComboBox panTypecomboBox1;
|
||||||
private System.Windows.Forms.Label lblBorderInfo;
|
private System.Windows.Forms.Label lblBorderInfo;
|
||||||
private System.Windows.Forms.Label lblAutoLoadText;
|
private System.Windows.Forms.Label lblAutoLoadText;
|
||||||
|
private System.Windows.Forms.Label lblOSDVerbinfo;
|
||||||
|
private System.Windows.Forms.Label label4;
|
||||||
|
private System.Windows.Forms.ComboBox osdMessageVerbositycomboBox1;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -31,18 +31,29 @@ namespace BizHawk.Client.EmuHawk
|
||||||
panTypecomboBox1.Items.Add(val);
|
panTypecomboBox1.Items.Add(val);
|
||||||
}
|
}
|
||||||
panTypecomboBox1.SelectedItem = _settings.AYPanConfig.ToString();
|
panTypecomboBox1.SelectedItem = _settings.AYPanConfig.ToString();
|
||||||
|
|
||||||
|
// OSD Message Verbosity
|
||||||
|
var osdTypes = Enum.GetNames(typeof(ZXSpectrum.OSDVerbosity));
|
||||||
|
foreach (var val in osdTypes)
|
||||||
|
{
|
||||||
|
osdMessageVerbositycomboBox1.Items.Add(val);
|
||||||
|
}
|
||||||
|
osdMessageVerbositycomboBox1.SelectedItem = _settings.OSDMessageVerbosity.ToString();
|
||||||
|
UpdateOSDNotes((ZXSpectrum.OSDVerbosity)Enum.Parse(typeof(ZXSpectrum.OSDVerbosity), osdMessageVerbositycomboBox1.SelectedItem.ToString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OkBtn_Click(object sender, EventArgs e)
|
private void OkBtn_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
bool changed =
|
bool changed =
|
||||||
_settings.AutoLoadTape != autoLoadcheckBox1.Checked
|
_settings.AutoLoadTape != autoLoadcheckBox1.Checked
|
||||||
|| _settings.AYPanConfig.ToString() != panTypecomboBox1.SelectedItem.ToString();
|
|| _settings.AYPanConfig.ToString() != panTypecomboBox1.SelectedItem.ToString()
|
||||||
|
|| _settings.OSDMessageVerbosity.ToString() != osdMessageVerbositycomboBox1.SelectedItem.ToString();
|
||||||
|
|
||||||
if (changed)
|
if (changed)
|
||||||
{
|
{
|
||||||
_settings.AutoLoadTape = autoLoadcheckBox1.Checked;
|
_settings.AutoLoadTape = autoLoadcheckBox1.Checked;
|
||||||
_settings.AYPanConfig = (AYChip.AYPanConfig)Enum.Parse(typeof(AYChip.AYPanConfig), panTypecomboBox1.SelectedItem.ToString());
|
_settings.AYPanConfig = (AYChip.AYPanConfig)Enum.Parse(typeof(AYChip.AYPanConfig), panTypecomboBox1.SelectedItem.ToString());
|
||||||
|
_settings.OSDMessageVerbosity = (ZXSpectrum.OSDVerbosity)Enum.Parse(typeof(ZXSpectrum.OSDVerbosity), osdMessageVerbositycomboBox1.SelectedItem.ToString());
|
||||||
|
|
||||||
GlobalWin.MainForm.PutCoreSettings(_settings);
|
GlobalWin.MainForm.PutCoreSettings(_settings);
|
||||||
|
|
||||||
|
@ -62,5 +73,27 @@ namespace BizHawk.Client.EmuHawk
|
||||||
DialogResult = DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void UpdateOSDNotes(ZXSpectrum.OSDVerbosity type)
|
||||||
|
{
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case ZXSpectrum.OSDVerbosity.Full:
|
||||||
|
lblOSDVerbinfo.Text = "Show all OSD messages";
|
||||||
|
break;
|
||||||
|
case ZXSpectrum.OSDVerbosity.Medium:
|
||||||
|
lblOSDVerbinfo.Text = "Only show machine/device generated messages";
|
||||||
|
break;
|
||||||
|
case ZXSpectrum.OSDVerbosity.None:
|
||||||
|
lblOSDVerbinfo.Text = "No core-driven OSD messages";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OSDComboBox_SelectionChangeCommitted(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ComboBox cb = sender as ComboBox;
|
||||||
|
UpdateOSDNotes((ZXSpectrum.OSDVerbosity)Enum.Parse(typeof(ZXSpectrum.OSDVerbosity), cb.SelectedItem.ToString()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue