Linux: Debugger - Tooltip layout fixes

This commit is contained in:
Sour 2019-01-27 13:45:57 -05:00
parent f5d0b8b92b
commit 05f99aba7c
12 changed files with 291 additions and 274 deletions

View file

@ -302,7 +302,7 @@ namespace Mesen.GUI.Config
public bool FindOccurrencesMatchWholeWord = false; public bool FindOccurrencesMatchWholeWord = false;
public string FindOccurrencesLastSearch = string.Empty; public string FindOccurrencesLastSearch = string.Empty;
public bool AutoLoadDbgFiles = false; public bool AutoLoadDbgFiles = true;
public bool AutoLoadCdlFiles = false; public bool AutoLoadCdlFiles = false;
public bool DisableDefaultLabels = false; public bool DisableDefaultLabels = false;

View file

@ -23,7 +23,7 @@ namespace Mesen.GUI.Controls
_growing = true; _growing = true;
Size textSize = new Size(this.ClientSize.Width - this.Padding.Left - this.Padding.Right, Int32.MaxValue); Size textSize = new Size(this.ClientSize.Width - this.Padding.Left - this.Padding.Right, Int32.MaxValue);
textSize = TextRenderer.MeasureText(this.Text, this.Font, textSize, TextFormatFlags.WordBreak); textSize = TextRenderer.MeasureText(this.Text, this.Font, textSize, TextFormatFlags.WordBreak);
this.ClientSize = new Size(this.ClientSize.Width, textSize.Height); this.ClientSize = new Size(textSize.Width + this.Margin.Size.Width + this.Padding.Size.Width, textSize.Height);
} finally { } finally {
_growing = false; _growing = false;
} }

View file

@ -27,46 +27,62 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.panel2 = new System.Windows.Forms.Panel(); this.panelBorder = new System.Windows.Forms.Panel();
this.lblLetter = new System.Windows.Forms.Label(); this.lblLetter = new System.Windows.Forms.Label();
this.panel2.SuspendLayout(); this.panelBg = new System.Windows.Forms.Panel();
this.panelBorder.SuspendLayout();
this.panelBg.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// panel2 // panelBorder
// //
this.panel2.BackColor = System.Drawing.Color.LightGray; this.panelBorder.BackColor = System.Drawing.Color.LightGray;
this.panel2.Controls.Add(this.lblLetter); this.panelBorder.Controls.Add(this.panelBg);
this.panel2.Location = new System.Drawing.Point(0, 0); this.panelBorder.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Name = "panel2"; this.panelBorder.Location = new System.Drawing.Point(0, 0);
this.panel2.Size = new System.Drawing.Size(20, 20); this.panelBorder.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
this.panel2.TabIndex = 2; this.panelBorder.Name = "panelBorder";
this.panelBorder.Size = new System.Drawing.Size(20, 20);
this.panelBorder.TabIndex = 2;
// //
// lblLetter // lblLetter
// //
this.lblLetter.BackColor = System.Drawing.Color.White; this.lblLetter.Location = new System.Drawing.Point(1, 0);
this.lblLetter.Location = new System.Drawing.Point(2, 2); this.lblLetter.Margin = new System.Windows.Forms.Padding(0);
this.lblLetter.Name = "lblLetter"; this.lblLetter.Name = "lblLetter";
this.lblLetter.Padding = new System.Windows.Forms.Padding(2, 0, 0, 0);
this.lblLetter.Size = new System.Drawing.Size(16, 16); this.lblLetter.Size = new System.Drawing.Size(16, 16);
this.lblLetter.TabIndex = 2; this.lblLetter.TabIndex = 2;
this.lblLetter.Text = "C"; this.lblLetter.Text = "C";
this.lblLetter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblLetter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// panelBg
//
this.panelBg.BackColor = System.Drawing.Color.White;
this.panelBg.Controls.Add(this.lblLetter);
this.panelBg.Location = new System.Drawing.Point(2, 2);
this.panelBg.Margin = new System.Windows.Forms.Padding(0);
this.panelBg.Name = "panelBg";
this.panelBg.Size = new System.Drawing.Size(16, 16);
this.panelBg.TabIndex = 3;
//
// ctrlFlagStatus // ctrlFlagStatus
// //
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.Controls.Add(this.panel2); this.Controls.Add(this.panelBorder);
this.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
this.Name = "ctrlFlagStatus"; this.Name = "ctrlFlagStatus";
this.Size = new System.Drawing.Size(20, 20); this.Size = new System.Drawing.Size(20, 20);
this.panel2.ResumeLayout(false); this.panelBorder.ResumeLayout(false);
this.panelBg.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
#endregion #endregion
private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel panelBorder;
private System.Windows.Forms.Label lblLetter; private System.Windows.Forms.Label lblLetter;
private System.Windows.Forms.Panel panelBg;
} }
} }

View file

@ -7,17 +7,17 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using Mesen.GUI.Controls;
namespace Mesen.GUI.Debugger.Controls namespace Mesen.GUI.Debugger.Controls
{ {
public partial class ctrlFlagStatus : UserControl public partial class ctrlFlagStatus : BaseControl
{ {
public ctrlFlagStatus() public ctrlFlagStatus()
{ {
InitializeComponent(); InitializeComponent();
if(Program.IsMono) { if(Program.IsMono) {
lblLetter.Padding = Padding.Empty; lblLetter.Location = new Point(-1, -1);
lblLetter.Width = 16;
} }
} }
@ -25,8 +25,9 @@ namespace Mesen.GUI.Debugger.Controls
{ {
set set
{ {
panel2.BackColor = value ? Color.Red : Color.LightGray; panelBorder.BackColor = value ? Color.Red : Color.LightGray;
lblLetter.BackColor = value ? Color.White : Color.DarkGray; panelBg.BackColor = value ? Color.White : Color.DarkGray;
lblLetter.ForeColor = Color.Black;
} }
} }

View file

@ -1,4 +1,5 @@
using System; using Mesen.GUI.Forms;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@ -10,7 +11,7 @@ using System.Windows.Forms;
namespace Mesen.GUI.Debugger namespace Mesen.GUI.Debugger
{ {
public class TooltipForm : Form public class TooltipForm : BaseForm
{ {
protected Form _parentForm; protected Form _parentForm;
private Point _requestedLocation; private Point _requestedLocation;
@ -20,7 +21,6 @@ namespace Mesen.GUI.Debugger
{ {
base.OnLoad(e); base.OnLoad(e);
if(!DesignMode) { if(!DesignMode) {
ThemeHelper.FixMonoColors(this);
UpdateLocation(); UpdateLocation();
} }
} }

View file

@ -27,65 +27,42 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.panel1 = new System.Windows.Forms.Panel(); this.panel = new System.Windows.Forms.Panel();
this.tlpMain = new System.Windows.Forms.TableLayoutPanel();
this.panel1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// panel1 // panel
// //
this.panel1.AutoSize = true; this.panel.BackColor = System.Drawing.SystemColors.Info;
this.panel1.BackColor = System.Drawing.SystemColors.Info; this.panel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Controls.Add(this.tlpMain); this.panel.Location = new System.Drawing.Point(0, 0);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel.Name = "panel";
this.panel1.Location = new System.Drawing.Point(0, 0); this.panel.Padding = new System.Windows.Forms.Padding(2);
this.panel1.Name = "panel1"; this.panel.Size = new System.Drawing.Size(416, 328);
this.panel1.Size = new System.Drawing.Size(10, 10); this.panel.TabIndex = 0;
this.panel1.TabIndex = 0;
// //
// tlpMain // frmCodePreviewTooltip
//
this.tlpMain.AutoSize = true;
this.tlpMain.ColumnCount = 2;
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpMain.Location = new System.Drawing.Point(0, 0);
this.tlpMain.Name = "tlpMain";
this.tlpMain.RowCount = 2;
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tlpMain.Size = new System.Drawing.Size(8, 8);
this.tlpMain.TabIndex = 0;
//
// frmCodeTooltip
// //
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.AutoSize = true; this.ClientSize = new System.Drawing.Size(416, 328);
this.ClientSize = new System.Drawing.Size(10, 10);
this.ControlBox = false; this.ControlBox = false;
this.Controls.Add(this.panel1); this.Controls.Add(this.panel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "frmCodeTooltip"; this.Name = "frmCodePreviewTooltip";
this.ShowIcon = false; this.ShowIcon = false;
this.ShowInTaskbar = false; this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "frmCodeTooltip"; this.Text = "frmCodeTooltip";
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout();
} }
#endregion #endregion
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel;
private System.Windows.Forms.TableLayoutPanel tlpMain;
} }
} }

View file

@ -43,8 +43,7 @@ namespace Mesen.GUI.Debugger
protected override void OnLoad(EventArgs e) protected override void OnLoad(EventArgs e)
{ {
tlpMain.SuspendLayout(); panel.SuspendLayout();
tlpMain.RowStyles.Insert(1, new RowStyle());
if(_code != null) { if(_code != null) {
_codeViewer = new ctrlDebuggerCode(); _codeViewer = new ctrlDebuggerCode();
@ -68,17 +67,13 @@ namespace Mesen.GUI.Debugger
Control control = _codeViewer as Control; Control control = _codeViewer as Control;
control.Dock = DockStyle.Fill; control.Dock = DockStyle.Fill;
tlpMain.SetRow(control, 0); panel.Controls.Add(control);
tlpMain.SetColumn(control, 0);
tlpMain.SetColumnSpan(control, 2);
tlpMain.Controls.Add(control);
tlpMain.ResumeLayout(); panel.ResumeLayout();
this.Width = this.tlpMain.Width;
this.Height = this.tlpMain.Height;
this.BringToFront(); this.BringToFront();
base.OnLoad(e); base.OnLoad(e);
panel.BackColor = ThemeHelper.IsDark ? ThemeHelper.Theme.FormBgColor : SystemColors.Info;
} }
public void ScrollToLineIndex(int lineIndex) public void ScrollToLineIndex(int lineIndex)

View file

@ -27,34 +27,36 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.panel1 = new System.Windows.Forms.Panel(); this.panel = new System.Windows.Forms.Panel();
this.tlpMain = new System.Windows.Forms.TableLayoutPanel(); this.tlpMain = new System.Windows.Forms.TableLayoutPanel();
this.panel1.SuspendLayout(); this.panel.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// panel1 // panel
// //
this.panel1.AutoSize = true; this.panel.AutoSize = true;
this.panel1.BackColor = System.Drawing.SystemColors.Info; this.panel.BackColor = System.Drawing.SystemColors.Info;
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.tlpMain); this.panel.Controls.Add(this.tlpMain);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0); this.panel.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1"; this.panel.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
this.panel1.Size = new System.Drawing.Size(10, 10); this.panel.Name = "panel";
this.panel1.TabIndex = 0; this.panel.Size = new System.Drawing.Size(10, 10);
this.panel.TabIndex = 0;
// //
// tlpMain // tlpMain
// //
this.tlpMain.AutoSize = true; this.tlpMain.AutoSize = true;
this.tlpMain.ColumnCount = 2; this.tlpMain.ColumnCount = 1;
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tlpMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.tlpMain.Location = new System.Drawing.Point(0, 0); this.tlpMain.Location = new System.Drawing.Point(0, 0);
this.tlpMain.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
this.tlpMain.Name = "tlpMain"; this.tlpMain.Name = "tlpMain";
this.tlpMain.RowCount = 2; this.tlpMain.RowCount = 1;
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tlpMain.Size = new System.Drawing.Size(8, 8); this.tlpMain.Size = new System.Drawing.Size(8, 8);
this.tlpMain.TabIndex = 0; this.tlpMain.TabIndex = 0;
@ -66,18 +68,18 @@
this.AutoSize = true; this.AutoSize = true;
this.ClientSize = new System.Drawing.Size(10, 10); this.ClientSize = new System.Drawing.Size(10, 10);
this.ControlBox = false; this.ControlBox = false;
this.Controls.Add(this.panel1); this.Controls.Add(this.panel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "frmCodeTooltip"; this.Name = "frmCodeTooltip";
this.ShowIcon = false; this.ShowIcon = false;
this.ShowInTaskbar = false; this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "frmCodeTooltip"; this.Text = "frmCodeTooltip";
this.panel1.ResumeLayout(false); this.panel.ResumeLayout(false);
this.panel1.PerformLayout(); this.panel.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@ -85,7 +87,7 @@
#endregion #endregion
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel;
private System.Windows.Forms.TableLayoutPanel tlpMain; private System.Windows.Forms.TableLayoutPanel tlpMain;
} }
} }

View file

@ -42,26 +42,28 @@ namespace Mesen.GUI.Debugger
protected override void OnLoad(EventArgs e) protected override void OnLoad(EventArgs e)
{ {
tlpMain.SuspendLayout(); tlpMain.SuspendLayout();
TableLayoutPanel tlpLabels = new TableLayoutPanel();
tlpLabels.SuspendLayout();
tlpLabels.AutoSize = true;
tlpMain.Controls.Add(tlpLabels, 0, 0);
int i = 0; int i = 0;
int maxLabelWidth = (_parentForm.ClientSize.Width - this.Location.X - 150);
foreach(KeyValuePair<string, string> kvp in _values) { foreach(KeyValuePair<string, string> kvp in _values) {
tlpMain.RowStyles.Insert(1, new RowStyle()); tlpLabels.RowStyles.Add(new RowStyle());
Label lbl = new Label(); Label lbl = new Label();
lbl.Margin = new Padding(2, 3, 2, 2); lbl.Margin = new Padding(2, 3, 2, 2);
lbl.Text = kvp.Key + ":"; lbl.Text = kvp.Key + ":";
lbl.Font = new Font(lbl.Font, FontStyle.Bold); lbl.Font = new Font(lbl.Font, FontStyle.Bold);
lbl.AutoSize = true; lbl.AutoSize = true;
tlpMain.SetRow(lbl, i); tlpLabels.Controls.Add(lbl, 0, i);
tlpMain.SetColumn(lbl, 0);
tlpMain.Controls.Add(lbl);
lbl = new Label(); lbl = new ctrlAutoGrowLabel();
lbl.Font = new Font(BaseControl.MonospaceFontFamily, 10); lbl.Font = new Font(BaseControl.MonospaceFontFamily, 10);
lbl.Margin = new Padding(2); lbl.Margin = new Padding(2);
lbl.AutoSize = true;
lbl.Text = kvp.Value; lbl.Text = kvp.Value;
tlpMain.SetRow(lbl, i); lbl.Size = new Size(maxLabelWidth, 10);
tlpMain.SetColumn(lbl, 1); tlpLabels.Controls.Add(lbl, 1, i);
tlpMain.Controls.Add(lbl);
i++; i++;
} }
@ -86,11 +88,9 @@ namespace Mesen.GUI.Debugger
Control control = _codeViewer as Control; Control control = _codeViewer as Control;
control.Dock = DockStyle.Fill; control.Dock = DockStyle.Fill;
tlpMain.SetRow(control, i); tlpMain.Controls.Add(control, 0, 1);
tlpMain.SetColumn(control, 0);
tlpMain.SetColumnSpan(control, 2);
tlpMain.Controls.Add(control);
} }
tlpLabels.ResumeLayout();
tlpMain.ResumeLayout(); tlpMain.ResumeLayout();
this.Width = this.tlpMain.Width; this.Width = this.tlpMain.Width;
if(this.Location.X + this.Width > _parentForm.ClientSize.Width) { if(this.Location.X + this.Width > _parentForm.ClientSize.Width) {
@ -98,10 +98,12 @@ namespace Mesen.GUI.Debugger
this.tlpMain.MaximumSize = new Size(maxWidth, _parentForm.ClientSize.Height - 10); this.tlpMain.MaximumSize = new Size(maxWidth, _parentForm.ClientSize.Height - 10);
this.MaximumSize = new Size(maxWidth, _parentForm.ClientSize.Height - 10); this.MaximumSize = new Size(maxWidth, _parentForm.ClientSize.Height - 10);
} }
this.Height = this.tlpMain.Height; this.Height = this.tlpMain.Height;
this.BringToFront(); this.BringToFront();
base.OnLoad(e); base.OnLoad(e);
panel.BackColor = ThemeHelper.IsDark ? ThemeHelper.Theme.FormBgColor : SystemColors.Info;
} }
} }
} }

View file

@ -646,10 +646,11 @@ namespace Mesen.GUI.Debugger
label = LabelManager.GetLabel((UInt32)info.Address, info.Type); label = LabelManager.GetLabel((UInt32)info.Address, info.Type);
if(label != null) { if(label != null) {
arrayOffset = info.Address - (int)label.Address; arrayOffset = info.Address - (int)label.Address;
} else {
label = LabelManager.GetLabel((UInt32)address, AddressType.Register);
} }
} }
if(label == null) {
label = LabelManager.GetLabel((UInt32)address, AddressType.Register);
}
break; break;
case DebugMemoryType.InternalRam: case DebugMemoryType.InternalRam:

View file

@ -1,4 +1,6 @@
namespace Mesen.GUI.Debugger using Mesen.GUI.Controls;
namespace Mesen.GUI.Debugger
{ {
partial class frmOpCodeTooltip partial class frmOpCodeTooltip
{ {
@ -27,83 +29,152 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.panel1 = new System.Windows.Forms.Panel(); this.panel = new System.Windows.Forms.Panel();
this.tlpMain = new System.Windows.Forms.TableLayoutPanel(); this.tlpMain = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.ctrlFlagCarry = new Mesen.GUI.Debugger.Controls.ctrlFlagStatus();
this.ctrlFlagNegative = new Mesen.GUI.Debugger.Controls.ctrlFlagStatus();
this.ctrlFlagZero = new Mesen.GUI.Debugger.Controls.ctrlFlagStatus();
this.ctrlFlagOverflow = new Mesen.GUI.Debugger.Controls.ctrlFlagStatus();
this.ctrlFlagInterrupt = new Mesen.GUI.Debugger.Controls.ctrlFlagStatus();
this.ctrlFlagDecimal = new Mesen.GUI.Debugger.Controls.ctrlFlagStatus();
this.lblAffectedStatusFlags = new System.Windows.Forms.Label(); this.lblAffectedStatusFlags = new System.Windows.Forms.Label();
this.lblName = new System.Windows.Forms.Label(); this.lblName = new System.Windows.Forms.Label();
this.lblOpCodeDescription = new System.Windows.Forms.Label(); this.lblOpCodeDescription = new Mesen.GUI.Controls.ctrlAutoGrowLabel();
this.lblByteCode = new System.Windows.Forms.Label();
this.lblAddressingMode = new System.Windows.Forms.Label();
this.lblCycleCount = new System.Windows.Forms.Label();
this.ctrlFlagNegative = new Mesen.GUI.Debugger.Controls.ctrlFlagStatus();
this.ctrlFlagOverflow = new Mesen.GUI.Debugger.Controls.ctrlFlagStatus();
this.ctrlFlagDecimal = new Mesen.GUI.Debugger.Controls.ctrlFlagStatus();
this.ctrlFlagInterrupt = new Mesen.GUI.Debugger.Controls.ctrlFlagStatus();
this.ctrlFlagZero = new Mesen.GUI.Debugger.Controls.ctrlFlagStatus();
this.ctrlFlagCarry = new Mesen.GUI.Debugger.Controls.ctrlFlagStatus();
this.label1 = new System.Windows.Forms.Label();
this.tlpOpCodeInfo = new System.Windows.Forms.TableLayoutPanel(); this.tlpOpCodeInfo = new System.Windows.Forms.TableLayoutPanel();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.lblByteCode = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.lblAddressingMode = new System.Windows.Forms.Label();
this.lblCycleCount = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout(); this.panel.SuspendLayout();
this.tlpMain.SuspendLayout(); this.tlpMain.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.tlpOpCodeInfo.SuspendLayout(); this.tlpOpCodeInfo.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// panel1 // panel
// //
this.panel1.AutoSize = true; this.panel.AutoSize = true;
this.panel1.BackColor = System.Drawing.SystemColors.Info; this.panel.BackColor = System.Drawing.SystemColors.Info;
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.tlpMain); this.panel.Controls.Add(this.tlpMain);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0); this.panel.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1"; this.panel.Margin = new System.Windows.Forms.Padding(0);
this.panel1.Size = new System.Drawing.Size(305, 357); this.panel.Name = "panel";
this.panel1.TabIndex = 0; this.panel.Size = new System.Drawing.Size(284, 357);
this.panel.TabIndex = 0;
// //
// tlpMain // tlpMain
// //
this.tlpMain.AutoSize = true; this.tlpMain.AutoSize = true;
this.tlpMain.ColumnCount = 8; this.tlpMain.ColumnCount = 1;
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 35F)); this.tlpMain.Controls.Add(this.tableLayoutPanel1, 0, 5);
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 35F));
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 35F));
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 35F));
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 35F));
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 35F));
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tlpMain.Controls.Add(this.lblAffectedStatusFlags, 0, 3); this.tlpMain.Controls.Add(this.lblAffectedStatusFlags, 0, 3);
this.tlpMain.Controls.Add(this.ctrlFlagNegative, 6, 4);
this.tlpMain.Controls.Add(this.ctrlFlagOverflow, 5, 4);
this.tlpMain.Controls.Add(this.ctrlFlagDecimal, 4, 4);
this.tlpMain.Controls.Add(this.ctrlFlagInterrupt, 3, 4);
this.tlpMain.Controls.Add(this.ctrlFlagZero, 2, 4);
this.tlpMain.Controls.Add(this.ctrlFlagCarry, 1, 4);
this.tlpMain.Controls.Add(this.lblName, 0, 0); this.tlpMain.Controls.Add(this.lblName, 0, 0);
this.tlpMain.Controls.Add(this.lblOpCodeDescription, 0, 1); this.tlpMain.Controls.Add(this.lblOpCodeDescription, 0, 1);
this.tlpMain.Controls.Add(this.tlpOpCodeInfo, 0, 2); this.tlpMain.Controls.Add(this.tlpOpCodeInfo, 0, 2);
this.tlpMain.Location = new System.Drawing.Point(0, 0); this.tlpMain.Location = new System.Drawing.Point(0, 0);
this.tlpMain.MaximumSize = new System.Drawing.Size(295, 0); this.tlpMain.Margin = new System.Windows.Forms.Padding(0);
this.tlpMain.MinimumSize = new System.Drawing.Size(295, 0);
this.tlpMain.Name = "tlpMain"; this.tlpMain.Name = "tlpMain";
this.tlpMain.RowCount = 6; this.tlpMain.RowCount = 7;
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tlpMain.Size = new System.Drawing.Size(283, 144);
this.tlpMain.Size = new System.Drawing.Size(295, 159);
this.tlpMain.TabIndex = 0; this.tlpMain.TabIndex = 0;
// //
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 8;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.ctrlFlagCarry, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.ctrlFlagNegative, 6, 0);
this.tableLayoutPanel1.Controls.Add(this.ctrlFlagZero, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.ctrlFlagOverflow, 5, 0);
this.tableLayoutPanel1.Controls.Add(this.ctrlFlagInterrupt, 3, 0);
this.tableLayoutPanel1.Controls.Add(this.ctrlFlagDecimal, 4, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 117);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(283, 26);
this.tableLayoutPanel1.TabIndex = 1;
//
// ctrlFlagCarry
//
this.ctrlFlagCarry.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ctrlFlagCarry.Location = new System.Drawing.Point(56, 3);
this.ctrlFlagCarry.Margin = new System.Windows.Forms.Padding(5, 3, 5, 3);
this.ctrlFlagCarry.Name = "ctrlFlagCarry";
this.ctrlFlagCarry.Size = new System.Drawing.Size(20, 20);
this.ctrlFlagCarry.TabIndex = 1;
//
// ctrlFlagNegative
//
this.ctrlFlagNegative.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ctrlFlagNegative.Location = new System.Drawing.Point(206, 3);
this.ctrlFlagNegative.Margin = new System.Windows.Forms.Padding(5, 3, 5, 3);
this.ctrlFlagNegative.Name = "ctrlFlagNegative";
this.ctrlFlagNegative.Size = new System.Drawing.Size(20, 20);
this.ctrlFlagNegative.TabIndex = 6;
//
// ctrlFlagZero
//
this.ctrlFlagZero.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ctrlFlagZero.Location = new System.Drawing.Point(86, 3);
this.ctrlFlagZero.Margin = new System.Windows.Forms.Padding(5, 3, 5, 3);
this.ctrlFlagZero.Name = "ctrlFlagZero";
this.ctrlFlagZero.Size = new System.Drawing.Size(20, 20);
this.ctrlFlagZero.TabIndex = 2;
//
// ctrlFlagOverflow
//
this.ctrlFlagOverflow.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ctrlFlagOverflow.Location = new System.Drawing.Point(176, 3);
this.ctrlFlagOverflow.Margin = new System.Windows.Forms.Padding(5, 3, 5, 3);
this.ctrlFlagOverflow.Name = "ctrlFlagOverflow";
this.ctrlFlagOverflow.Size = new System.Drawing.Size(20, 20);
this.ctrlFlagOverflow.TabIndex = 5;
//
// ctrlFlagInterrupt
//
this.ctrlFlagInterrupt.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ctrlFlagInterrupt.Location = new System.Drawing.Point(116, 3);
this.ctrlFlagInterrupt.Margin = new System.Windows.Forms.Padding(5, 3, 5, 3);
this.ctrlFlagInterrupt.Name = "ctrlFlagInterrupt";
this.ctrlFlagInterrupt.Size = new System.Drawing.Size(20, 20);
this.ctrlFlagInterrupt.TabIndex = 3;
//
// ctrlFlagDecimal
//
this.ctrlFlagDecimal.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ctrlFlagDecimal.Location = new System.Drawing.Point(146, 3);
this.ctrlFlagDecimal.Margin = new System.Windows.Forms.Padding(5, 3, 5, 3);
this.ctrlFlagDecimal.Name = "ctrlFlagDecimal";
this.ctrlFlagDecimal.Size = new System.Drawing.Size(20, 20);
this.ctrlFlagDecimal.TabIndex = 4;
//
// lblAffectedStatusFlags // lblAffectedStatusFlags
// //
this.lblAffectedStatusFlags.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.lblAffectedStatusFlags.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblAffectedStatusFlags.AutoSize = true; this.lblAffectedStatusFlags.AutoSize = true;
this.tlpMain.SetColumnSpan(this.lblAffectedStatusFlags, 8);
this.lblAffectedStatusFlags.ForeColor = System.Drawing.SystemColors.GrayText; this.lblAffectedStatusFlags.ForeColor = System.Drawing.SystemColors.GrayText;
this.lblAffectedStatusFlags.Location = new System.Drawing.Point(0, 104); this.lblAffectedStatusFlags.Location = new System.Drawing.Point(0, 104);
this.lblAffectedStatusFlags.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0); this.lblAffectedStatusFlags.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
@ -115,7 +186,6 @@
// lblName // lblName
// //
this.lblName.AutoSize = true; this.lblName.AutoSize = true;
this.tlpMain.SetColumnSpan(this.lblName, 8);
this.lblName.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblName.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblName.Location = new System.Drawing.Point(3, 3); this.lblName.Location = new System.Drawing.Point(3, 3);
this.lblName.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0); this.lblName.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0);
@ -127,16 +197,50 @@
// //
// lblOpCodeDescription // lblOpCodeDescription
// //
this.lblOpCodeDescription.AutoSize = true; this.lblOpCodeDescription.Dock = System.Windows.Forms.DockStyle.Fill;
this.tlpMain.SetColumnSpan(this.lblOpCodeDescription, 8);
this.lblOpCodeDescription.Location = new System.Drawing.Point(3, 28); this.lblOpCodeDescription.Location = new System.Drawing.Point(3, 28);
this.lblOpCodeDescription.Margin = new System.Windows.Forms.Padding(3, 5, 3, 0); this.lblOpCodeDescription.Margin = new System.Windows.Forms.Padding(3, 5, 3, 0);
this.lblOpCodeDescription.MaximumSize = new System.Drawing.Size(280, 0);
this.lblOpCodeDescription.Name = "lblOpCodeDescription"; this.lblOpCodeDescription.Name = "lblOpCodeDescription";
this.lblOpCodeDescription.Size = new System.Drawing.Size(32, 13); this.lblOpCodeDescription.Size = new System.Drawing.Size(38, 13);
this.lblOpCodeDescription.TabIndex = 0; this.lblOpCodeDescription.TabIndex = 0;
this.lblOpCodeDescription.Text = "Desc"; this.lblOpCodeDescription.Text = "Desc";
// //
// tlpOpCodeInfo
//
this.tlpOpCodeInfo.ColumnCount = 2;
this.tlpOpCodeInfo.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tlpOpCodeInfo.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpOpCodeInfo.Controls.Add(this.label2, 0, 1);
this.tlpOpCodeInfo.Controls.Add(this.lblByteCode, 1, 0);
this.tlpOpCodeInfo.Controls.Add(this.label1, 0, 0);
this.tlpOpCodeInfo.Controls.Add(this.lblAddressingMode, 1, 1);
this.tlpOpCodeInfo.Controls.Add(this.lblCycleCount, 1, 2);
this.tlpOpCodeInfo.Controls.Add(this.label3, 0, 2);
this.tlpOpCodeInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.tlpOpCodeInfo.Location = new System.Drawing.Point(0, 51);
this.tlpOpCodeInfo.Margin = new System.Windows.Forms.Padding(0, 10, 0, 0);
this.tlpOpCodeInfo.Name = "tlpOpCodeInfo";
this.tlpOpCodeInfo.RowCount = 4;
this.tlpOpCodeInfo.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpOpCodeInfo.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpOpCodeInfo.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpOpCodeInfo.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpOpCodeInfo.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tlpOpCodeInfo.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tlpOpCodeInfo.Size = new System.Drawing.Size(283, 41);
this.tlpOpCodeInfo.TabIndex = 29;
//
// label2
//
this.label2.AutoSize = true;
this.label2.ForeColor = System.Drawing.SystemColors.GrayText;
this.label2.Location = new System.Drawing.Point(3, 13);
this.label2.MaximumSize = new System.Drawing.Size(280, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(92, 13);
this.label2.TabIndex = 29;
this.label2.Text = "Addressing Mode:";
//
// lblByteCode // lblByteCode
// //
this.lblByteCode.AutoSize = true; this.lblByteCode.AutoSize = true;
@ -146,6 +250,17 @@
this.lblByteCode.TabIndex = 25; this.lblByteCode.TabIndex = 25;
this.lblByteCode.Text = "Byte Code"; this.lblByteCode.Text = "Byte Code";
// //
// label1
//
this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.SystemColors.GrayText;
this.label1.Location = new System.Drawing.Point(3, 0);
this.label1.MaximumSize = new System.Drawing.Size(280, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(59, 13);
this.label1.TabIndex = 28;
this.label1.Text = "Byte Code:";
//
// lblAddressingMode // lblAddressingMode
// //
this.lblAddressingMode.AutoSize = true; this.lblAddressingMode.AutoSize = true;
@ -164,100 +279,6 @@
this.lblCycleCount.TabIndex = 27; this.lblCycleCount.TabIndex = 27;
this.lblCycleCount.Text = "Cycle Count"; this.lblCycleCount.Text = "Cycle Count";
// //
// ctrlFlagNegative
//
this.ctrlFlagNegative.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ctrlFlagNegative.Location = new System.Drawing.Point(224, 120);
this.ctrlFlagNegative.Name = "ctrlFlagNegative";
this.ctrlFlagNegative.Size = new System.Drawing.Size(20, 20);
this.ctrlFlagNegative.TabIndex = 6;
//
// ctrlFlagOverflow
//
this.ctrlFlagOverflow.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ctrlFlagOverflow.Location = new System.Drawing.Point(189, 120);
this.ctrlFlagOverflow.Name = "ctrlFlagOverflow";
this.ctrlFlagOverflow.Size = new System.Drawing.Size(20, 20);
this.ctrlFlagOverflow.TabIndex = 5;
//
// ctrlFlagDecimal
//
this.ctrlFlagDecimal.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ctrlFlagDecimal.Location = new System.Drawing.Point(154, 120);
this.ctrlFlagDecimal.Name = "ctrlFlagDecimal";
this.ctrlFlagDecimal.Size = new System.Drawing.Size(20, 20);
this.ctrlFlagDecimal.TabIndex = 4;
//
// ctrlFlagInterrupt
//
this.ctrlFlagInterrupt.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ctrlFlagInterrupt.Location = new System.Drawing.Point(119, 120);
this.ctrlFlagInterrupt.Name = "ctrlFlagInterrupt";
this.ctrlFlagInterrupt.Size = new System.Drawing.Size(20, 20);
this.ctrlFlagInterrupt.TabIndex = 3;
//
// ctrlFlagZero
//
this.ctrlFlagZero.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ctrlFlagZero.Location = new System.Drawing.Point(84, 120);
this.ctrlFlagZero.Name = "ctrlFlagZero";
this.ctrlFlagZero.Size = new System.Drawing.Size(20, 20);
this.ctrlFlagZero.TabIndex = 2;
//
// ctrlFlagCarry
//
this.ctrlFlagCarry.Anchor = System.Windows.Forms.AnchorStyles.None;
this.ctrlFlagCarry.Location = new System.Drawing.Point(49, 120);
this.ctrlFlagCarry.Name = "ctrlFlagCarry";
this.ctrlFlagCarry.Size = new System.Drawing.Size(20, 20);
this.ctrlFlagCarry.TabIndex = 1;
//
// label1
//
this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.SystemColors.GrayText;
this.label1.Location = new System.Drawing.Point(3, 0);
this.label1.MaximumSize = new System.Drawing.Size(280, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(59, 13);
this.label1.TabIndex = 28;
this.label1.Text = "Byte Code:";
//
// tlpOpCodeInfo
//
this.tlpOpCodeInfo.ColumnCount = 2;
this.tlpMain.SetColumnSpan(this.tlpOpCodeInfo, 8);
this.tlpOpCodeInfo.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tlpOpCodeInfo.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpOpCodeInfo.Controls.Add(this.label2, 0, 1);
this.tlpOpCodeInfo.Controls.Add(this.lblByteCode, 1, 0);
this.tlpOpCodeInfo.Controls.Add(this.label1, 0, 0);
this.tlpOpCodeInfo.Controls.Add(this.lblAddressingMode, 1, 1);
this.tlpOpCodeInfo.Controls.Add(this.lblCycleCount, 1, 2);
this.tlpOpCodeInfo.Controls.Add(this.label3, 0, 2);
this.tlpOpCodeInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.tlpOpCodeInfo.Location = new System.Drawing.Point(0, 51);
this.tlpOpCodeInfo.Margin = new System.Windows.Forms.Padding(0, 10, 0, 0);
this.tlpOpCodeInfo.Name = "tlpOpCodeInfo";
this.tlpOpCodeInfo.RowCount = 4;
this.tlpOpCodeInfo.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpOpCodeInfo.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpOpCodeInfo.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpOpCodeInfo.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpOpCodeInfo.Size = new System.Drawing.Size(295, 41);
this.tlpOpCodeInfo.TabIndex = 29;
//
// label2
//
this.label2.AutoSize = true;
this.label2.ForeColor = System.Drawing.SystemColors.GrayText;
this.label2.Location = new System.Drawing.Point(3, 13);
this.label2.MaximumSize = new System.Drawing.Size(280, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(92, 13);
this.label2.TabIndex = 29;
this.label2.Text = "Addressing Mode:";
//
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
@ -273,10 +294,9 @@
// //
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.AutoSize = true; this.ClientSize = new System.Drawing.Size(284, 357);
this.ClientSize = new System.Drawing.Size(305, 357);
this.ControlBox = false; this.ControlBox = false;
this.Controls.Add(this.panel1); this.Controls.Add(this.panel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
@ -286,10 +306,11 @@
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "frmCodeTooltip"; this.Text = "frmCodeTooltip";
this.panel1.ResumeLayout(false); this.panel.ResumeLayout(false);
this.panel1.PerformLayout(); this.panel.PerformLayout();
this.tlpMain.ResumeLayout(false); this.tlpMain.ResumeLayout(false);
this.tlpMain.PerformLayout(); this.tlpMain.PerformLayout();
this.tableLayoutPanel1.ResumeLayout(false);
this.tlpOpCodeInfo.ResumeLayout(false); this.tlpOpCodeInfo.ResumeLayout(false);
this.tlpOpCodeInfo.PerformLayout(); this.tlpOpCodeInfo.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
@ -299,9 +320,9 @@
#endregion #endregion
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel;
private System.Windows.Forms.TableLayoutPanel tlpMain; private System.Windows.Forms.TableLayoutPanel tlpMain;
private System.Windows.Forms.Label lblOpCodeDescription; private ctrlAutoGrowLabel lblOpCodeDescription;
private Controls.ctrlFlagStatus ctrlFlagNegative; private Controls.ctrlFlagStatus ctrlFlagNegative;
private Controls.ctrlFlagStatus ctrlFlagOverflow; private Controls.ctrlFlagStatus ctrlFlagOverflow;
private Controls.ctrlFlagStatus ctrlFlagDecimal; private Controls.ctrlFlagStatus ctrlFlagDecimal;
@ -317,5 +338,6 @@
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label3;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
} }
} }

View file

@ -16,6 +16,7 @@ namespace Mesen.GUI.Debugger
public partial class frmOpCodeTooltip : TooltipForm public partial class frmOpCodeTooltip : TooltipForm
{ {
static private Dictionary<string, OpCodeDesc> _descriptions; static private Dictionary<string, OpCodeDesc> _descriptions;
private OpCodeDesc _desc;
protected override bool ShowWithoutActivation protected override bool ShowWithoutActivation
{ {
@ -108,7 +109,7 @@ namespace Mesen.GUI.Debugger
_parentForm = parent; _parentForm = parent;
InitializeComponent(); InitializeComponent();
OpCodeDesc desc = _descriptions[opcode.ToLowerInvariant()]; _desc = _descriptions[opcode.ToLowerInvariant()];
if(relativeAddress >= 0) { if(relativeAddress >= 0) {
byte opCode = InteropEmu.DebugGetMemoryValue(DebugMemoryType.CpuMemory, (UInt32)relativeAddress); byte opCode = InteropEmu.DebugGetMemoryValue(DebugMemoryType.CpuMemory, (UInt32)relativeAddress);
@ -137,15 +138,8 @@ namespace Mesen.GUI.Debugger
ctrlFlagOverflow.Letter = "V"; ctrlFlagOverflow.Letter = "V";
ctrlFlagZero.Letter = "Z"; ctrlFlagZero.Letter = "Z";
lblName.Text = desc.Name; lblName.Text = _desc.Name;
lblOpCodeDescription.Text = desc.Description; lblOpCodeDescription.Text = _desc.Description;
ctrlFlagCarry.Active = desc.Flags.HasFlag(CpuFlag.Carry);
ctrlFlagDecimal.Active = desc.Flags.HasFlag(CpuFlag.Decimal);
ctrlFlagInterrupt.Active = desc.Flags.HasFlag(CpuFlag.Interrupt);
ctrlFlagNegative.Active = desc.Flags.HasFlag(CpuFlag.Negative);
ctrlFlagOverflow.Active = desc.Flags.HasFlag(CpuFlag.Overflow);
ctrlFlagZero.Active = desc.Flags.HasFlag(CpuFlag.Zero);
this.TopLevel = false; this.TopLevel = false;
this.Parent = _parentForm; this.Parent = _parentForm;
@ -154,11 +148,18 @@ namespace Mesen.GUI.Debugger
protected override void OnLoad(EventArgs e) protected override void OnLoad(EventArgs e)
{ {
this.Width = this.tlpMain.Width;
this.Height = this.tlpMain.Height; this.Height = this.tlpMain.Height;
this.BringToFront(); this.BringToFront();
base.OnLoad(e); base.OnLoad(e);
panel.BackColor = ThemeHelper.IsDark ? ThemeHelper.Theme.FormBgColor : SystemColors.Info;
ctrlFlagCarry.Active = _desc.Flags.HasFlag(CpuFlag.Carry);
ctrlFlagDecimal.Active = _desc.Flags.HasFlag(CpuFlag.Decimal);
ctrlFlagInterrupt.Active = _desc.Flags.HasFlag(CpuFlag.Interrupt);
ctrlFlagNegative.Active = _desc.Flags.HasFlag(CpuFlag.Negative);
ctrlFlagOverflow.Active = _desc.Flags.HasFlag(CpuFlag.Overflow);
ctrlFlagZero.Active = _desc.Flags.HasFlag(CpuFlag.Zero);
} }
public static int GetOpSize(byte opCode) public static int GetOpSize(byte opCode)