diff --git a/GUI.NET/Config/DebugInfo.cs b/GUI.NET/Config/DebugInfo.cs
index f564708f..a9a37cf3 100644
--- a/GUI.NET/Config/DebugInfo.cs
+++ b/GUI.NET/Config/DebugInfo.cs
@@ -136,6 +136,7 @@ namespace Mesen.GUI.Config
public bool ShowCommentsInLabelList = false;
public bool SplitView = false;
+ public bool VerticalLayout = false;
public bool HexDisplay = true;
public bool ShowBreakpointLabels = true;
diff --git a/GUI.NET/Controls/ctrlSplitContainer.cs b/GUI.NET/Controls/ctrlSplitContainer.cs
index 1a02bb86..40b260f6 100644
--- a/GUI.NET/Controls/ctrlSplitContainer.cs
+++ b/GUI.NET/Controls/ctrlSplitContainer.cs
@@ -14,7 +14,9 @@ namespace Mesen.GUI.Controls
public event EventHandler PanelExpanded;
private int _originalDistance = 0;
private int _originalMinSize = 0;
+ private bool _collapsed = false;
private bool _preventExpand = false;
+ private bool _hidePanel2 = false;
public ctrlSplitContainer()
{
@@ -22,6 +24,12 @@ namespace Mesen.GUI.Controls
this.SplitterMoving += ctrlSplitContainer_SplitterMoving;
}
+ public bool HidePanel2
+ {
+ get { return _hidePanel2; }
+ set { _hidePanel2 = value; this.Invalidate(); }
+ }
+
private void ctrlSplitContainer_SplitterMoving(object sender, SplitterCancelEventArgs e)
{
if(_originalMinSize > 0) {
@@ -36,6 +44,10 @@ namespace Mesen.GUI.Controls
{
base.OnPaint(e);
+ if(_hidePanel2) {
+ return;
+ }
+
if(this.Orientation == Orientation.Horizontal) {
int top = this.SplitterDistance + 1;
int center = this.Width / 2;
@@ -55,6 +67,10 @@ namespace Mesen.GUI.Controls
{
base.OnDoubleClick(e);
+ if(_hidePanel2) {
+ return;
+ }
+
if(_originalMinSize == 0) {
this.CollapsePanel();
_preventExpand = true;
@@ -65,6 +81,10 @@ namespace Mesen.GUI.Controls
public void ExpandPanel()
{
+ if(_hidePanel2 || !_collapsed) {
+ return;
+ }
+
if(this.FixedPanel == FixedPanel.Panel1) {
throw new Exception("Not implemented");
} else if(this.FixedPanel == FixedPanel.Panel2) {
@@ -74,14 +94,20 @@ namespace Mesen.GUI.Controls
_originalMinSize = 0;
}
this.PanelExpanded?.Invoke(this, EventArgs.Empty);
+ _collapsed = false;
}
}
public void CollapsePanel()
{
+ if(_collapsed) {
+ return;
+ }
+
if(this.FixedPanel == FixedPanel.Panel1) {
throw new Exception("Not implemented");
} else if(this.FixedPanel == FixedPanel.Panel2) {
+ _collapsed = true;
_originalDistance = this.SplitterDistance;
_originalMinSize = this.Panel2MinSize;
this.Panel2MinSize = 2;
@@ -101,6 +127,10 @@ namespace Mesen.GUI.Controls
{
base.OnResize(e);
+ if(_hidePanel2) {
+ return;
+ }
+
//Horrible patch to fix what looks like a resize bug in SplitContainers
//Resizing the window sometimes doesn't resize the inner panels properly
//causing their content to go partially offscreen.
@@ -150,6 +180,10 @@ namespace Mesen.GUI.Controls
base.OnMouseUp(e);
this.Panel1.Focus();
+ if(_hidePanel2) {
+ return;
+ }
+
if(!_preventExpand && _originalMinSize > 0) {
this.ExpandPanel();
}
diff --git a/GUI.NET/Debugger/frmDebugger.Designer.cs b/GUI.NET/Debugger/frmDebugger.Designer.cs
index 355408db..8043f6ce 100644
--- a/GUI.NET/Debugger/frmDebugger.Designer.cs
+++ b/GUI.NET/Debugger/frmDebugger.Designer.cs
@@ -34,13 +34,15 @@ namespace Mesen.GUI.Debugger
this.splitContainer = new Mesen.GUI.Controls.ctrlSplitContainer();
this.ctrlSplitContainerTop = new Mesen.GUI.Controls.ctrlSplitContainer();
this.tlpTop = new System.Windows.Forms.TableLayoutPanel();
- this.ctrlConsoleStatus = new Mesen.GUI.Debugger.ctrlConsoleStatus();
this.panel1 = new System.Windows.Forms.Panel();
this.ctrlSourceViewer = new Mesen.GUI.Debugger.Controls.ctrlSourceViewer();
this.ctrlDebuggerCode = new Mesen.GUI.Debugger.ctrlDebuggerCode();
this.panel2 = new System.Windows.Forms.Panel();
this.ctrlSourceViewerSplit = new Mesen.GUI.Debugger.Controls.ctrlSourceViewer();
this.ctrlDebuggerCodeSplit = new Mesen.GUI.Debugger.ctrlDebuggerCode();
+ this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
+ this.ctrlConsoleStatus = new Mesen.GUI.Debugger.ctrlConsoleStatus();
+ this.tlpVerticalLayout = new System.Windows.Forms.TableLayoutPanel();
this.tlpFunctionLabelLists = new System.Windows.Forms.TableLayoutPanel();
this.grpLabels = new System.Windows.Forms.GroupBox();
this.ctrlLabelList = new Mesen.GUI.Debugger.Controls.ctrlLabelList();
@@ -157,7 +159,9 @@ namespace Mesen.GUI.Debugger
this.toolStripMenuItem21 = new System.Windows.Forms.ToolStripSeparator();
this.mnuSelectFont = new System.Windows.Forms.ToolStripMenuItem();
this.mnuConfigureColors = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.mnuSplitView = new System.Windows.Forms.ToolStripMenuItem();
+ this.mnuUseVerticalLayout = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem11 = new System.Windows.Forms.ToolStripSeparator();
this.mnuHidePauseIcon = new System.Windows.Forms.ToolStripMenuItem();
this.mnuPpuPartialDraw = new System.Windows.Forms.ToolStripMenuItem();
@@ -209,6 +213,7 @@ namespace Mesen.GUI.Debugger
this.tlpTop.SuspendLayout();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
+ this.tableLayoutPanel1.SuspendLayout();
this.tlpFunctionLabelLists.SuspendLayout();
this.grpLabels.SuspendLayout();
this.grpFunctions.SuspendLayout();
@@ -230,6 +235,7 @@ namespace Mesen.GUI.Debugger
//
this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
+ this.splitContainer.HidePanel2 = false;
this.splitContainer.Location = new System.Drawing.Point(0, 24);
this.splitContainer.Name = "splitContainer";
this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
@@ -244,8 +250,8 @@ namespace Mesen.GUI.Debugger
this.splitContainer.Panel2.Controls.Add(this.picWatchHelp);
this.splitContainer.Panel2.Controls.Add(this.tableLayoutPanel10);
this.splitContainer.Panel2MinSize = 100;
- this.splitContainer.Size = new System.Drawing.Size(1075, 576);
- this.splitContainer.SplitterDistance = 400;
+ this.splitContainer.Size = new System.Drawing.Size(1075, 765);
+ this.splitContainer.SplitterDistance = 582;
this.splitContainer.SplitterWidth = 7;
this.splitContainer.TabIndex = 1;
this.splitContainer.TabStop = false;
@@ -256,6 +262,7 @@ namespace Mesen.GUI.Debugger
//
this.ctrlSplitContainerTop.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlSplitContainerTop.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
+ this.ctrlSplitContainerTop.HidePanel2 = false;
this.ctrlSplitContainerTop.Location = new System.Drawing.Point(0, 0);
this.ctrlSplitContainerTop.Name = "ctrlSplitContainerTop";
//
@@ -268,7 +275,7 @@ namespace Mesen.GUI.Debugger
//
this.ctrlSplitContainerTop.Panel2.Controls.Add(this.tlpFunctionLabelLists);
this.ctrlSplitContainerTop.Panel2MinSize = 150;
- this.ctrlSplitContainerTop.Size = new System.Drawing.Size(1075, 400);
+ this.ctrlSplitContainerTop.Size = new System.Drawing.Size(1075, 582);
this.ctrlSplitContainerTop.SplitterDistance = 750;
this.ctrlSplitContainerTop.SplitterWidth = 7;
this.ctrlSplitContainerTop.TabIndex = 3;
@@ -277,32 +284,22 @@ namespace Mesen.GUI.Debugger
//
// tlpTop
//
- this.tlpTop.ColumnCount = 4;
+ this.tlpTop.ColumnCount = 3;
this.tlpTop.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpTop.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 0F));
this.tlpTop.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
- this.tlpTop.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
- this.tlpTop.Controls.Add(this.ctrlConsoleStatus, 2, 0);
this.tlpTop.Controls.Add(this.panel1, 0, 0);
this.tlpTop.Controls.Add(this.panel2, 1, 0);
+ this.tlpTop.Controls.Add(this.tableLayoutPanel1, 2, 0);
this.tlpTop.Dock = System.Windows.Forms.DockStyle.Fill;
this.tlpTop.Location = new System.Drawing.Point(0, 0);
this.tlpTop.Name = "tlpTop";
this.tlpTop.RowCount = 1;
this.tlpTop.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.tlpTop.Size = new System.Drawing.Size(750, 400);
+ this.tlpTop.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 582F));
+ this.tlpTop.Size = new System.Drawing.Size(750, 582);
this.tlpTop.TabIndex = 2;
//
- // ctrlConsoleStatus
- //
- this.ctrlConsoleStatus.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ctrlConsoleStatus.Location = new System.Drawing.Point(292, 0);
- this.ctrlConsoleStatus.Margin = new System.Windows.Forms.Padding(0);
- this.ctrlConsoleStatus.Name = "ctrlConsoleStatus";
- this.ctrlConsoleStatus.Size = new System.Drawing.Size(458, 400);
- this.ctrlConsoleStatus.TabIndex = 3;
- this.ctrlConsoleStatus.OnGotoLocation += new System.EventHandler(this.ctrlConsoleStatus_OnGotoLocation);
- //
// panel1
//
this.panel1.Controls.Add(this.ctrlSourceViewer);
@@ -311,7 +308,7 @@ namespace Mesen.GUI.Debugger
this.panel1.Location = new System.Drawing.Point(3, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(3, 0, 3, 0);
this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(286, 400);
+ this.panel1.Size = new System.Drawing.Size(286, 582);
this.panel1.TabIndex = 5;
//
// ctrlSourceViewer
@@ -320,7 +317,7 @@ namespace Mesen.GUI.Debugger
this.ctrlSourceViewer.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlSourceViewer.Location = new System.Drawing.Point(0, 0);
this.ctrlSourceViewer.Name = "ctrlSourceViewer";
- this.ctrlSourceViewer.Size = new System.Drawing.Size(286, 400);
+ this.ctrlSourceViewer.Size = new System.Drawing.Size(286, 582);
this.ctrlSourceViewer.SymbolProvider = null;
this.ctrlSourceViewer.TabIndex = 7;
this.ctrlSourceViewer.Visible = false;
@@ -334,7 +331,7 @@ namespace Mesen.GUI.Debugger
this.ctrlDebuggerCode.Location = new System.Drawing.Point(0, 0);
this.ctrlDebuggerCode.Name = "ctrlDebuggerCode";
this.ctrlDebuggerCode.ShowMemoryValues = false;
- this.ctrlDebuggerCode.Size = new System.Drawing.Size(286, 400);
+ this.ctrlDebuggerCode.Size = new System.Drawing.Size(286, 582);
this.ctrlDebuggerCode.SymbolProvider = null;
this.ctrlDebuggerCode.TabIndex = 2;
this.ctrlDebuggerCode.OnEditCode += new Mesen.GUI.Debugger.ctrlDebuggerCode.AssemblerEventHandler(this.ctrlDebuggerCode_OnEditCode);
@@ -348,7 +345,7 @@ namespace Mesen.GUI.Debugger
this.panel2.Location = new System.Drawing.Point(292, 0);
this.panel2.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.panel2.Name = "panel2";
- this.panel2.Size = new System.Drawing.Size(1, 400);
+ this.panel2.Size = new System.Drawing.Size(1, 582);
this.panel2.TabIndex = 6;
//
// ctrlSourceViewerSplit
@@ -357,7 +354,7 @@ namespace Mesen.GUI.Debugger
this.ctrlSourceViewerSplit.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlSourceViewerSplit.Location = new System.Drawing.Point(0, 0);
this.ctrlSourceViewerSplit.Name = "ctrlSourceViewerSplit";
- this.ctrlSourceViewerSplit.Size = new System.Drawing.Size(1, 400);
+ this.ctrlSourceViewerSplit.Size = new System.Drawing.Size(1, 582);
this.ctrlSourceViewerSplit.SymbolProvider = null;
this.ctrlSourceViewerSplit.TabIndex = 8;
this.ctrlSourceViewerSplit.Visible = false;
@@ -371,13 +368,53 @@ namespace Mesen.GUI.Debugger
this.ctrlDebuggerCodeSplit.Location = new System.Drawing.Point(0, 0);
this.ctrlDebuggerCodeSplit.Name = "ctrlDebuggerCodeSplit";
this.ctrlDebuggerCodeSplit.ShowMemoryValues = false;
- this.ctrlDebuggerCodeSplit.Size = new System.Drawing.Size(1, 400);
+ this.ctrlDebuggerCodeSplit.Size = new System.Drawing.Size(1, 582);
this.ctrlDebuggerCodeSplit.SymbolProvider = null;
this.ctrlDebuggerCodeSplit.TabIndex = 4;
this.ctrlDebuggerCodeSplit.Visible = false;
this.ctrlDebuggerCodeSplit.OnEditCode += new Mesen.GUI.Debugger.ctrlDebuggerCode.AssemblerEventHandler(this.ctrlDebuggerCode_OnEditCode);
this.ctrlDebuggerCodeSplit.Enter += new System.EventHandler(this.ctrlDebuggerCode_Enter);
//
+ // tableLayoutPanel1
+ //
+ this.tableLayoutPanel1.ColumnCount = 1;
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel1.Controls.Add(this.ctrlConsoleStatus, 0, 0);
+ this.tableLayoutPanel1.Controls.Add(this.tlpVerticalLayout, 0, 1);
+ this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel1.Location = new System.Drawing.Point(292, 0);
+ this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
+ this.tableLayoutPanel1.Name = "tableLayoutPanel1";
+ this.tableLayoutPanel1.RowCount = 2;
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(458, 582);
+ this.tableLayoutPanel1.TabIndex = 7;
+ //
+ // ctrlConsoleStatus
+ //
+ this.ctrlConsoleStatus.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.ctrlConsoleStatus.Location = new System.Drawing.Point(0, 0);
+ this.ctrlConsoleStatus.Margin = new System.Windows.Forms.Padding(0);
+ this.ctrlConsoleStatus.Name = "ctrlConsoleStatus";
+ this.ctrlConsoleStatus.Size = new System.Drawing.Size(458, 400);
+ this.ctrlConsoleStatus.TabIndex = 3;
+ this.ctrlConsoleStatus.OnGotoLocation += new System.EventHandler(this.ctrlConsoleStatus_OnGotoLocation);
+ //
+ // tlpVerticalLayout
+ //
+ this.tlpVerticalLayout.ColumnCount = 2;
+ this.tlpVerticalLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tlpVerticalLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tlpVerticalLayout.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tlpVerticalLayout.Location = new System.Drawing.Point(0, 400);
+ this.tlpVerticalLayout.Margin = new System.Windows.Forms.Padding(0);
+ this.tlpVerticalLayout.Name = "tlpVerticalLayout";
+ this.tlpVerticalLayout.RowCount = 1;
+ this.tlpVerticalLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tlpVerticalLayout.Size = new System.Drawing.Size(458, 182);
+ this.tlpVerticalLayout.TabIndex = 4;
+ //
// tlpFunctionLabelLists
//
this.tlpFunctionLabelLists.ColumnCount = 1;
@@ -391,16 +428,16 @@ namespace Mesen.GUI.Debugger
this.tlpFunctionLabelLists.RowCount = 2;
this.tlpFunctionLabelLists.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tlpFunctionLabelLists.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
- this.tlpFunctionLabelLists.Size = new System.Drawing.Size(318, 400);
+ this.tlpFunctionLabelLists.Size = new System.Drawing.Size(318, 582);
this.tlpFunctionLabelLists.TabIndex = 5;
//
// grpLabels
//
this.grpLabels.Controls.Add(this.ctrlLabelList);
this.grpLabels.Dock = System.Windows.Forms.DockStyle.Fill;
- this.grpLabels.Location = new System.Drawing.Point(3, 203);
+ this.grpLabels.Location = new System.Drawing.Point(3, 294);
this.grpLabels.Name = "grpLabels";
- this.grpLabels.Size = new System.Drawing.Size(312, 194);
+ this.grpLabels.Size = new System.Drawing.Size(312, 285);
this.grpLabels.TabIndex = 6;
this.grpLabels.TabStop = false;
this.grpLabels.Text = "Labels";
@@ -410,7 +447,7 @@ namespace Mesen.GUI.Debugger
this.ctrlLabelList.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlLabelList.Location = new System.Drawing.Point(3, 16);
this.ctrlLabelList.Name = "ctrlLabelList";
- this.ctrlLabelList.Size = new System.Drawing.Size(306, 175);
+ this.ctrlLabelList.Size = new System.Drawing.Size(306, 266);
this.ctrlLabelList.TabIndex = 0;
this.ctrlLabelList.OnFindOccurrence += new System.EventHandler(this.ctrlLabelList_OnFindOccurrence);
this.ctrlLabelList.OnLabelSelected += new System.EventHandler(this.ctrlLabelList_OnLabelSelected);
@@ -421,7 +458,7 @@ namespace Mesen.GUI.Debugger
this.grpFunctions.Dock = System.Windows.Forms.DockStyle.Fill;
this.grpFunctions.Location = new System.Drawing.Point(3, 3);
this.grpFunctions.Name = "grpFunctions";
- this.grpFunctions.Size = new System.Drawing.Size(312, 194);
+ this.grpFunctions.Size = new System.Drawing.Size(312, 285);
this.grpFunctions.TabIndex = 5;
this.grpFunctions.TabStop = false;
this.grpFunctions.Text = "Functions";
@@ -431,7 +468,7 @@ namespace Mesen.GUI.Debugger
this.ctrlFunctionList.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlFunctionList.Location = new System.Drawing.Point(3, 16);
this.ctrlFunctionList.Name = "ctrlFunctionList";
- this.ctrlFunctionList.Size = new System.Drawing.Size(306, 175);
+ this.ctrlFunctionList.Size = new System.Drawing.Size(306, 266);
this.ctrlFunctionList.TabIndex = 0;
this.ctrlFunctionList.OnFindOccurrence += new System.EventHandler(this.ctrlFunctionList_OnFindOccurrence);
this.ctrlFunctionList.OnFunctionSelected += new System.EventHandler(this.ctrlFunctionList_OnFunctionSelected);
@@ -462,7 +499,7 @@ namespace Mesen.GUI.Debugger
this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel10.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel10.Size = new System.Drawing.Size(1075, 172);
+ this.tableLayoutPanel10.Size = new System.Drawing.Size(1075, 176);
this.tableLayoutPanel10.TabIndex = 0;
//
// grpWatch
@@ -471,7 +508,7 @@ namespace Mesen.GUI.Debugger
this.grpWatch.Dock = System.Windows.Forms.DockStyle.Fill;
this.grpWatch.Location = new System.Drawing.Point(3, 3);
this.grpWatch.Name = "grpWatch";
- this.grpWatch.Size = new System.Drawing.Size(352, 166);
+ this.grpWatch.Size = new System.Drawing.Size(352, 170);
this.grpWatch.TabIndex = 2;
this.grpWatch.TabStop = false;
this.grpWatch.Text = "Watch";
@@ -481,7 +518,7 @@ namespace Mesen.GUI.Debugger
this.ctrlWatch.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlWatch.Location = new System.Drawing.Point(3, 16);
this.ctrlWatch.Name = "ctrlWatch";
- this.ctrlWatch.Size = new System.Drawing.Size(346, 147);
+ this.ctrlWatch.Size = new System.Drawing.Size(346, 151);
this.ctrlWatch.TabIndex = 0;
//
// grpBreakpoints
@@ -490,7 +527,7 @@ namespace Mesen.GUI.Debugger
this.grpBreakpoints.Dock = System.Windows.Forms.DockStyle.Fill;
this.grpBreakpoints.Location = new System.Drawing.Point(361, 3);
this.grpBreakpoints.Name = "grpBreakpoints";
- this.grpBreakpoints.Size = new System.Drawing.Size(352, 166);
+ this.grpBreakpoints.Size = new System.Drawing.Size(352, 170);
this.grpBreakpoints.TabIndex = 3;
this.grpBreakpoints.TabStop = false;
this.grpBreakpoints.Text = "Breakpoints";
@@ -500,7 +537,7 @@ namespace Mesen.GUI.Debugger
this.ctrlBreakpoints.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlBreakpoints.Location = new System.Drawing.Point(3, 16);
this.ctrlBreakpoints.Name = "ctrlBreakpoints";
- this.ctrlBreakpoints.Size = new System.Drawing.Size(346, 147);
+ this.ctrlBreakpoints.Size = new System.Drawing.Size(346, 151);
this.ctrlBreakpoints.TabIndex = 0;
this.ctrlBreakpoints.BreakpointNavigation += new System.EventHandler(this.ctrlBreakpoints_BreakpointNavigation);
//
@@ -510,7 +547,7 @@ namespace Mesen.GUI.Debugger
this.grpCallstack.Dock = System.Windows.Forms.DockStyle.Fill;
this.grpCallstack.Location = new System.Drawing.Point(719, 3);
this.grpCallstack.Name = "grpCallstack";
- this.grpCallstack.Size = new System.Drawing.Size(353, 166);
+ this.grpCallstack.Size = new System.Drawing.Size(353, 170);
this.grpCallstack.TabIndex = 4;
this.grpCallstack.TabStop = false;
this.grpCallstack.Text = "Call Stack";
@@ -520,7 +557,7 @@ namespace Mesen.GUI.Debugger
this.ctrlCallstack.Dock = System.Windows.Forms.DockStyle.Fill;
this.ctrlCallstack.Location = new System.Drawing.Point(3, 16);
this.ctrlCallstack.Name = "ctrlCallstack";
- this.ctrlCallstack.Size = new System.Drawing.Size(347, 147);
+ this.ctrlCallstack.Size = new System.Drawing.Size(347, 151);
this.ctrlCallstack.TabIndex = 0;
this.ctrlCallstack.FunctionSelected += new System.EventHandler(this.ctrlCallstack_FunctionSelected);
//
@@ -988,7 +1025,9 @@ namespace Mesen.GUI.Debugger
this.mnuCopyOptions,
this.fontSizeToolStripMenuItem,
this.mnuConfigureColors,
+ this.toolStripSeparator1,
this.mnuSplitView,
+ this.mnuUseVerticalLayout,
this.toolStripMenuItem11,
this.mnuHidePauseIcon,
this.mnuPpuPartialDraw,
@@ -1397,6 +1436,11 @@ namespace Mesen.GUI.Debugger
this.mnuConfigureColors.Text = "Configure Colors";
this.mnuConfigureColors.Click += new System.EventHandler(this.mnuConfigureColors_Click);
//
+ // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(263, 6);
+ //
// mnuSplitView
//
this.mnuSplitView.CheckOnClick = true;
@@ -1406,6 +1450,15 @@ namespace Mesen.GUI.Debugger
this.mnuSplitView.Text = "Split View";
this.mnuSplitView.Click += new System.EventHandler(this.mnuSplitView_Click);
//
+ // mnuUseVerticalLayout
+ //
+ this.mnuUseVerticalLayout.CheckOnClick = true;
+ this.mnuUseVerticalLayout.Image = global::Mesen.GUI.Properties.Resources.VerticalLayout;
+ this.mnuUseVerticalLayout.Name = "mnuUseVerticalLayout";
+ this.mnuUseVerticalLayout.Size = new System.Drawing.Size(266, 22);
+ this.mnuUseVerticalLayout.Text = "Use Vertical Layout";
+ this.mnuUseVerticalLayout.CheckedChanged += new System.EventHandler(this.mnuUseVerticalLayout_CheckedChanged);
+ //
// toolStripMenuItem11
//
this.toolStripMenuItem11.Name = "toolStripMenuItem11";
@@ -1644,7 +1697,7 @@ namespace Mesen.GUI.Debugger
this.toolStripStatusLabel1,
this.lblCyclesElapsedCount,
this.lblCyclesElapsed});
- this.statusStrip.Location = new System.Drawing.Point(0, 666);
+ this.statusStrip.Location = new System.Drawing.Point(0, 855);
this.statusStrip.Name = "statusStrip";
this.statusStrip.Size = new System.Drawing.Size(1075, 24);
this.statusStrip.TabIndex = 3;
@@ -1699,7 +1752,7 @@ namespace Mesen.GUI.Debugger
// ctrlPpuMemoryMapping
//
this.ctrlPpuMemoryMapping.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.ctrlPpuMemoryMapping.Location = new System.Drawing.Point(0, 633);
+ this.ctrlPpuMemoryMapping.Location = new System.Drawing.Point(0, 822);
this.ctrlPpuMemoryMapping.Name = "ctrlPpuMemoryMapping";
this.ctrlPpuMemoryMapping.Size = new System.Drawing.Size(1075, 33);
this.ctrlPpuMemoryMapping.TabIndex = 5;
@@ -1709,7 +1762,7 @@ namespace Mesen.GUI.Debugger
// ctrlCpuMemoryMapping
//
this.ctrlCpuMemoryMapping.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.ctrlCpuMemoryMapping.Location = new System.Drawing.Point(0, 600);
+ this.ctrlCpuMemoryMapping.Location = new System.Drawing.Point(0, 789);
this.ctrlCpuMemoryMapping.Name = "ctrlCpuMemoryMapping";
this.ctrlCpuMemoryMapping.Size = new System.Drawing.Size(1075, 33);
this.ctrlCpuMemoryMapping.TabIndex = 4;
@@ -1729,7 +1782,7 @@ namespace Mesen.GUI.Debugger
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(1075, 690);
+ this.ClientSize = new System.Drawing.Size(1075, 879);
this.Controls.Add(this.splitContainer);
this.Controls.Add(this.ctrlCpuMemoryMapping);
this.Controls.Add(this.ctrlPpuMemoryMapping);
@@ -1751,6 +1804,7 @@ namespace Mesen.GUI.Debugger
this.tlpTop.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
+ this.tableLayoutPanel1.ResumeLayout(false);
this.tlpFunctionLabelLists.ResumeLayout(false);
this.grpLabels.ResumeLayout(false);
this.grpFunctions.ResumeLayout(false);
@@ -1938,5 +1992,9 @@ namespace Mesen.GUI.Debugger
private System.Windows.Forms.ToolStripMenuItem mnuTooltipOptions;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem18;
private System.Windows.Forms.ToolStripMenuItem mnuOnlyShowTooltipOnShift;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
+ private System.Windows.Forms.TableLayoutPanel tlpVerticalLayout;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+ private System.Windows.Forms.ToolStripMenuItem mnuUseVerticalLayout;
}
}
\ No newline at end of file
diff --git a/GUI.NET/Debugger/frmDebugger.cs b/GUI.NET/Debugger/frmDebugger.cs
index fe0f2498..228ce520 100644
--- a/GUI.NET/Debugger/frmDebugger.cs
+++ b/GUI.NET/Debugger/frmDebugger.cs
@@ -26,6 +26,7 @@ namespace Mesen.GUI.Debugger
private InteropEmu.NotificationListener _notifListener;
private ICodeViewer _lastCodeWindow;
private Size _minimumSize;
+ private int _topPanelMinSize;
public frmDebugger()
{
@@ -37,6 +38,7 @@ namespace Mesen.GUI.Debugger
base.OnLoad(e);
_minimumSize = this.MinimumSize;
+ _topPanelMinSize = splitContainer.Panel1MinSize;
if(Program.IsMono) {
//This doesn't work in Mono (menu is blank) - hide it for now
@@ -147,6 +149,8 @@ namespace Mesen.GUI.Debugger
mnuShowBottomPanel.Checked = true;
}
+ this.mnuUseVerticalLayout.Checked = ConfigManager.Config.DebugInfo.VerticalLayout;
+
_lastCodeWindow = ctrlDebuggerCode;
this.ctrlDebuggerCode.SetConfig(ConfigManager.Config.DebugInfo.LeftView);
@@ -243,7 +247,7 @@ namespace Mesen.GUI.Debugger
mnuFind, mnuFindPrev, mnuFindNext, null,
mnuApuViewer, mnuAssembler, mnuEventViewer, mnuMemoryViewer, mnuPpuViewer, mnuScriptWindow, mnuTraceLogger, null,
mnuEditHeader, null,
- mnuSplitView, null
+ mnuSplitView, mnuUseVerticalLayout, null
);
tsToolbar.AddItemToToolbar(mnuShowVerifiedData, "Show Verified Data");
tsToolbar.AddItemToToolbar(mnuShowUnidentifiedData, "Show Unidentified Code/Data");
@@ -452,16 +456,36 @@ namespace Mesen.GUI.Debugger
tlpTop.ColumnStyles[1].SizeType = SizeType.Percent;
tlpTop.ColumnStyles[0].Width = 50f;
tlpTop.ColumnStyles[1].Width = 50f;
- this.MinimumSize = new Size(_minimumSize.Width + 250, _minimumSize.Height);
+ this.UpdateMinimumSize();
} else {
tlpTop.ColumnStyles[1].SizeType = SizeType.Absolute;
tlpTop.ColumnStyles[1].Width = 0f;
- this.MinimumSize = _minimumSize;
+ this.UpdateMinimumSize();
}
ctrlDebuggerCodeSplit.Visible = mnuSplitView.Checked;
return mnuSplitView.Checked;
}
+ private void UpdateMinimumSize()
+ {
+ int minWidth, minHeight;
+ if(mnuSplitView.Checked) {
+ minWidth = _minimumSize.Width + 250;
+ } else {
+ minWidth = _minimumSize.Width;
+ }
+
+ if(mnuUseVerticalLayout.Checked) {
+ minHeight = _minimumSize.Height + 150;
+ splitContainer.Panel1MinSize = _topPanelMinSize + 100;
+ } else {
+ minHeight = _minimumSize.Height;
+ splitContainer.Panel1MinSize = _topPanelMinSize;
+ }
+
+ this.MinimumSize = new Size(minWidth, minHeight);
+ }
+
private void UpdateVectorAddresses()
{
int nmiHandler = InteropEmu.DebugGetMemoryValue(DebugMemoryType.CpuMemory, 0xFFFA) | (InteropEmu.DebugGetMemoryValue(DebugMemoryType.CpuMemory, 0xFFFB) << 8);
@@ -1420,5 +1444,26 @@ namespace Mesen.GUI.Debugger
}
}
}
+
+ private void mnuUseVerticalLayout_CheckedChanged(object sender, EventArgs e)
+ {
+ ConfigManager.Config.DebugInfo.VerticalLayout = this.mnuUseVerticalLayout.Checked;
+ ConfigManager.ApplyChanges();
+
+ if(mnuUseVerticalLayout.Checked) {
+ this.ctrlSplitContainerTop.HidePanel2 = true;
+ this.ctrlSplitContainerTop.CollapsePanel();
+ this.tlpVerticalLayout.Controls.Add(this.grpLabels, 0, 0);
+ this.tlpVerticalLayout.Controls.Add(this.grpFunctions, 1, 0);
+ } else {
+ this.tlpFunctionLabelLists.Controls.Add(this.grpLabels, 0, 1);
+ this.tlpFunctionLabelLists.Controls.Add(this.grpFunctions, 0, 0);
+ this.ctrlSplitContainerTop.HidePanel2 = false;
+ this.ctrlSplitContainerTop.ExpandPanel();
+ }
+
+ mnuShowFunctionLabelLists.Enabled = !mnuUseVerticalLayout.Checked;
+ this.UpdateMinimumSize();
+ }
}
}
diff --git a/GUI.NET/GUI.NET.csproj b/GUI.NET/GUI.NET.csproj
index 7419d13c..603aa0b0 100644
--- a/GUI.NET/GUI.NET.csproj
+++ b/GUI.NET/GUI.NET.csproj
@@ -1169,6 +1169,7 @@
+
Always
diff --git a/GUI.NET/Properties/Resources.Designer.cs b/GUI.NET/Properties/Resources.Designer.cs
index 21000e64..b05ac2e1 100644
--- a/GUI.NET/Properties/Resources.Designer.cs
+++ b/GUI.NET/Properties/Resources.Designer.cs
@@ -940,6 +940,16 @@ namespace Mesen.GUI.Properties {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap VerticalLayout {
+ get {
+ object obj = ResourceManager.GetObject("VerticalLayout", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
diff --git a/GUI.NET/Properties/Resources.resx b/GUI.NET/Properties/Resources.resx
index 55343396..fd02db6e 100644
--- a/GUI.NET/Properties/Resources.resx
+++ b/GUI.NET/Properties/Resources.resx
@@ -400,4 +400,7 @@
..\Resources\SwitchView.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\VerticalLayout.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
\ No newline at end of file
diff --git a/GUI.NET/Resources/VerticalLayout.png b/GUI.NET/Resources/VerticalLayout.png
new file mode 100644
index 00000000..e2b9846c
Binary files /dev/null and b/GUI.NET/Resources/VerticalLayout.png differ