mirror of
https://github.com/libretro/Mesen.git
synced 2025-02-09 02:26:21 +00:00
Debugger: Make event viewer color config window non-modal
This commit is contained in:
parent
b6e10bc810
commit
a68b28c06e
@ -162,11 +162,15 @@ namespace Mesen.GUI.Debugger
|
||||
|
||||
private void mnuConfigureColors_Click(object sender, EventArgs e)
|
||||
{
|
||||
using(frmEventViewerColors frm = new frmEventViewerColors()) {
|
||||
if(frm.ShowDialog(this, this) == DialogResult.OK) {
|
||||
if(frmEventViewerColors.Instance != null) {
|
||||
frmEventViewerColors.Instance.BringToFront();
|
||||
} else {
|
||||
frmEventViewerColors frm = new frmEventViewerColors();
|
||||
frm.Show(this, this);
|
||||
frm.FormClosed += (s, evt) => {
|
||||
this.GetData();
|
||||
this.RefreshViewer();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -529,6 +529,9 @@
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(406, 378);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "frmEventViewerColors";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Configure Colors...";
|
||||
|
@ -14,10 +14,13 @@ namespace Mesen.GUI.Debugger
|
||||
{
|
||||
public partial class frmEventViewerColors : BaseConfigForm
|
||||
{
|
||||
public static frmEventViewerColors Instance { get; private set; }
|
||||
public frmEventViewerColors()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Instance = this;
|
||||
|
||||
picMapperWrite.BackColor = ConfigManager.Config.DebugInfo.EventViewerMapperRegisterWriteColor;
|
||||
picMapperRead.BackColor = ConfigManager.Config.DebugInfo.EventViewerMapperRegisterReadColor;
|
||||
|
||||
@ -78,6 +81,8 @@ namespace Mesen.GUI.Debugger
|
||||
|
||||
ConfigManager.ApplyChanges();
|
||||
}
|
||||
|
||||
Instance = null;
|
||||
}
|
||||
|
||||
private void btnReset_Click(object sender, EventArgs e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user