From 8151fb54457f0520af78f31a3ee82fe2ba604782 Mon Sep 17 00:00:00 2001 From: Souryo Date: Sat, 16 Sep 2017 22:02:05 -0400 Subject: [PATCH] UI: Fixed DPI-related issues --- GUI.NET/Controls/BaseControl.cs | 8 +- GUI.NET/Controls/MesenNumericUpDown.cs | 110 ++++++ GUI.NET/Controls/MesenNumericUpDown.resx | 120 ++++++ .../ctrlHorizontalTrackbar.Designer.cs | 35 +- GUI.NET/Controls/ctrlHorizontalTrackbar.cs | 4 +- GUI.NET/Controls/ctrlNsfPlayer.Designer.cs | 99 ++--- GUI.NET/Controls/ctrlNsfPlayer.cs | 43 ++- GUI.NET/Controls/ctrlRecentGames.cs | 11 +- GUI.NET/Controls/ctrlTrackbar.Designer.cs | 33 +- GUI.NET/Controls/ctrlTrackbar.cs | 6 +- .../Controls/ctrlChrViewer.Designer.cs | 23 +- GUI.NET/Debugger/Controls/ctrlChrViewer.cs | 16 +- .../Controls/ctrlConsoleStatus.Designer.cs | 136 +++---- .../Debugger/Controls/ctrlControllerInput.cs | 15 +- .../ctrlMemoryAccessCounters.Designer.cs | 141 +++---- .../Controls/ctrlNametableViewer.Designer.cs | 33 +- .../Debugger/Controls/ctrlNametableViewer.cs | 13 +- .../Controls/ctrlPaletteViewer.Designer.cs | 31 +- .../Debugger/Controls/ctrlPaletteViewer.cs | 11 +- .../Controls/ctrlScrollableTextbox.cs | 10 +- .../Controls/ctrlSpriteViewer.Designer.cs | 38 +- GUI.NET/Debugger/Controls/ctrlSpriteViewer.cs | 8 +- .../Controls/ctrlTilePalette.Designer.cs | 1 + GUI.NET/Debugger/Controls/ctrlTilePalette.cs | 6 +- GUI.NET/Debugger/ctrlPaletteDisplay.cs | 14 +- GUI.NET/Debugger/frmBreakIn.Designer.cs | 10 +- GUI.NET/Debugger/frmDebugger.Designer.cs | 22 +- GUI.NET/Debugger/frmDebugger.cs | 7 +- GUI.NET/Debugger/frmEditLabel.Designer.cs | 30 +- GUI.NET/Debugger/frmFadeSpeed.Designer.cs | 10 +- GUI.NET/Debugger/frmMemoryViewer.Designer.cs | 51 ++- GUI.NET/Debugger/frmPpuViewer.Designer.cs | 16 +- GUI.NET/Forms/BaseForm.cs | 22 -- .../Forms/Cheats/ctrlCheatFinder.Designer.cs | 18 +- .../Forms/Config/ctrlDipSwitch.Designer.cs | 41 +- GUI.NET/Forms/Config/ctrlEmulatorShortcuts.cs | 8 + .../Config/ctrlPathSelection.Designer.cs | 59 +-- .../Config/ctrlStandardController.Designer.cs | 8 +- .../Forms/Config/ctrlStandardController.cs | 5 +- .../Forms/Config/frmAudioConfig.Designer.cs | 357 ++++++++++-------- .../Config/frmControllerConfig.Designer.cs | 113 +++--- GUI.NET/Forms/Config/frmControllerConfig.resx | 20 +- .../Config/frmEmulationConfig.Designer.cs | 225 +++++++---- GUI.NET/Forms/Config/frmEmulationConfig.cs | 2 +- GUI.NET/Forms/Config/frmGetKey.Designer.cs | 58 ++- GUI.NET/Forms/Config/frmGetKey.cs | 5 +- .../Forms/Config/frmPreferences.Designer.cs | 63 ++-- .../Forms/Config/frmVideoConfig.Designer.cs | 136 ++++--- GUI.NET/Forms/Config/frmVideoConfig.cs | 6 +- GUI.NET/Forms/Config/frmVsGameConfig.cs | 1 + GUI.NET/Forms/EntityBinder.cs | 12 +- .../HdPackEditor/frmHdPackEditor.Designer.cs | 42 ++- GUI.NET/Forms/HdPackEditor/frmHdPackEditor.cs | 5 +- .../Forms/NetPlay/frmServerConfig.Designer.cs | 10 +- GUI.NET/Forms/frmAbout.Designer.cs | 63 ++-- GUI.NET/Forms/frmMain.Designer.cs | 23 +- GUI.NET/Forms/frmMain.cs | 23 +- GUI.NET/GUI.NET.csproj | 10 + GUI.NET/app.manifest | 57 +++ 59 files changed, 1545 insertions(+), 958 deletions(-) create mode 100644 GUI.NET/Controls/MesenNumericUpDown.cs create mode 100644 GUI.NET/Controls/MesenNumericUpDown.resx create mode 100644 GUI.NET/app.manifest diff --git a/GUI.NET/Controls/BaseControl.cs b/GUI.NET/Controls/BaseControl.cs index 38faae6a..b1ba4e18 100644 --- a/GUI.NET/Controls/BaseControl.cs +++ b/GUI.NET/Controls/BaseControl.cs @@ -20,17 +20,11 @@ namespace Mesen.GUI.Controls } } - public new SizeF AutoScaleDimensions - { - set { - } - } - public new AutoScaleMode AutoScaleMode { set { if(Program.IsMono) { - base.AutoScaleMode = AutoScaleMode.None; + base.AutoScaleMode = AutoScaleMode.None; } else { base.AutoScaleMode = value; } diff --git a/GUI.NET/Controls/MesenNumericUpDown.cs b/GUI.NET/Controls/MesenNumericUpDown.cs new file mode 100644 index 00000000..8ba9c5c1 --- /dev/null +++ b/GUI.NET/Controls/MesenNumericUpDown.cs @@ -0,0 +1,110 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Mesen.GUI.Controls +{ + class MesenNumericUpDown : BaseControl + { + private NumericUpDown nud; + + public event EventHandler ValueChanged + { + add { nud.ValueChanged += value; } + remove { nud.ValueChanged -= value; } + } + + public new event EventHandler Validated + { + add { nud.Validated += value; } + remove { nud.Validated -= value; } + } + + public new event EventHandler Click + { + add { nud.Click += value; } + remove { nud.Click -= value; } + } + + public new event KeyEventHandler KeyDown + { + add { nud.KeyDown += value; } + remove { nud.KeyDown -= value; } + } + + public decimal Value + { + get { return nud.Value; } + set + { + nud.Text = value.ToString(); + nud.Value = value; + } + } + + public new string Text + { + get { return nud.Text; } + set { nud.Text = value; } + } + + public decimal Maximum + { + get { return nud.Maximum; } + set { nud.Maximum = value; } + } + + public decimal Minimum + { + get { return nud.Minimum; } + set { nud.Minimum = value; } + } + + public decimal Increment + { + get { return nud.Increment; } + set { nud.Increment = value; } + } + + public int DecimalPlaces + { + get { return nud.DecimalPlaces; } + set { nud.DecimalPlaces = value; } + } + + public MesenNumericUpDown() + { + InitializeComponent(); + } + + private void InitializeComponent() + { + this.nud = new System.Windows.Forms.NumericUpDown(); + ((System.ComponentModel.ISupportInitialize)(this.nud)).BeginInit(); + this.SuspendLayout(); + // + // nud + // + this.nud.AutoSize = true; + this.nud.Dock = System.Windows.Forms.DockStyle.Fill; + this.nud.Location = new System.Drawing.Point(0, 0); + this.nud.Name = "nud"; + this.nud.Size = new System.Drawing.Size(48, 20); + this.nud.TabIndex = 0; + // + // MesenNumericUpDown + // + this.Controls.Add(this.nud); + this.Name = "MesenNumericUpDown"; + this.Size = new System.Drawing.Size(48, 21); + ((System.ComponentModel.ISupportInitialize)(this.nud)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + } +} diff --git a/GUI.NET/Controls/MesenNumericUpDown.resx b/GUI.NET/Controls/MesenNumericUpDown.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/GUI.NET/Controls/MesenNumericUpDown.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/GUI.NET/Controls/ctrlHorizontalTrackbar.Designer.cs b/GUI.NET/Controls/ctrlHorizontalTrackbar.Designer.cs index 3e9936fe..48e089f8 100644 --- a/GUI.NET/Controls/ctrlHorizontalTrackbar.Designer.cs +++ b/GUI.NET/Controls/ctrlHorizontalTrackbar.Designer.cs @@ -29,7 +29,7 @@ { this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.trackBar = new System.Windows.Forms.TrackBar(); - this.txtValue = new System.Windows.Forms.TextBox(); + this.lblValue = new System.Windows.Forms.Label(); this.lblText = new System.Windows.Forms.Label(); this.tableLayoutPanel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.trackBar)).BeginInit(); @@ -41,7 +41,7 @@ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel1.Controls.Add(this.trackBar, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.txtValue, 1, 1); + this.tableLayoutPanel1.Controls.Add(this.lblValue, 1, 1); this.tableLayoutPanel1.Controls.Add(this.lblText, 0, 0); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); @@ -61,26 +61,25 @@ this.trackBar.Maximum = 100; this.trackBar.Minimum = -100; this.trackBar.Name = "trackBar"; - this.trackBar.Size = new System.Drawing.Size(172, 35); + this.trackBar.Size = new System.Drawing.Size(168, 35); this.trackBar.TabIndex = 13; this.trackBar.TickFrequency = 10; this.trackBar.Value = 50; this.trackBar.ValueChanged += new System.EventHandler(this.trackBar_ValueChanged); // - // txtValue + // lblValue // - this.txtValue.Anchor = System.Windows.Forms.AnchorStyles.Top; - this.txtValue.BackColor = System.Drawing.Color.White; - this.txtValue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtValue.Location = new System.Drawing.Point(175, 23); - this.txtValue.Multiline = true; - this.txtValue.Name = "txtValue"; - this.txtValue.ReadOnly = true; - this.txtValue.Size = new System.Drawing.Size(28, 17); - this.txtValue.TabIndex = 17; - this.txtValue.TabStop = false; - this.txtValue.Text = "100"; - this.txtValue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.lblValue.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.lblValue.AutoSize = true; + this.lblValue.BackColor = System.Drawing.Color.White; + this.lblValue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.lblValue.Location = new System.Drawing.Point(171, 20); + this.lblValue.MinimumSize = new System.Drawing.Size(32, 17); + this.lblValue.Name = "lblValue"; + this.lblValue.Size = new System.Drawing.Size(32, 17); + this.lblValue.TabIndex = 17; + this.lblValue.Text = "100"; + this.lblValue.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // lblText // @@ -88,7 +87,7 @@ this.lblText.Dock = System.Windows.Forms.DockStyle.Fill; this.lblText.Location = new System.Drawing.Point(3, 0); this.lblText.Name = "lblText"; - this.lblText.Size = new System.Drawing.Size(166, 20); + this.lblText.Size = new System.Drawing.Size(162, 20); this.lblText.TabIndex = 18; this.lblText.Text = "Text"; this.lblText.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -114,7 +113,7 @@ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.TrackBar trackBar; - private System.Windows.Forms.TextBox txtValue; + private System.Windows.Forms.Label lblValue; private System.Windows.Forms.Label lblText; } } diff --git a/GUI.NET/Controls/ctrlHorizontalTrackbar.cs b/GUI.NET/Controls/ctrlHorizontalTrackbar.cs index f1cb0724..21667390 100644 --- a/GUI.NET/Controls/ctrlHorizontalTrackbar.cs +++ b/GUI.NET/Controls/ctrlHorizontalTrackbar.cs @@ -55,13 +55,13 @@ namespace Mesen.GUI.Controls set { trackBar.Value = Math.Max(trackBar.Minimum, Math.Min(value, trackBar.Maximum)); - txtValue.Text = trackBar.Value.ToString(); + lblValue.Text = trackBar.Value.ToString(); } } private void trackBar_ValueChanged(object sender, EventArgs e) { - txtValue.Text = trackBar.Value.ToString(); + lblValue.Text = trackBar.Value.ToString(); } } } diff --git a/GUI.NET/Controls/ctrlNsfPlayer.Designer.cs b/GUI.NET/Controls/ctrlNsfPlayer.Designer.cs index 56947aa7..5b394556 100644 --- a/GUI.NET/Controls/ctrlNsfPlayer.Designer.cs +++ b/GUI.NET/Controls/ctrlNsfPlayer.Designer.cs @@ -47,12 +47,13 @@ this.lblVrc6 = new System.Windows.Forms.Label(); this.lblVrc7 = new System.Windows.Forms.Label(); this.lblSoundChips = new System.Windows.Forms.Label(); - this.picBackground = new System.Windows.Forms.PictureBox(); this.trkVolume = new System.Windows.Forms.TrackBar(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.cboTrack = new System.Windows.Forms.ComboBox(); this.lblTrackTotal = new System.Windows.Forms.Label(); this.lblTime = new System.Windows.Forms.Label(); + this.pnlBackground = new System.Windows.Forms.Panel(); + this.picBackground = new System.Windows.Forms.PictureBox(); this.tmrFastForward = new System.Windows.Forms.Timer(this.components); this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.lblRecording = new System.Windows.Forms.Label(); @@ -65,20 +66,21 @@ this.lblSlowMotionIcon = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel(); - this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel(); + this.tlpRepeatShuffle = new System.Windows.Forms.TableLayoutPanel(); this.picRepeat = new System.Windows.Forms.PictureBox(); this.picShuffle = new System.Windows.Forms.PictureBox(); this.tableLayoutPanel1.SuspendLayout(); this.tableLayoutPanel2.SuspendLayout(); this.tableLayoutPanel3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.picBackground)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.trkVolume)).BeginInit(); this.flowLayoutPanel1.SuspendLayout(); + this.pnlBackground.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picBackground)).BeginInit(); this.tableLayoutPanel4.SuspendLayout(); this.panel3.SuspendLayout(); this.panel2.SuspendLayout(); this.panel1.SuspendLayout(); - this.tableLayoutPanel5.SuspendLayout(); + this.tlpRepeatShuffle.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.picRepeat)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.picShuffle)).BeginInit(); this.SuspendLayout(); @@ -95,10 +97,10 @@ this.tableLayoutPanel1.Controls.Add(this.btnPause, 2, 2); this.tableLayoutPanel1.Controls.Add(this.btnNext, 3, 2); this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.picBackground, 0, 0); this.tableLayoutPanel1.Controls.Add(this.trkVolume, 4, 2); this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 0, 2); this.tableLayoutPanel1.Controls.Add(this.lblTime, 0, 3); + this.tableLayoutPanel1.Controls.Add(this.pnlBackground, 0, 0); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; @@ -360,28 +362,13 @@ this.lblSoundChips.TabIndex = 7; this.lblSoundChips.Text = "Sound Chips:"; // - // picBackground - // - this.picBackground.Anchor = System.Windows.Forms.AnchorStyles.None; - this.picBackground.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.tableLayoutPanel1.SetColumnSpan(this.picBackground, 5); - this.picBackground.Image = global::Mesen.GUI.Properties.Resources.NsfBackground; - this.picBackground.Location = new System.Drawing.Point(66, 13); - this.picBackground.Margin = new System.Windows.Forms.Padding(10); - this.picBackground.MaximumSize = new System.Drawing.Size(334, 380); - this.picBackground.Name = "picBackground"; - this.picBackground.Size = new System.Drawing.Size(238, 95); - this.picBackground.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.picBackground.TabIndex = 5; - this.picBackground.TabStop = false; - // // trkVolume // this.trkVolume.Location = new System.Drawing.Point(257, 210); this.trkVolume.Margin = new System.Windows.Forms.Padding(10, 3, 3, 3); this.trkVolume.Maximum = 100; this.trkVolume.Name = "trkVolume"; - this.trkVolume.Size = new System.Drawing.Size(104, 45); + this.trkVolume.Size = new System.Drawing.Size(106, 45); this.trkVolume.TabIndex = 6; this.trkVolume.TickFrequency = 10; this.trkVolume.TickStyle = System.Windows.Forms.TickStyle.Both; @@ -449,6 +436,28 @@ this.lblTime.Text = "00:00"; this.lblTime.TextAlign = System.Drawing.ContentAlignment.TopCenter; // + // pnlBackground + // + this.tableLayoutPanel1.SetColumnSpan(this.pnlBackground, 5); + this.pnlBackground.Controls.Add(this.picBackground); + this.pnlBackground.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlBackground.Location = new System.Drawing.Point(3, 3); + this.pnlBackground.Name = "pnlBackground"; + this.pnlBackground.Size = new System.Drawing.Size(365, 115); + this.pnlBackground.TabIndex = 11; + // + // picBackground + // + this.picBackground.BackgroundImage = global::Mesen.GUI.Properties.Resources.NsfBackground; + this.picBackground.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.picBackground.Location = new System.Drawing.Point(114, -3); + this.picBackground.Margin = new System.Windows.Forms.Padding(0); + this.picBackground.MaximumSize = new System.Drawing.Size(500, 90); + this.picBackground.Name = "picBackground"; + this.picBackground.Size = new System.Drawing.Size(150, 90); + this.picBackground.TabIndex = 5; + this.picBackground.TabStop = false; + // // tmrFastForward // this.tmrFastForward.Interval = 500; @@ -578,28 +587,29 @@ this.panel1.Size = new System.Drawing.Size(82, 18); this.panel1.TabIndex = 0; // - // tableLayoutPanel5 + // tlpRepeatShuffle // - this.tableLayoutPanel5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.tableLayoutPanel5.ColumnCount = 1; - this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel5.Controls.Add(this.picRepeat, 0, 1); - this.tableLayoutPanel5.Controls.Add(this.picShuffle, 0, 0); - this.tableLayoutPanel5.Location = new System.Drawing.Point(336, 8); - this.tableLayoutPanel5.Margin = new System.Windows.Forms.Padding(0); - this.tableLayoutPanel5.Name = "tableLayoutPanel5"; - this.tableLayoutPanel5.RowCount = 3; - this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel5.Size = new System.Drawing.Size(30, 60); - this.tableLayoutPanel5.TabIndex = 14; + this.tlpRepeatShuffle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.tlpRepeatShuffle.ColumnCount = 1; + this.tlpRepeatShuffle.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tlpRepeatShuffle.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tlpRepeatShuffle.Controls.Add(this.picRepeat, 0, 1); + this.tlpRepeatShuffle.Controls.Add(this.picShuffle, 0, 0); + this.tlpRepeatShuffle.Location = new System.Drawing.Point(336, 8); + this.tlpRepeatShuffle.Margin = new System.Windows.Forms.Padding(0); + this.tlpRepeatShuffle.Name = "tlpRepeatShuffle"; + this.tlpRepeatShuffle.RowCount = 3; + this.tlpRepeatShuffle.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tlpRepeatShuffle.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tlpRepeatShuffle.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tlpRepeatShuffle.Size = new System.Drawing.Size(30, 60); + this.tlpRepeatShuffle.TabIndex = 14; // // picRepeat // + this.picRepeat.BackgroundImage = global::Mesen.GUI.Properties.Resources.Repeat; + this.picRepeat.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.picRepeat.Cursor = System.Windows.Forms.Cursors.Hand; - this.picRepeat.Image = global::Mesen.GUI.Properties.Resources.Repeat; this.picRepeat.Location = new System.Drawing.Point(3, 33); this.picRepeat.Name = "picRepeat"; this.picRepeat.Size = new System.Drawing.Size(24, 24); @@ -609,8 +619,9 @@ // // picShuffle // + this.picShuffle.BackgroundImage = global::Mesen.GUI.Properties.Resources.Shuffle; + this.picShuffle.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.picShuffle.Cursor = System.Windows.Forms.Cursors.Hand; - this.picShuffle.Image = global::Mesen.GUI.Properties.Resources.Shuffle; this.picShuffle.Location = new System.Drawing.Point(3, 3); this.picShuffle.Name = "picShuffle"; this.picShuffle.Size = new System.Drawing.Size(24, 24); @@ -623,7 +634,7 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.Black; - this.Controls.Add(this.tableLayoutPanel5); + this.Controls.Add(this.tlpRepeatShuffle); this.Controls.Add(this.tableLayoutPanel4); this.Controls.Add(this.tableLayoutPanel1); this.Name = "ctrlNsfPlayer"; @@ -635,10 +646,11 @@ this.tableLayoutPanel2.PerformLayout(); this.tableLayoutPanel3.ResumeLayout(false); this.tableLayoutPanel3.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.picBackground)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.trkVolume)).EndInit(); this.flowLayoutPanel1.ResumeLayout(false); this.flowLayoutPanel1.PerformLayout(); + this.pnlBackground.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.picBackground)).EndInit(); this.tableLayoutPanel4.ResumeLayout(false); this.tableLayoutPanel4.PerformLayout(); this.panel3.ResumeLayout(false); @@ -647,7 +659,7 @@ this.panel2.PerformLayout(); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); - this.tableLayoutPanel5.ResumeLayout(false); + this.tlpRepeatShuffle.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.picRepeat)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.picShuffle)).EndInit(); this.ResumeLayout(false); @@ -693,8 +705,9 @@ private System.Windows.Forms.Panel panel3; private System.Windows.Forms.Label lblSlowMotion; private System.Windows.Forms.Label lblSlowMotionIcon; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel5; + private System.Windows.Forms.TableLayoutPanel tlpRepeatShuffle; private System.Windows.Forms.PictureBox picShuffle; private System.Windows.Forms.PictureBox picRepeat; + private System.Windows.Forms.Panel pnlBackground; } } diff --git a/GUI.NET/Controls/ctrlNsfPlayer.cs b/GUI.NET/Controls/ctrlNsfPlayer.cs index bbfff10f..98e748d6 100644 --- a/GUI.NET/Controls/ctrlNsfPlayer.cs +++ b/GUI.NET/Controls/ctrlNsfPlayer.cs @@ -19,6 +19,8 @@ namespace Mesen.GUI.Controls private bool _fastForwarding = false; private UInt32 _originalSpeed = 100; private bool _disableShortcutKeys = false; + private float _xFactor = 1; + private float _yFactor = 1; public ctrlNsfPlayer() { @@ -31,12 +33,45 @@ namespace Mesen.GUI.Controls this.trkVolume.KeyUp += Child_KeyUp; } + protected override void ScaleControl(SizeF factor, BoundsSpecified specified) + { + _xFactor = factor.Width; + _yFactor = factor.Height; + base.ScaleControl(factor, specified); + } + + public Size WindowMinimumSize + { + get + { + return new Size() { + Width = (int)(380 * _xFactor), + Height = (int)(320 * _yFactor) + }; + } + } + + protected override void OnResize(EventArgs e) + { + base.OnResize(e); + ResizeUi(); + } + + private void ResizeUi() + { + this.tlpRepeatShuffle.Left = this.Width - tlpRepeatShuffle.Width - 10; + this.picBackground.MaximumSize = new Size(500, 90); + this.picBackground.Size = new Size(pnlBackground.Width, pnlBackground.Height); + this.picBackground.Left = (pnlBackground.Width - picBackground.Width) / 2; + this.picBackground.Top = (pnlBackground.Height - picBackground.Height) / 2; + } + private bool Repeat { get { bool repeat = ConfigManager.Config.PreferenceInfo.NsfRepeat; - picRepeat.Image = repeat ? Properties.Resources.RepeatEnabled : Properties.Resources.Repeat; + picRepeat.BackgroundImage = repeat ? Properties.Resources.RepeatEnabled : Properties.Resources.Repeat; return repeat; } set @@ -44,7 +79,7 @@ namespace Mesen.GUI.Controls ConfigManager.Config.PreferenceInfo.NsfRepeat = value; ConfigManager.ApplyChanges(); ConfigManager.Config.ApplyConfig(); - picRepeat.Image = value ? Properties.Resources.RepeatEnabled : Properties.Resources.Repeat; + picRepeat.BackgroundImage = value ? Properties.Resources.RepeatEnabled : Properties.Resources.Repeat; } } @@ -53,7 +88,7 @@ namespace Mesen.GUI.Controls get { bool shuffle = ConfigManager.Config.PreferenceInfo.NsfShuffle; - picShuffle.Image = shuffle ? Properties.Resources.ShuffleEnabled : Properties.Resources.Shuffle; + picShuffle.BackgroundImage = shuffle ? Properties.Resources.ShuffleEnabled : Properties.Resources.Shuffle; return shuffle; } set @@ -61,7 +96,7 @@ namespace Mesen.GUI.Controls ConfigManager.Config.PreferenceInfo.NsfShuffle = value; ConfigManager.ApplyChanges(); ConfigManager.Config.ApplyConfig(); - picShuffle.Image = value ? Properties.Resources.ShuffleEnabled : Properties.Resources.Shuffle; + picShuffle.BackgroundImage = value ? Properties.Resources.ShuffleEnabled : Properties.Resources.Shuffle; } } diff --git a/GUI.NET/Controls/ctrlRecentGames.cs b/GUI.NET/Controls/ctrlRecentGames.cs index 21ba9086..2685be62 100644 --- a/GUI.NET/Controls/ctrlRecentGames.cs +++ b/GUI.NET/Controls/ctrlRecentGames.cs @@ -143,11 +143,20 @@ namespace Mesen.GUI.Controls UpdateSize(); } } + + float _xFactor = 1; + float _yFactor = 1; + protected override void ScaleControl(SizeF factor, BoundsSpecified specified) + { + _xFactor = factor.Width; + _yFactor = factor.Height; + base.ScaleControl(factor, specified); + } private void UpdateSize() { tlpPreviousState.Visible = false; - Size maxSize = new Size(this.Size.Width - 120, this.Size.Height - 50); + Size maxSize = new Size(this.Size.Width - (int)(120 * _xFactor), this.Size.Height - (int)(50 * _yFactor)); if(picPreviousState.Image != null) { double xRatio = (double)picPreviousState.Image.Width / maxSize.Width; diff --git a/GUI.NET/Controls/ctrlTrackbar.Designer.cs b/GUI.NET/Controls/ctrlTrackbar.Designer.cs index d9949cb9..c7343589 100644 --- a/GUI.NET/Controls/ctrlTrackbar.Designer.cs +++ b/GUI.NET/Controls/ctrlTrackbar.Designer.cs @@ -30,7 +30,7 @@ this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.lblText = new System.Windows.Forms.Label(); this.trackBar = new System.Windows.Forms.TrackBar(); - this.txtValue = new System.Windows.Forms.TextBox(); + this.lblValue = new System.Windows.Forms.Label(); this.tableLayoutPanel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.trackBar)).BeginInit(); this.SuspendLayout(); @@ -41,7 +41,7 @@ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.Controls.Add(this.lblText, 0, 2); this.tableLayoutPanel1.Controls.Add(this.trackBar, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.txtValue, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.lblValue, 0, 1); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); @@ -75,26 +75,25 @@ this.trackBar.Maximum = 100; this.trackBar.Name = "trackBar"; this.trackBar.Orientation = System.Windows.Forms.Orientation.Vertical; - this.trackBar.Size = new System.Drawing.Size(34, 125); + this.trackBar.Size = new System.Drawing.Size(34, 133); this.trackBar.TabIndex = 13; this.trackBar.TickFrequency = 10; this.trackBar.Value = 50; this.trackBar.ValueChanged += new System.EventHandler(this.trackBar_ValueChanged); // - // txtValue + // lblValue // - this.txtValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtValue.BackColor = System.Drawing.Color.White; - this.txtValue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtValue.Location = new System.Drawing.Point(3, 128); - this.txtValue.Multiline = true; - this.txtValue.Name = "txtValue"; - this.txtValue.ReadOnly = true; - this.txtValue.Size = new System.Drawing.Size(28, 17); - this.txtValue.TabIndex = 15; - this.txtValue.TabStop = false; - this.txtValue.Text = "100"; - this.txtValue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.lblValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.lblValue.AutoSize = true; + this.lblValue.BackColor = System.Drawing.Color.White; + this.lblValue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.lblValue.Location = new System.Drawing.Point(3, 133); + this.lblValue.MinimumSize = new System.Drawing.Size(28, 15); + this.lblValue.Name = "lblValue"; + this.lblValue.Size = new System.Drawing.Size(28, 15); + this.lblValue.TabIndex = 15; + this.lblValue.Text = "100"; + this.lblValue.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // ctrlTrackbar // @@ -118,6 +117,6 @@ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.Label lblText; private System.Windows.Forms.TrackBar trackBar; - private System.Windows.Forms.TextBox txtValue; + private System.Windows.Forms.Label lblValue; } } diff --git a/GUI.NET/Controls/ctrlTrackbar.cs b/GUI.NET/Controls/ctrlTrackbar.cs index 51e66fce..5f304848 100644 --- a/GUI.NET/Controls/ctrlTrackbar.cs +++ b/GUI.NET/Controls/ctrlTrackbar.cs @@ -62,10 +62,10 @@ namespace Mesen.GUI.Controls private void UpdateText() { if(this.Minimum == 0) { - txtValue.Text = trackBar.Value.ToString() + "%"; + lblValue.Text = trackBar.Value.ToString() + "%"; } else { - txtValue.Text = (trackBar.Value / 10.0).ToString() + "dB"; - txtValue.Font = new Font("Microsoft Sans Serif", 6.75F); + lblValue.Text = (trackBar.Value / 10.0).ToString() + "dB"; + lblValue.Font = new Font("Microsoft Sans Serif", 6.75F); } } diff --git a/GUI.NET/Debugger/Controls/ctrlChrViewer.Designer.cs b/GUI.NET/Debugger/Controls/ctrlChrViewer.Designer.cs index 3d55cf6f..73274e78 100644 --- a/GUI.NET/Debugger/Controls/ctrlChrViewer.Designer.cs +++ b/GUI.NET/Debugger/Controls/ctrlChrViewer.Designer.cs @@ -53,13 +53,13 @@ this.label3 = new System.Windows.Forms.Label(); this.picColorTooltip = new System.Windows.Forms.PictureBox(); this.picTileTooltip = new System.Windows.Forms.PictureBox(); + this.ctrlTilePalette = new Mesen.GUI.Debugger.Controls.ctrlTilePalette(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.picChrBank1 = new System.Windows.Forms.PictureBox(); this.ctxMenu = new System.Windows.Forms.ContextMenuStrip(this.components); this.mnuCopyHdPack = new System.Windows.Forms.ToolStripMenuItem(); this.picChrBank2 = new System.Windows.Forms.PictureBox(); this.toolTip = new System.Windows.Forms.ToolTip(this.components); - this.ctrlTilePalette = new Mesen.GUI.Debugger.Controls.ctrlTilePalette(); this.tableLayoutPanel3.SuspendLayout(); this.grpDisplayOptions.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); @@ -351,6 +351,7 @@ this.picTile.Location = new System.Drawing.Point(77, 55); this.picTile.Name = "picTile"; this.picTile.Size = new System.Drawing.Size(130, 130); + this.picTile.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.picTile.TabIndex = 12; this.picTile.TabStop = false; this.picTile.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picTile_MouseDown); @@ -390,6 +391,15 @@ this.picTileTooltip.TabIndex = 16; this.picTileTooltip.TabStop = false; // + // ctrlTilePalette + // + this.ctrlTilePalette.DisplayIndexes = false; + this.ctrlTilePalette.HighlightMouseOver = false; + this.ctrlTilePalette.Location = new System.Drawing.Point(77, 191); + this.ctrlTilePalette.Name = "ctrlTilePalette"; + this.ctrlTilePalette.Size = new System.Drawing.Size(130, 34); + this.ctrlTilePalette.TabIndex = 17; + // // tableLayoutPanel2 // this.tableLayoutPanel2.ColumnCount = 1; @@ -414,6 +424,7 @@ this.picChrBank1.Margin = new System.Windows.Forms.Padding(1); this.picChrBank1.Name = "picChrBank1"; this.picChrBank1.Size = new System.Drawing.Size(256, 257); + this.picChrBank1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.picChrBank1.TabIndex = 0; this.picChrBank1.TabStop = false; this.picChrBank1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picChrBank_MouseDown); @@ -444,6 +455,7 @@ this.picChrBank2.Margin = new System.Windows.Forms.Padding(1); this.picChrBank2.Name = "picChrBank2"; this.picChrBank2.Size = new System.Drawing.Size(256, 257); + this.picChrBank2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.picChrBank2.TabIndex = 1; this.picChrBank2.TabStop = false; this.picChrBank2.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picChrBank_MouseDown); @@ -456,15 +468,6 @@ this.toolTip.InitialDelay = 10; this.toolTip.ReshowDelay = 10; // - // ctrlTilePalette - // - this.ctrlTilePalette.DisplayIndexes = false; - this.ctrlTilePalette.HighlightMouseOver = false; - this.ctrlTilePalette.Location = new System.Drawing.Point(77, 191); - this.ctrlTilePalette.Name = "ctrlTilePalette"; - this.ctrlTilePalette.Size = new System.Drawing.Size(130, 34); - this.ctrlTilePalette.TabIndex = 17; - // // ctrlChrViewer // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/GUI.NET/Debugger/Controls/ctrlChrViewer.cs b/GUI.NET/Debugger/Controls/ctrlChrViewer.cs index 23964e56..a687f34b 100644 --- a/GUI.NET/Debugger/Controls/ctrlChrViewer.cs +++ b/GUI.NET/Debugger/Controls/ctrlChrViewer.cs @@ -217,8 +217,8 @@ namespace Mesen.GUI.Debugger.Controls private void picChrBank_MouseMove(object sender, MouseEventArgs e) { - int tileX = Math.Min(e.X / 16, 15); - int tileY = Math.Min(e.Y / 16, 15); + int tileX = Math.Min(e.X * 256 / picChrBank1.Width / 16, 15); + int tileY = Math.Min(e.Y * 256 / picChrBank1.Height / 16, 15); bool bottomBank = sender == this.picChrBank2; int tileIndex = tileY * 16 + tileX; @@ -234,8 +234,8 @@ namespace Mesen.GUI.Debugger.Controls private void picChrBank_MouseDown(object sender, MouseEventArgs e) { - int tileX = Math.Min(e.X / 16, 15); - int tileY = Math.Min(e.Y / 16, 15); + int tileX = Math.Min(e.X * 256 / picChrBank1.Width / 16, 15); + int tileY = Math.Min(e.Y * 256 / picChrBank1.Height / 16, 15); _tileIndex = tileY * 16 + tileX; _bottomBank = sender == this.picChrBank2; @@ -286,8 +286,8 @@ namespace Mesen.GUI.Debugger.Controls private void picTile_MouseMove(object sender, MouseEventArgs e) { - int x = Math.Max(0, Math.Min(e.X / 16, 7)); - int y = Math.Max(0, Math.Min(e.Y / 16, 7)); + int x = Math.Max(0, Math.Min(e.X * 128 / picTile.Width / 16, 7)); + int y = Math.Max(0, Math.Min(e.Y * 128 / picTile.Height / 16, 7)); if(x != _tilePosX || y != _tilePosY) { _tilePosX = x; @@ -358,8 +358,8 @@ namespace Mesen.GUI.Debugger.Controls { _drawing = true; - int x = Math.Max(0, Math.Min(e.X / 16, 7)); - int y = Math.Max(0, Math.Min(e.Y / 16, 7)); + int x = Math.Max(0, Math.Min(e.X * 128 / picTile.Width / 16, 7)); + int y = Math.Max(0, Math.Min(e.Y * 128 / picTile.Height / 16, 7)); DrawPixel(e.Button == MouseButtons.Left, x, y); } diff --git a/GUI.NET/Debugger/Controls/ctrlConsoleStatus.Designer.cs b/GUI.NET/Debugger/Controls/ctrlConsoleStatus.Designer.cs index bd1ce31e..1e8602c1 100644 --- a/GUI.NET/Debugger/Controls/ctrlConsoleStatus.Designer.cs +++ b/GUI.NET/Debugger/Controls/ctrlConsoleStatus.Designer.cs @@ -46,6 +46,8 @@ this.chkSpriteOverflow = new System.Windows.Forms.CheckBox(); this.chkSprite0Hit = new System.Windows.Forms.CheckBox(); this.chkVerticalBlank = new System.Windows.Forms.CheckBox(); + this.lblXScroll = new System.Windows.Forms.Label(); + this.txtXScroll = new System.Windows.Forms.TextBox(); this.grpControlMask = new System.Windows.Forms.GroupBox(); this.tableLayoutPanel9 = new System.Windows.Forms.TableLayoutPanel(); this.chkDrawLeftSpr = new System.Windows.Forms.CheckBox(); @@ -108,10 +110,10 @@ this.btnUndo = new System.Windows.Forms.Button(); this.grpInputStatus = new System.Windows.Forms.GroupBox(); this.tableLayoutPanel11 = new System.Windows.Forms.TableLayoutPanel(); - this.ctrlControllerInput4 = new Mesen.GUI.Debugger.Controls.ctrlControllerInput(); this.ctrlControllerInput3 = new Mesen.GUI.Debugger.Controls.ctrlControllerInput(); - this.ctrlControllerInput2 = new Mesen.GUI.Debugger.Controls.ctrlControllerInput(); + this.ctrlControllerInput4 = new Mesen.GUI.Debugger.Controls.ctrlControllerInput(); this.ctrlControllerInput1 = new Mesen.GUI.Debugger.Controls.ctrlControllerInput(); + this.ctrlControllerInput2 = new Mesen.GUI.Debugger.Controls.ctrlControllerInput(); this.tmrButton = new System.Windows.Forms.Timer(this.components); this.contextGoTo = new System.Windows.Forms.ContextMenuStrip(this.components); this.mnuGoToIrqHandler = new System.Windows.Forms.ToolStripMenuItem(); @@ -119,8 +121,6 @@ this.mnuGoToResetHandler = new System.Windows.Forms.ToolStripMenuItem(); this.mnuGoToInitHandler = new System.Windows.Forms.ToolStripMenuItem(); this.mnuGoToPlayHandler = new System.Windows.Forms.ToolStripMenuItem(); - this.lblXScroll = new System.Windows.Forms.Label(); - this.txtXScroll = new System.Windows.Forms.TextBox(); this.tableLayoutPanel2.SuspendLayout(); this.grpPPUStatus.SuspendLayout(); this.tableLayoutPanel8.SuspendLayout(); @@ -379,20 +379,45 @@ this.chkVerticalBlank.UseVisualStyleBackColor = true; this.chkVerticalBlank.Click += new System.EventHandler(this.OnOptionChanged); // + // lblXScroll + // + this.lblXScroll.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblXScroll.AutoSize = true; + this.lblXScroll.Location = new System.Drawing.Point(0, 83); + this.lblXScroll.Margin = new System.Windows.Forms.Padding(0); + this.lblXScroll.Name = "lblXScroll"; + this.lblXScroll.Size = new System.Drawing.Size(46, 13); + this.lblXScroll.TabIndex = 11; + this.lblXScroll.Text = "X Scroll:"; + this.lblXScroll.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // txtXScroll + // + this.txtXScroll.Location = new System.Drawing.Point(66, 80); + this.txtXScroll.Margin = new System.Windows.Forms.Padding(0); + this.txtXScroll.Name = "txtXScroll"; + this.txtXScroll.Size = new System.Drawing.Size(58, 20); + this.txtXScroll.TabIndex = 12; + this.txtXScroll.TextChanged += new System.EventHandler(this.OnOptionChanged); + // // grpControlMask // this.grpControlMask.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.grpControlMask.AutoSize = true; + this.grpControlMask.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.grpControlMask.Controls.Add(this.tableLayoutPanel9); this.grpControlMask.Location = new System.Drawing.Point(197, 0); this.grpControlMask.Margin = new System.Windows.Forms.Padding(0); this.grpControlMask.Name = "grpControlMask"; - this.grpControlMask.Size = new System.Drawing.Size(250, 151); + this.grpControlMask.Size = new System.Drawing.Size(250, 138); this.grpControlMask.TabIndex = 1; this.grpControlMask.TabStop = false; this.grpControlMask.Text = "Control && Mask"; // // tableLayoutPanel9 // + this.tableLayoutPanel9.AutoSize = true; + this.tableLayoutPanel9.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.tableLayoutPanel9.ColumnCount = 2; this.tableLayoutPanel9.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 56.48536F)); this.tableLayoutPanel9.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 43.51464F)); @@ -418,7 +443,7 @@ this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel9.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel9.Size = new System.Drawing.Size(244, 132); + this.tableLayoutPanel9.Size = new System.Drawing.Size(244, 119); this.tableLayoutPanel9.TabIndex = 1; // // chkDrawLeftSpr @@ -435,12 +460,14 @@ // // flowLayoutPanel7 // + this.flowLayoutPanel7.AutoSize = true; + this.flowLayoutPanel7.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.flowLayoutPanel7.Controls.Add(this.lblSprAddr); this.flowLayoutPanel7.Controls.Add(this.txtSprAddr); - this.flowLayoutPanel7.Location = new System.Drawing.Point(0, 24); + this.flowLayoutPanel7.Location = new System.Drawing.Point(0, 22); this.flowLayoutPanel7.Margin = new System.Windows.Forms.Padding(0); this.flowLayoutPanel7.Name = "flowLayoutPanel7"; - this.flowLayoutPanel7.Size = new System.Drawing.Size(116, 26); + this.flowLayoutPanel7.Size = new System.Drawing.Size(101, 22); this.flowLayoutPanel7.TabIndex = 22; // // lblSprAddr @@ -546,12 +573,14 @@ // // flowLayoutPanel6 // + this.flowLayoutPanel6.AutoSize = true; + this.flowLayoutPanel6.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.flowLayoutPanel6.Controls.Add(this.lblBGAddr); this.flowLayoutPanel6.Controls.Add(this.txtBGAddr); this.flowLayoutPanel6.Location = new System.Drawing.Point(0, 0); this.flowLayoutPanel6.Margin = new System.Windows.Forms.Padding(0); this.flowLayoutPanel6.Name = "flowLayoutPanel6"; - this.flowLayoutPanel6.Size = new System.Drawing.Size(116, 24); + this.flowLayoutPanel6.Size = new System.Drawing.Size(101, 22); this.flowLayoutPanel6.TabIndex = 21; // // lblBGAddr @@ -1173,10 +1202,10 @@ this.tableLayoutPanel11.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); this.tableLayoutPanel11.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); this.tableLayoutPanel11.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); - this.tableLayoutPanel11.Controls.Add(this.ctrlControllerInput4, 2, 0); - this.tableLayoutPanel11.Controls.Add(this.ctrlControllerInput3, 3, 0); - this.tableLayoutPanel11.Controls.Add(this.ctrlControllerInput2, 0, 0); - this.tableLayoutPanel11.Controls.Add(this.ctrlControllerInput1, 1, 0); + this.tableLayoutPanel11.Controls.Add(this.ctrlControllerInput3, 2, 0); + this.tableLayoutPanel11.Controls.Add(this.ctrlControllerInput4, 3, 0); + this.tableLayoutPanel11.Controls.Add(this.ctrlControllerInput1, 0, 0); + this.tableLayoutPanel11.Controls.Add(this.ctrlControllerInput2, 1, 0); this.tableLayoutPanel11.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel11.Location = new System.Drawing.Point(3, 16); this.tableLayoutPanel11.Name = "tableLayoutPanel11"; @@ -1185,45 +1214,45 @@ this.tableLayoutPanel11.Size = new System.Drawing.Size(447, 48); this.tableLayoutPanel11.TabIndex = 0; // - // ctrlControllerInput4 - // - this.ctrlControllerInput4.Anchor = System.Windows.Forms.AnchorStyles.None; - this.ctrlControllerInput4.Location = new System.Drawing.Point(233, 8); - this.ctrlControllerInput4.Name = "ctrlControllerInput4"; - this.ctrlControllerInput4.PlayerNumber = 2; - this.ctrlControllerInput4.Size = new System.Drawing.Size(88, 32); - this.ctrlControllerInput4.TabIndex = 3; - this.ctrlControllerInput4.Text = "ctrlControllerInput4"; - // // ctrlControllerInput3 // this.ctrlControllerInput3.Anchor = System.Windows.Forms.AnchorStyles.None; - this.ctrlControllerInput3.Location = new System.Drawing.Point(346, 8); + this.ctrlControllerInput3.Location = new System.Drawing.Point(233, 8); this.ctrlControllerInput3.Name = "ctrlControllerInput3"; - this.ctrlControllerInput3.PlayerNumber = 3; + this.ctrlControllerInput3.PlayerNumber = 2; this.ctrlControllerInput3.Size = new System.Drawing.Size(88, 32); - this.ctrlControllerInput3.TabIndex = 2; - this.ctrlControllerInput3.Text = "ctrlControllerInput3"; + this.ctrlControllerInput3.TabIndex = 3; + this.ctrlControllerInput3.Text = "ctrlControllerInput4"; // - // ctrlControllerInput2 + // ctrlControllerInput4 // - this.ctrlControllerInput2.Anchor = System.Windows.Forms.AnchorStyles.None; - this.ctrlControllerInput2.Location = new System.Drawing.Point(11, 8); - this.ctrlControllerInput2.Name = "ctrlControllerInput2"; - this.ctrlControllerInput2.PlayerNumber = 0; - this.ctrlControllerInput2.Size = new System.Drawing.Size(88, 32); - this.ctrlControllerInput2.TabIndex = 1; - this.ctrlControllerInput2.Text = "ctrlControllerInput2"; + this.ctrlControllerInput4.Anchor = System.Windows.Forms.AnchorStyles.None; + this.ctrlControllerInput4.Location = new System.Drawing.Point(346, 8); + this.ctrlControllerInput4.Name = "ctrlControllerInput4"; + this.ctrlControllerInput4.PlayerNumber = 3; + this.ctrlControllerInput4.Size = new System.Drawing.Size(88, 32); + this.ctrlControllerInput4.TabIndex = 2; + this.ctrlControllerInput4.Text = "ctrlControllerInput3"; // // ctrlControllerInput1 // this.ctrlControllerInput1.Anchor = System.Windows.Forms.AnchorStyles.None; - this.ctrlControllerInput1.Location = new System.Drawing.Point(122, 8); + this.ctrlControllerInput1.Location = new System.Drawing.Point(11, 8); this.ctrlControllerInput1.Name = "ctrlControllerInput1"; - this.ctrlControllerInput1.PlayerNumber = 1; + this.ctrlControllerInput1.PlayerNumber = 0; this.ctrlControllerInput1.Size = new System.Drawing.Size(88, 32); - this.ctrlControllerInput1.TabIndex = 0; - this.ctrlControllerInput1.Text = "ctrlControllerInput1"; + this.ctrlControllerInput1.TabIndex = 1; + this.ctrlControllerInput1.Text = "ctrlControllerInput2"; + // + // ctrlControllerInput2 + // + this.ctrlControllerInput2.Anchor = System.Windows.Forms.AnchorStyles.None; + this.ctrlControllerInput2.Location = new System.Drawing.Point(122, 8); + this.ctrlControllerInput2.Name = "ctrlControllerInput2"; + this.ctrlControllerInput2.PlayerNumber = 1; + this.ctrlControllerInput2.Size = new System.Drawing.Size(88, 32); + this.ctrlControllerInput2.TabIndex = 0; + this.ctrlControllerInput2.Text = "ctrlControllerInput1"; // // tmrButton // @@ -1276,27 +1305,6 @@ this.mnuGoToPlayHandler.Text = "Play Handler"; this.mnuGoToPlayHandler.Click += new System.EventHandler(this.mnuGoToPlayHandler_Click); // - // lblXScroll - // - this.lblXScroll.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lblXScroll.AutoSize = true; - this.lblXScroll.Location = new System.Drawing.Point(0, 83); - this.lblXScroll.Margin = new System.Windows.Forms.Padding(0); - this.lblXScroll.Name = "lblXScroll"; - this.lblXScroll.Size = new System.Drawing.Size(46, 13); - this.lblXScroll.TabIndex = 11; - this.lblXScroll.Text = "X Scroll:"; - this.lblXScroll.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // txtXScroll - // - this.txtXScroll.Location = new System.Drawing.Point(66, 80); - this.txtXScroll.Margin = new System.Windows.Forms.Padding(0); - this.txtXScroll.Name = "txtXScroll"; - this.txtXScroll.Size = new System.Drawing.Size(58, 20); - this.txtXScroll.TabIndex = 12; - this.txtXScroll.TextChanged += new System.EventHandler(this.OnOptionChanged); - // // ctrlConsoleStatus // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1307,11 +1315,13 @@ this.tableLayoutPanel2.ResumeLayout(false); this.grpPPUStatus.ResumeLayout(false); this.tableLayoutPanel8.ResumeLayout(false); + this.tableLayoutPanel8.PerformLayout(); this.tableLayoutPanel7.ResumeLayout(false); this.tableLayoutPanel7.PerformLayout(); this.tableLayoutPanel5.ResumeLayout(false); this.tableLayoutPanel5.PerformLayout(); this.grpControlMask.ResumeLayout(false); + this.grpControlMask.PerformLayout(); this.tableLayoutPanel9.ResumeLayout(false); this.tableLayoutPanel9.PerformLayout(); this.flowLayoutPanel7.ResumeLayout(false); @@ -1421,10 +1431,10 @@ private System.Windows.Forms.ToolStripMenuItem mnuGoToPlayHandler; private System.Windows.Forms.GroupBox grpInputStatus; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel11; - private Controls.ctrlControllerInput ctrlControllerInput1; - private Controls.ctrlControllerInput ctrlControllerInput4; - private Controls.ctrlControllerInput ctrlControllerInput3; private Controls.ctrlControllerInput ctrlControllerInput2; + private Controls.ctrlControllerInput ctrlControllerInput3; + private Controls.ctrlControllerInput ctrlControllerInput4; + private Controls.ctrlControllerInput ctrlControllerInput1; private System.Windows.Forms.CheckBox chkFrameCounter; private System.Windows.Forms.CheckBox chkExternal; private System.Windows.Forms.CheckBox chkNMI; diff --git a/GUI.NET/Debugger/Controls/ctrlControllerInput.cs b/GUI.NET/Debugger/Controls/ctrlControllerInput.cs index 687d72d4..3b493500 100644 --- a/GUI.NET/Debugger/Controls/ctrlControllerInput.cs +++ b/GUI.NET/Debugger/Controls/ctrlControllerInput.cs @@ -87,8 +87,7 @@ namespace Mesen.GUI.Debugger.Controls private Buttons ToggleButtonState(Buttons state, Point mouseLoc) { - int scale = 2; - Point location = new Point(mouseLoc.X/scale, mouseLoc.Y/scale); + Point location = new Point((int)(mouseLoc.X/_xFactor), (int)(mouseLoc.Y/_yFactor)); Rectangle upButton = new Rectangle(6, 2, 4, 4); Rectangle downButton = new Rectangle(6, 10, 4, 4); @@ -137,13 +136,23 @@ namespace Mesen.GUI.Debugger.Controls } } + float _xFactor = 1; + float _yFactor = 1; + protected override void OnResize(EventArgs e) + { + base.OnResize(e); + _xFactor = (float)this.Width / 44; + _yFactor = (float)this.Height / 16; + } + protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); e.Graphics.Clear(Color.LightGray); - e.Graphics.ScaleTransform(2, 2); + e.Graphics.ScaleTransform(_xFactor, _yFactor); + e.Graphics.DrawRectangle(Pens.DarkSlateGray, 0, 0, 44, 16); e.Graphics.FillRectangle(Brushes.DarkSlateGray, 6, 6, 4, 4); diff --git a/GUI.NET/Debugger/Controls/ctrlMemoryAccessCounters.Designer.cs b/GUI.NET/Debugger/Controls/ctrlMemoryAccessCounters.Designer.cs index 441e16f5..cc9dd00e 100644 --- a/GUI.NET/Debugger/Controls/ctrlMemoryAccessCounters.Designer.cs +++ b/GUI.NET/Debugger/Controls/ctrlMemoryAccessCounters.Designer.cs @@ -31,27 +31,31 @@ this.lblViewMemoryType = new System.Windows.Forms.Label(); this.cboMemoryType = new System.Windows.Forms.ComboBox(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.ctrlScrollableTextbox = new Mesen.GUI.Debugger.ctrlScrollableTextbox(); + this.chkHighlightUninitRead = new System.Windows.Forms.CheckBox(); + this.btnReset = new System.Windows.Forms.Button(); + this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); this.lblSort = new System.Windows.Forms.Label(); this.cboSort = new System.Windows.Forms.ComboBox(); - this.chkHighlightUninitRead = new System.Windows.Forms.CheckBox(); - this.btnReset = new System.Windows.Forms.Button(); - this.ctrlScrollableTextbox = new Mesen.GUI.Debugger.ctrlScrollableTextbox(); - this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.flowLayoutPanel1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); - this.flowLayoutPanel2.SuspendLayout(); this.tableLayoutPanel2.SuspendLayout(); + this.flowLayoutPanel2.SuspendLayout(); this.SuspendLayout(); // // flowLayoutPanel1 // + this.flowLayoutPanel1.AutoSize = true; + this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.flowLayoutPanel1.Controls.Add(this.lblViewMemoryType); this.flowLayoutPanel1.Controls.Add(this.cboMemoryType); - this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3); + this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(167, 26); + this.flowLayoutPanel1.Size = new System.Drawing.Size(166, 27); this.flowLayoutPanel1.TabIndex = 2; + this.flowLayoutPanel1.WrapContents = false; // // lblViewMemoryType // @@ -97,15 +101,77 @@ this.tableLayoutPanel1.Size = new System.Drawing.Size(514, 307); this.tableLayoutPanel1.TabIndex = 3; // + // ctrlScrollableTextbox + // + this.ctrlScrollableTextbox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.tableLayoutPanel1.SetColumnSpan(this.ctrlScrollableTextbox, 2); + this.ctrlScrollableTextbox.Dock = System.Windows.Forms.DockStyle.Fill; + this.ctrlScrollableTextbox.FontSize = 13F; + this.ctrlScrollableTextbox.Location = new System.Drawing.Point(3, 30); + this.ctrlScrollableTextbox.Name = "ctrlScrollableTextbox"; + this.ctrlScrollableTextbox.ShowContentNotes = false; + this.ctrlScrollableTextbox.ShowLineNumberNotes = false; + this.ctrlScrollableTextbox.ShowSingleContentLineNotes = true; + this.ctrlScrollableTextbox.ShowSingleLineLineNumberNotes = false; + this.ctrlScrollableTextbox.Size = new System.Drawing.Size(508, 245); + this.ctrlScrollableTextbox.TabIndex = 0; + // + // chkHighlightUninitRead + // + this.chkHighlightUninitRead.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.chkHighlightUninitRead.AutoSize = true; + this.chkHighlightUninitRead.Location = new System.Drawing.Point(3, 284); + this.chkHighlightUninitRead.Name = "chkHighlightUninitRead"; + this.chkHighlightUninitRead.Size = new System.Drawing.Size(422, 17); + this.chkHighlightUninitRead.TabIndex = 4; + this.chkHighlightUninitRead.Text = "Highlight uninitialized memory reads (only accurate if debugger is active at powe" + + "r on)"; + this.chkHighlightUninitRead.UseVisualStyleBackColor = true; + this.chkHighlightUninitRead.CheckedChanged += new System.EventHandler(this.chkHighlightUninitRead_CheckedChanged); + // + // btnReset + // + this.btnReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnReset.Location = new System.Drawing.Point(436, 281); + this.btnReset.Name = "btnReset"; + this.btnReset.Size = new System.Drawing.Size(75, 23); + this.btnReset.TabIndex = 5; + this.btnReset.Text = "Reset Counts"; + this.btnReset.UseVisualStyleBackColor = true; + this.btnReset.Click += new System.EventHandler(this.btnReset_Click); + // + // tableLayoutPanel2 + // + this.tableLayoutPanel2.AutoSize = true; + this.tableLayoutPanel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.tableLayoutPanel2.ColumnCount = 2; + this.tableLayoutPanel1.SetColumnSpan(this.tableLayoutPanel2, 2); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel2.Controls.Add(this.flowLayoutPanel1, 0, 0); + this.tableLayoutPanel2.Controls.Add(this.flowLayoutPanel2, 1, 0); + this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(0); + this.tableLayoutPanel2.Name = "tableLayoutPanel2"; + this.tableLayoutPanel2.RowCount = 1; + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel2.Size = new System.Drawing.Size(514, 27); + this.tableLayoutPanel2.TabIndex = 6; + // // flowLayoutPanel2 // this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.flowLayoutPanel2.AutoSize = true; + this.flowLayoutPanel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.flowLayoutPanel2.Controls.Add(this.lblSort); this.flowLayoutPanel2.Controls.Add(this.cboSort); - this.flowLayoutPanel2.Location = new System.Drawing.Point(335, 3); + this.flowLayoutPanel2.Location = new System.Drawing.Point(338, 0); + this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0); this.flowLayoutPanel2.Name = "flowLayoutPanel2"; - this.flowLayoutPanel2.Size = new System.Drawing.Size(182, 26); + this.flowLayoutPanel2.Size = new System.Drawing.Size(176, 27); this.flowLayoutPanel2.TabIndex = 3; + this.flowLayoutPanel2.WrapContents = false; // // lblSort // @@ -133,73 +199,22 @@ this.cboSort.TabIndex = 1; this.cboSort.SelectedIndexChanged += new System.EventHandler(this.cboSort_SelectedIndexChanged); // - // chkHighlightUninitRead - // - this.chkHighlightUninitRead.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.chkHighlightUninitRead.AutoSize = true; - this.chkHighlightUninitRead.Location = new System.Drawing.Point(3, 284); - this.chkHighlightUninitRead.Name = "chkHighlightUninitRead"; - this.chkHighlightUninitRead.Size = new System.Drawing.Size(422, 17); - this.chkHighlightUninitRead.TabIndex = 4; - this.chkHighlightUninitRead.Text = "Highlight uninitialized memory reads (only accurate if debugger is active at powe" + - "r on)"; - this.chkHighlightUninitRead.UseVisualStyleBackColor = true; - this.chkHighlightUninitRead.CheckedChanged += new System.EventHandler(this.chkHighlightUninitRead_CheckedChanged); - // - // btnReset - // - this.btnReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnReset.Location = new System.Drawing.Point(436, 281); - this.btnReset.Name = "btnReset"; - this.btnReset.Size = new System.Drawing.Size(75, 23); - this.btnReset.TabIndex = 5; - this.btnReset.Text = "Reset Counts"; - this.btnReset.UseVisualStyleBackColor = true; - this.btnReset.Click += new System.EventHandler(this.btnReset_Click); - // - // ctrlScrollableTextbox - // - this.ctrlScrollableTextbox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.tableLayoutPanel1.SetColumnSpan(this.ctrlScrollableTextbox, 2); - this.ctrlScrollableTextbox.Dock = System.Windows.Forms.DockStyle.Fill; - this.ctrlScrollableTextbox.Location = new System.Drawing.Point(3, 35); - this.ctrlScrollableTextbox.Name = "ctrlScrollableTextbox"; - this.ctrlScrollableTextbox.ShowContentNotes = false; - this.ctrlScrollableTextbox.ShowLineNumberNotes = false; - this.ctrlScrollableTextbox.Size = new System.Drawing.Size(508, 240); - this.ctrlScrollableTextbox.TabIndex = 0; - // - // tableLayoutPanel2 - // - this.tableLayoutPanel2.ColumnCount = 2; - this.tableLayoutPanel1.SetColumnSpan(this.tableLayoutPanel2, 2); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel2.Controls.Add(this.flowLayoutPanel2, 1, 0); - this.tableLayoutPanel2.Controls.Add(this.flowLayoutPanel1, 0, 0); - this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0); - this.tableLayoutPanel2.Name = "tableLayoutPanel2"; - this.tableLayoutPanel2.RowCount = 1; - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel2.Size = new System.Drawing.Size(514, 32); - this.tableLayoutPanel2.TabIndex = 6; - // // ctrlMemoryAccessCounters // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.tableLayoutPanel1); + this.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0); this.Name = "ctrlMemoryAccessCounters"; this.Size = new System.Drawing.Size(514, 307); this.flowLayoutPanel1.ResumeLayout(false); this.flowLayoutPanel1.PerformLayout(); this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.PerformLayout(); + this.tableLayoutPanel2.ResumeLayout(false); + this.tableLayoutPanel2.PerformLayout(); this.flowLayoutPanel2.ResumeLayout(false); this.flowLayoutPanel2.PerformLayout(); - this.tableLayoutPanel2.ResumeLayout(false); this.ResumeLayout(false); } diff --git a/GUI.NET/Debugger/Controls/ctrlNametableViewer.Designer.cs b/GUI.NET/Debugger/Controls/ctrlNametableViewer.Designer.cs index bd7291c0..49ec691f 100644 --- a/GUI.NET/Debugger/Controls/ctrlNametableViewer.Designer.cs +++ b/GUI.NET/Debugger/Controls/ctrlNametableViewer.Designer.cs @@ -96,6 +96,7 @@ this.picNametable.Name = "picNametable"; this.tableLayoutPanel1.SetRowSpan(this.picNametable, 2); this.picNametable.Size = new System.Drawing.Size(514, 482); + this.picNametable.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.picNametable.TabIndex = 0; this.picNametable.TabStop = false; this.picNametable.DoubleClick += new System.EventHandler(this.picNametable_DoubleClick); @@ -108,7 +109,7 @@ this.toolStripMenuItem1, this.mnuCopyHdPack}); this.ctxMenu.Name = "ctxMenu"; - this.ctxMenu.Size = new System.Drawing.Size(233, 76); + this.ctxMenu.Size = new System.Drawing.Size(233, 54); this.ctxMenu.Opening += new System.ComponentModel.CancelEventHandler(this.ctxMenu_Opening); // // mnuShowInChrViewer @@ -123,28 +124,34 @@ // toolStripMenuItem1 // this.toolStripMenuItem1.Name = "toolStripMenuItem1"; - this.toolStripMenuItem1.Size = new System.Drawing.Size(218, 6); + this.toolStripMenuItem1.Size = new System.Drawing.Size(229, 6); // // mnuCopyHdPack // this.mnuCopyHdPack.Name = "mnuCopyHdPack"; - this.mnuCopyHdPack.Size = new System.Drawing.Size(221, 22); + this.mnuCopyHdPack.Size = new System.Drawing.Size(232, 22); this.mnuCopyHdPack.Text = "Copy Tile (HD Pack Format)"; this.mnuCopyHdPack.Click += new System.EventHandler(this.mnuCopyHdPack_Click); // // grpTileInfo // + this.grpTileInfo.AutoSize = true; + this.grpTileInfo.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.grpTileInfo.Controls.Add(this.tableLayoutPanel2); + this.grpTileInfo.Dock = System.Windows.Forms.DockStyle.Fill; this.grpTileInfo.Location = new System.Drawing.Point(519, 3); this.grpTileInfo.Name = "grpTileInfo"; - this.grpTileInfo.Size = new System.Drawing.Size(175, 373); + this.grpTileInfo.Size = new System.Drawing.Size(175, 339); this.grpTileInfo.TabIndex = 4; this.grpTileInfo.TabStop = false; this.grpTileInfo.Text = "Tile Info"; // // tableLayoutPanel2 // - this.tableLayoutPanel2.ColumnCount = 2; + this.tableLayoutPanel2.AutoSize = true; + this.tableLayoutPanel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.tableLayoutPanel2.ColumnCount = 3; + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel2.Controls.Add(this.txtPpuAddress, 1, 0); @@ -181,7 +188,7 @@ this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel2.Size = new System.Drawing.Size(169, 354); + this.tableLayoutPanel2.Size = new System.Drawing.Size(169, 320); this.tableLayoutPanel2.TabIndex = 0; // // txtPpuAddress @@ -322,6 +329,7 @@ this.picTile.Location = new System.Drawing.Point(84, 211); this.picTile.Name = "picTile"; this.picTile.Size = new System.Drawing.Size(63, 66); + this.picTile.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.picTile.TabIndex = 12; this.picTile.TabStop = false; // @@ -357,25 +365,28 @@ // // ctrlTilePalette // - this.ctrlTilePalette.Anchor = System.Windows.Forms.AnchorStyles.None; + this.ctrlTilePalette.Anchor = System.Windows.Forms.AnchorStyles.Right; this.tableLayoutPanel2.SetColumnSpan(this.ctrlTilePalette, 2); this.ctrlTilePalette.DisplayIndexes = false; this.ctrlTilePalette.HighlightMouseOver = false; - this.ctrlTilePalette.Location = new System.Drawing.Point(19, 283); + this.ctrlTilePalette.Location = new System.Drawing.Point(17, 283); this.ctrlTilePalette.Name = "ctrlTilePalette"; this.ctrlTilePalette.Size = new System.Drawing.Size(130, 34); this.ctrlTilePalette.TabIndex = 19; // // flowLayoutPanel1 // + this.flowLayoutPanel1.AutoSize = true; + this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.flowLayoutPanel1.Controls.Add(this.chkShowPpuScrollOverlay); this.flowLayoutPanel1.Controls.Add(this.chkShowTileGrid); this.flowLayoutPanel1.Controls.Add(this.chkShowAttributeGrid); this.flowLayoutPanel1.Controls.Add(this.chkHighlightChrTile); - this.flowLayoutPanel1.Location = new System.Drawing.Point(516, 379); + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel1.Location = new System.Drawing.Point(516, 345); this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(181, 124); + this.flowLayoutPanel1.Size = new System.Drawing.Size(181, 139); this.flowLayoutPanel1.TabIndex = 5; // // chkShowPpuScrollOverlay @@ -430,9 +441,11 @@ this.Name = "ctrlNametableViewer"; this.Size = new System.Drawing.Size(697, 486); this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.picNametable)).EndInit(); this.ctxMenu.ResumeLayout(false); this.grpTileInfo.ResumeLayout(false); + this.grpTileInfo.PerformLayout(); this.tableLayoutPanel2.ResumeLayout(false); this.tableLayoutPanel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.picTile)).EndInit(); diff --git a/GUI.NET/Debugger/Controls/ctrlNametableViewer.cs b/GUI.NET/Debugger/Controls/ctrlNametableViewer.cs index 8fdd2230..1eccd120 100644 --- a/GUI.NET/Debugger/Controls/ctrlNametableViewer.cs +++ b/GUI.NET/Debugger/Controls/ctrlNametableViewer.cs @@ -176,18 +176,21 @@ namespace Mesen.GUI.Debugger.Controls private void picNametable_MouseMove(object sender, MouseEventArgs e) { + int xPos = e.X * 512 / picNametable.Width; + int yPos = e.Y * 480 / picNametable.Height; + _nametableIndex = 0; - if(e.X >= 256) { + if(xPos >= 256) { _nametableIndex++; } - if(e.Y >= 240) { + if(yPos >= 240) { _nametableIndex+=2; } int baseAddress = 0x2000 + _nametableIndex * 0x400; - _tileX = Math.Min(e.X / 8, 63); - _tileY = Math.Min(e.Y / 8, 59); + _tileX = Math.Min(xPos / 8, 63); + _tileY = Math.Min(yPos / 8, 59); int shift = (_tileX & 0x02) | ((_tileY & 0x02) << 1); if(_nametableIndex % 2 == 1) { @@ -226,7 +229,7 @@ namespace Mesen.GUI.Debugger.Controls Bitmap tile = new Bitmap(64, 64); Bitmap tilePreview = new Bitmap(8, 8); using(Graphics g = Graphics.FromImage(tilePreview)) { - g.DrawImage(_nametableImage, new Rectangle(0, 0, 8, 8), new Rectangle(e.X/8*8, e.Y/8*8, 8, 8), GraphicsUnit.Pixel); + g.DrawImage(_nametableImage, new Rectangle(0, 0, 8, 8), new Rectangle(xPos/8*8, yPos/8*8, 8, 8), GraphicsUnit.Pixel); } using(Graphics g = Graphics.FromImage(tile)) { g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor; diff --git a/GUI.NET/Debugger/Controls/ctrlPaletteViewer.Designer.cs b/GUI.NET/Debugger/Controls/ctrlPaletteViewer.Designer.cs index df53adef..1a1a8954 100644 --- a/GUI.NET/Debugger/Controls/ctrlPaletteViewer.Designer.cs +++ b/GUI.NET/Debugger/Controls/ctrlPaletteViewer.Designer.cs @@ -37,9 +37,9 @@ this.picColor = new System.Windows.Forms.PictureBox(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); this.picPalette = new System.Windows.Forms.PictureBox(); - this.lblClickColorHint = new System.Windows.Forms.Label(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.picHelp = new System.Windows.Forms.PictureBox(); + this.lblClickColorHint = new System.Windows.Forms.Label(); this.grpColorInfo.SuspendLayout(); this.tableLayoutPanel4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.picColor)).BeginInit(); @@ -53,10 +53,10 @@ // this.grpColorInfo.Controls.Add(this.tableLayoutPanel4); this.grpColorInfo.Dock = System.Windows.Forms.DockStyle.Fill; - this.grpColorInfo.Location = new System.Drawing.Point(137, 3); + this.grpColorInfo.Location = new System.Drawing.Point(135, 3); this.grpColorInfo.Name = "grpColorInfo"; this.tableLayoutPanel3.SetRowSpan(this.grpColorInfo, 2); - this.grpColorInfo.Size = new System.Drawing.Size(542, 305); + this.grpColorInfo.Size = new System.Drawing.Size(544, 305); this.grpColorInfo.TabIndex = 4; this.grpColorInfo.TabStop = false; this.grpColorInfo.Text = "Color Info"; @@ -83,7 +83,7 @@ this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel4.Size = new System.Drawing.Size(536, 286); + this.tableLayoutPanel4.Size = new System.Drawing.Size(538, 286); this.tableLayoutPanel4.TabIndex = 0; // // txtPaletteAddress @@ -138,6 +138,7 @@ this.picColor.Location = new System.Drawing.Point(93, 55); this.picColor.Name = "picColor"; this.picColor.Size = new System.Drawing.Size(66, 66); + this.picColor.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.picColor.TabIndex = 12; this.picColor.TabStop = false; // @@ -167,26 +168,21 @@ this.picPalette.Margin = new System.Windows.Forms.Padding(1); this.picPalette.Name = "picPalette"; this.picPalette.Size = new System.Drawing.Size(130, 258); + this.picPalette.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.picPalette.TabIndex = 0; this.picPalette.TabStop = false; this.picPalette.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picPalette_MouseDown); this.picPalette.MouseMove += new System.Windows.Forms.MouseEventHandler(this.picPalette_MouseMove); // - // lblClickColorHint - // - this.lblClickColorHint.Location = new System.Drawing.Point(27, 0); - this.lblClickColorHint.Name = "lblClickColorHint"; - this.lblClickColorHint.Size = new System.Drawing.Size(92, 32); - this.lblClickColorHint.TabIndex = 5; - this.lblClickColorHint.Text = "Click on a color to change it"; - // // flowLayoutPanel1 // + this.flowLayoutPanel1.AutoSize = true; + this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.flowLayoutPanel1.Controls.Add(this.picHelp); this.flowLayoutPanel1.Controls.Add(this.lblClickColorHint); this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 263); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(128, 31); + this.flowLayoutPanel1.Size = new System.Drawing.Size(122, 42); this.flowLayoutPanel1.TabIndex = 5; // // picHelp @@ -199,6 +195,14 @@ this.picHelp.TabIndex = 9; this.picHelp.TabStop = false; // + // lblClickColorHint + // + this.lblClickColorHint.Location = new System.Drawing.Point(27, 0); + this.lblClickColorHint.Name = "lblClickColorHint"; + this.lblClickColorHint.Size = new System.Drawing.Size(92, 42); + this.lblClickColorHint.TabIndex = 5; + this.lblClickColorHint.Text = "Click on a color to change it"; + // // ctrlPaletteViewer // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -211,6 +215,7 @@ this.tableLayoutPanel4.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.picColor)).EndInit(); this.tableLayoutPanel3.ResumeLayout(false); + this.tableLayoutPanel3.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.picPalette)).EndInit(); this.flowLayoutPanel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.picHelp)).EndInit(); diff --git a/GUI.NET/Debugger/Controls/ctrlPaletteViewer.cs b/GUI.NET/Debugger/Controls/ctrlPaletteViewer.cs index 33fc70a1..1fedfcad 100644 --- a/GUI.NET/Debugger/Controls/ctrlPaletteViewer.cs +++ b/GUI.NET/Debugger/Controls/ctrlPaletteViewer.cs @@ -52,7 +52,7 @@ namespace Mesen.GUI.Debugger.Controls g.DrawImageUnscaled(source, 0, 0); g.ScaleTransform(1f/32, 1f/32); - Font font = new Font(BaseControl.MonospaceFontFamily, BaseControl.DefaultFontSize - 2); + Font font = new Font(BaseControl.MonospaceFontFamily, BaseControl.DefaultFontSize - 2, GraphicsUnit.Pixel); using(Brush bg = new SolidBrush(Color.FromArgb(150, Color.LightGray))) { for(int y = 0; y < 8; y++) { for(int x = 0; x < 4; x++) { @@ -69,8 +69,8 @@ namespace Mesen.GUI.Debugger.Controls private void picPalette_MouseMove(object sender, MouseEventArgs e) { - int tileX = Math.Min(e.X / 32, 31); - int tileY = Math.Min(e.Y / 32, 31); + int tileX = Math.Min(e.X * 128 / picPalette.Width / 32, 31); + int tileY = Math.Min(e.Y * 256 / picPalette.Height / 32, 31); int tileIndex = tileY * 4 + tileX; @@ -95,9 +95,8 @@ namespace Mesen.GUI.Debugger.Controls { using(frmSelectColor frm = new frmSelectColor()) { if(frm.ShowDialog(this) == DialogResult.OK) { - int x = Math.Min(e.X / 32, 31); - int y = Math.Min(e.Y / 32, 31); - + int x = Math.Min(e.X * 128 / picPalette.Width / 32, 31); + int y = Math.Min(e.Y * 256 / picPalette.Height / 32, 31); int colorAddress = y * 4 + x; InteropEmu.DebugSetMemoryValue(DebugMemoryType.PaletteMemory, (uint)colorAddress, (byte)frm.ColorIndex); diff --git a/GUI.NET/Debugger/Controls/ctrlScrollableTextbox.cs b/GUI.NET/Debugger/Controls/ctrlScrollableTextbox.cs index 9a87c8b5..0c3fbf9f 100644 --- a/GUI.NET/Debugger/Controls/ctrlScrollableTextbox.cs +++ b/GUI.NET/Debugger/Controls/ctrlScrollableTextbox.cs @@ -51,10 +51,8 @@ namespace Mesen.GUI.Debugger { InitializeComponent(); - if(Program.IsMono) { - this.panelSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); - this.panelSearch.Location = new System.Drawing.Point(this.Width - this.panelSearch.Width - 20, -1); - } + this.panelSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); + this.panelSearch.Location = new System.Drawing.Point(this.Width - this.panelSearch.Width - 20, -1); this.ctrlTextbox.ShowLineNumbers = true; this.ctrlTextbox.ShowLineInHex = true; @@ -72,9 +70,7 @@ namespace Mesen.GUI.Debugger protected override void OnResize(EventArgs e) { base.OnResize(e); - if(Program.IsMono) { - this.panelSearch.Location = new System.Drawing.Point(this.Width - this.panelSearch.Width - 20, -1); - } + this.panelSearch.Location = new System.Drawing.Point(this.Width - this.panelSearch.Width - 20, -1); } public float FontSize diff --git a/GUI.NET/Debugger/Controls/ctrlSpriteViewer.Designer.cs b/GUI.NET/Debugger/Controls/ctrlSpriteViewer.Designer.cs index 2d76ab66..425e8cbd 100644 --- a/GUI.NET/Debugger/Controls/ctrlSpriteViewer.Designer.cs +++ b/GUI.NET/Debugger/Controls/ctrlSpriteViewer.Designer.cs @@ -84,7 +84,10 @@ // // grpSpriteInfo // + this.grpSpriteInfo.AutoSize = true; + this.grpSpriteInfo.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.grpSpriteInfo.Controls.Add(this.tableLayoutPanel4); + this.grpSpriteInfo.Dock = System.Windows.Forms.DockStyle.Fill; this.grpSpriteInfo.Location = new System.Drawing.Point(263, 3); this.grpSpriteInfo.Name = "grpSpriteInfo"; this.grpSpriteInfo.Size = new System.Drawing.Size(416, 510); @@ -94,11 +97,14 @@ // // tableLayoutPanel4 // - this.tableLayoutPanel4.ColumnCount = 4; + this.tableLayoutPanel4.AutoSize = true; + this.tableLayoutPanel4.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.tableLayoutPanel4.ColumnCount = 5; this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 36.25F)); - this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 38.75F)); - this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel4.Controls.Add(this.lblPalette, 0, 4); this.tableLayoutPanel4.Controls.Add(this.txtSpriteIndex, 1, 0); this.tableLayoutPanel4.Controls.Add(this.lblSpriteIndex, 0, 0); @@ -126,7 +132,6 @@ this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel4.Size = new System.Drawing.Size(410, 491); this.tableLayoutPanel4.TabIndex = 0; // @@ -169,6 +174,7 @@ this.picPreview.Location = new System.Drawing.Point(94, 257); this.picPreview.Name = "picPreview"; this.picPreview.Size = new System.Drawing.Size(258, 231); + this.picPreview.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.picPreview.TabIndex = 21; this.picPreview.TabStop = false; this.picPreview.DoubleClick += new System.EventHandler(this.picSprites_DoubleClick); @@ -182,7 +188,7 @@ this.toolStripMenuItem1, this.mnuCopyHdPack}); this.ctxMenu.Name = "ctxMenu"; - this.ctxMenu.Size = new System.Drawing.Size(233, 76); + this.ctxMenu.Size = new System.Drawing.Size(233, 54); this.ctxMenu.Opening += new System.ComponentModel.CancelEventHandler(this.ctxMenu_Opening); // // mnuShowInChrViewer @@ -233,6 +239,7 @@ this.picTile.Location = new System.Drawing.Point(94, 81); this.picTile.Name = "picTile"; this.picTile.Size = new System.Drawing.Size(66, 130); + this.picTile.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.picTile.TabIndex = 12; this.picTile.TabStop = false; // @@ -252,7 +259,7 @@ this.txtPosition.Location = new System.Drawing.Point(94, 55); this.txtPosition.Name = "txtPosition"; this.txtPosition.ReadOnly = true; - this.txtPosition.Size = new System.Drawing.Size(66, 20); + this.txtPosition.Size = new System.Drawing.Size(53, 20); this.txtPosition.TabIndex = 18; // // lblTileIndex @@ -278,7 +285,7 @@ // this.lblPaletteAddr.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblPaletteAddr.AutoSize = true; - this.lblPaletteAddr.Location = new System.Drawing.Point(209, 6); + this.lblPaletteAddr.Location = new System.Drawing.Point(166, 6); this.lblPaletteAddr.Name = "lblPaletteAddr"; this.lblPaletteAddr.Size = new System.Drawing.Size(84, 13); this.lblPaletteAddr.TabIndex = 15; @@ -288,7 +295,7 @@ // this.lblTileAddress.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblTileAddress.AutoSize = true; - this.lblTileAddress.Location = new System.Drawing.Point(209, 32); + this.lblTileAddress.Location = new System.Drawing.Point(166, 32); this.lblTileAddress.Name = "lblTileAddress"; this.lblTileAddress.Size = new System.Drawing.Size(68, 13); this.lblTileAddress.TabIndex = 1; @@ -297,7 +304,7 @@ // txtPaletteAddress // this.txtPaletteAddress.BackColor = System.Drawing.SystemColors.Window; - this.txtPaletteAddress.Location = new System.Drawing.Point(332, 3); + this.txtPaletteAddress.Location = new System.Drawing.Point(256, 3); this.txtPaletteAddress.Name = "txtPaletteAddress"; this.txtPaletteAddress.ReadOnly = true; this.txtPaletteAddress.Size = new System.Drawing.Size(42, 20); @@ -306,7 +313,7 @@ // txtTileAddress // this.txtTileAddress.BackColor = System.Drawing.SystemColors.Window; - this.txtTileAddress.Location = new System.Drawing.Point(332, 29); + this.txtTileAddress.Location = new System.Drawing.Point(256, 29); this.txtTileAddress.Name = "txtTileAddress"; this.txtTileAddress.ReadOnly = true; this.txtTileAddress.Size = new System.Drawing.Size(42, 20); @@ -314,13 +321,15 @@ // // tableLayoutPanel1 // + this.tableLayoutPanel1.AutoSize = true; + this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.tableLayoutPanel1.ColumnCount = 1; this.tableLayoutPanel4.SetColumnSpan(this.tableLayoutPanel1, 2); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.Controls.Add(this.chkHorizontalMirroring, 0, 0); this.tableLayoutPanel1.Controls.Add(this.chkVerticalMirroring, 0, 1); this.tableLayoutPanel1.Controls.Add(this.chkBackgroundPriority, 0, 2); - this.tableLayoutPanel1.Location = new System.Drawing.Point(206, 52); + this.tableLayoutPanel1.Location = new System.Drawing.Point(163, 52); this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(3); @@ -329,7 +338,7 @@ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.Size = new System.Drawing.Size(200, 82); + this.tableLayoutPanel1.Size = new System.Drawing.Size(130, 75); this.tableLayoutPanel1.TabIndex = 24; // // chkHorizontalMirroring @@ -384,6 +393,7 @@ this.picSprites.Margin = new System.Windows.Forms.Padding(1); this.picSprites.Name = "picSprites"; this.picSprites.Size = new System.Drawing.Size(258, 514); + this.picSprites.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.picSprites.TabIndex = 0; this.picSprites.TabStop = false; this.picSprites.DoubleClick += new System.EventHandler(this.picSprites_DoubleClick); @@ -398,7 +408,9 @@ this.Name = "ctrlSpriteViewer"; this.Size = new System.Drawing.Size(682, 516); this.tableLayoutPanel3.ResumeLayout(false); + this.tableLayoutPanel3.PerformLayout(); this.grpSpriteInfo.ResumeLayout(false); + this.grpSpriteInfo.PerformLayout(); this.tableLayoutPanel4.ResumeLayout(false); this.tableLayoutPanel4.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.picPreview)).EndInit(); diff --git a/GUI.NET/Debugger/Controls/ctrlSpriteViewer.cs b/GUI.NET/Debugger/Controls/ctrlSpriteViewer.cs index f1e7ef3e..71c1709a 100644 --- a/GUI.NET/Debugger/Controls/ctrlSpriteViewer.cs +++ b/GUI.NET/Debugger/Controls/ctrlSpriteViewer.cs @@ -119,8 +119,8 @@ namespace Mesen.GUI.Debugger.Controls { _previewMousePosition = null; - int tileX = Math.Min(e.X / 32, 31); - int tileY = Math.Min(e.Y / 64, 63); + int tileX = Math.Min(e.X * 256 / picSprites.Width / 32, 31); + int tileY = Math.Min(e.Y * 512 / picSprites.Height / 64, 63); int ramAddr = ((tileY << 3) + tileX) << 2; if(ramAddr / 4 == _selectedSprite && !_forceRefresh) { @@ -244,6 +244,8 @@ namespace Mesen.GUI.Debugger.Controls private void SelectSpriteUnderCursor() { Point p = _previewMousePosition.Value; + int xPos = p.X * 256 / picPreview.Width; + int yPos = p.Y * 240 / picPreview.Height; int prevSprite = _selectedSprite; _selectedSprite = -1; for(int i = 0x100 - 4; i >= 0; i-=4) { @@ -252,7 +254,7 @@ namespace Mesen.GUI.Debugger.Controls int attributes = _spriteRam[i + 2]; int spriteX = _spriteRam[i + 3]; - if(p.X >= spriteX && p.X < spriteX + 8 && p.Y >= spriteY && p.Y < spriteY + (_largeSprites ? 16 : 8)) { + if(xPos >= spriteX && xPos < spriteX + 8 && yPos >= spriteY && yPos < spriteY + (_largeSprites ? 16 : 8)) { _selectedSprite = i / 4; break; } diff --git a/GUI.NET/Debugger/Controls/ctrlTilePalette.Designer.cs b/GUI.NET/Debugger/Controls/ctrlTilePalette.Designer.cs index 0732d010..f488aa48 100644 --- a/GUI.NET/Debugger/Controls/ctrlTilePalette.Designer.cs +++ b/GUI.NET/Debugger/Controls/ctrlTilePalette.Designer.cs @@ -38,6 +38,7 @@ this.picPaletteSelection.Location = new System.Drawing.Point(0, 0); this.picPaletteSelection.Name = "picPaletteSelection"; this.picPaletteSelection.Size = new System.Drawing.Size(130, 34); + this.picPaletteSelection.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.picPaletteSelection.TabIndex = 14; this.picPaletteSelection.TabStop = false; this.picPaletteSelection.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picPaletteSelection_MouseDown); diff --git a/GUI.NET/Debugger/Controls/ctrlTilePalette.cs b/GUI.NET/Debugger/Controls/ctrlTilePalette.cs index 3d6af522..af71c1d9 100644 --- a/GUI.NET/Debugger/Controls/ctrlTilePalette.cs +++ b/GUI.NET/Debugger/Controls/ctrlTilePalette.cs @@ -101,7 +101,7 @@ namespace Mesen.GUI.Debugger.Controls g.ResetTransform(); - using(Font font = new Font(BaseControl.MonospaceFontFamily, 10)) { + using(Font font = new Font(BaseControl.MonospaceFontFamily, 10, GraphicsUnit.Pixel)) { using(Brush bg = new SolidBrush(Color.FromArgb(150, Color.LightGray))) { for(int i = 0; i < 4; i++) { if(this.DisplayIndexes) { @@ -131,13 +131,13 @@ namespace Mesen.GUI.Debugger.Controls private void picPaletteSelection_MouseMove(object sender, MouseEventArgs e) { - _hoverColor = e.X / 32; + _hoverColor = e.X * 128 / this.Width / 32; RefreshPalette(); } private void picPaletteSelection_MouseDown(object sender, MouseEventArgs e) { - this.SelectedColor = e.X / 32; + this.SelectedColor = e.X * 128 / this.Width / 32; RefreshPalette(); } diff --git a/GUI.NET/Debugger/ctrlPaletteDisplay.cs b/GUI.NET/Debugger/ctrlPaletteDisplay.cs index e2bc1e0b..f9dc48ae 100644 --- a/GUI.NET/Debugger/ctrlPaletteDisplay.cs +++ b/GUI.NET/Debugger/ctrlPaletteDisplay.cs @@ -66,14 +66,15 @@ namespace Mesen.GUI.Debugger GCHandle handle = GCHandle.Alloc(this.PaletteData, GCHandleType.Pinned); try { Bitmap source = new Bitmap(16, 4, 16*4, System.Drawing.Imaging.PixelFormat.Format32bppArgb, handle.AddrOfPinnedObject()); - Bitmap target = new Bitmap(336, 336); + Bitmap target = new Bitmap(picPalette.Width - 2, picPalette.Height - 2); - Font font = new Font(BaseControl.MonospaceFontFamily, BaseControl.DefaultFontSize - 2); + Font font = new Font(BaseControl.MonospaceFontFamily, BaseControl.DefaultFontSize - 2, GraphicsUnit.Pixel); using(Graphics g = Graphics.FromImage(target)) { g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor; g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.None; g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.Half; g.ScaleTransform(42, 42); + g.ScaleTransform((float)picPalette.Width / 336, (float)picPalette.Height / 336); g.DrawImageUnscaled(source, 0, 0); g.DrawImageUnscaled(source, -8, 4); @@ -100,10 +101,13 @@ namespace Mesen.GUI.Debugger private void picPalette_MouseDown(object sender, MouseEventArgs e) { - int y = e.Y / 42 < 4 ? e.Y : (e.Y - 168); - int x = e.Y / 42 < 4 ? e.X : (e.X + 336); + float xPos = (float)e.X / picPalette.Image.Width; + float yPos = (float)e.Y / picPalette.Image.Height; - int offset = (x / 42) + (y / 42 * 16); + float y = yPos < 0.5 ? yPos : (yPos - 0.5f); + float x = yPos < 0.5 ? xPos : (xPos + 1); + + int offset = (int)(x * 8) + (int)(y * 8) * 16; ColorClick?.Invoke(offset); } diff --git a/GUI.NET/Debugger/frmBreakIn.Designer.cs b/GUI.NET/Debugger/frmBreakIn.Designer.cs index 9940c29c..f095ab4f 100644 --- a/GUI.NET/Debugger/frmBreakIn.Designer.cs +++ b/GUI.NET/Debugger/frmBreakIn.Designer.cs @@ -1,4 +1,6 @@ -namespace Mesen.GUI.Debugger +using Mesen.GUI.Controls; + +namespace Mesen.GUI.Debugger { partial class frmBreakIn { @@ -32,10 +34,9 @@ this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); this.radCpuInstructions = new System.Windows.Forms.RadioButton(); this.radPpuCycles = new System.Windows.Forms.RadioButton(); - this.nudCount = new System.Windows.Forms.NumericUpDown(); + this.nudCount = new MesenNumericUpDown(); this.tableLayoutPanel1.SuspendLayout(); this.flowLayoutPanel2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudCount)).BeginInit(); this.SuspendLayout(); // // baseConfigPanel @@ -142,7 +143,6 @@ this.tableLayoutPanel1.PerformLayout(); this.flowLayoutPanel2.ResumeLayout(false); this.flowLayoutPanel2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudCount)).EndInit(); this.ResumeLayout(false); } @@ -154,6 +154,6 @@ private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; private System.Windows.Forms.RadioButton radCpuInstructions; private System.Windows.Forms.RadioButton radPpuCycles; - private System.Windows.Forms.NumericUpDown nudCount; + private MesenNumericUpDown nudCount; } } \ No newline at end of file diff --git a/GUI.NET/Debugger/frmDebugger.Designer.cs b/GUI.NET/Debugger/frmDebugger.Designer.cs index c7f343fa..7bcab912 100644 --- a/GUI.NET/Debugger/frmDebugger.Designer.cs +++ b/GUI.NET/Debugger/frmDebugger.Designer.cs @@ -225,7 +225,7 @@ namespace Mesen.GUI.Debugger this.ctrlSplitContainerTop.Panel2.Controls.Add(this.tlpFunctionLabelLists); this.ctrlSplitContainerTop.Panel2MinSize = 150; this.ctrlSplitContainerTop.Size = new System.Drawing.Size(1172, 400); - this.ctrlSplitContainerTop.SplitterDistance = 878; + this.ctrlSplitContainerTop.SplitterDistance = 875; this.ctrlSplitContainerTop.SplitterWidth = 7; this.ctrlSplitContainerTop.TabIndex = 3; this.ctrlSplitContainerTop.PanelCollapsed += new System.EventHandler(this.ctrlSplitContainerTop_PanelCollapsed); @@ -246,7 +246,7 @@ namespace Mesen.GUI.Debugger 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(878, 400); + this.tlpTop.Size = new System.Drawing.Size(875, 400); this.tlpTop.TabIndex = 2; // // ctrlDebuggerCode @@ -255,7 +255,7 @@ namespace Mesen.GUI.Debugger this.ctrlDebuggerCode.Dock = System.Windows.Forms.DockStyle.Fill; this.ctrlDebuggerCode.Location = new System.Drawing.Point(3, 3); this.ctrlDebuggerCode.Name = "ctrlDebuggerCode"; - this.ctrlDebuggerCode.Size = new System.Drawing.Size(414, 394); + this.ctrlDebuggerCode.Size = new System.Drawing.Size(411, 394); this.ctrlDebuggerCode.TabIndex = 2; this.ctrlDebuggerCode.OnEditCode += new Mesen.GUI.Debugger.ctrlDebuggerCode.AssemblerEventHandler(this.ctrlDebuggerCode_OnEditCode); this.ctrlDebuggerCode.OnSetNextStatement += new Mesen.GUI.Debugger.ctrlDebuggerCode.AddressEventHandler(this.ctrlDebuggerCode_OnSetNextStatement); @@ -264,7 +264,7 @@ namespace Mesen.GUI.Debugger // ctrlConsoleStatus // this.ctrlConsoleStatus.Dock = System.Windows.Forms.DockStyle.Fill; - this.ctrlConsoleStatus.Location = new System.Drawing.Point(420, 0); + this.ctrlConsoleStatus.Location = new System.Drawing.Point(417, 0); this.ctrlConsoleStatus.Margin = new System.Windows.Forms.Padding(0); this.ctrlConsoleStatus.Name = "ctrlConsoleStatus"; this.ctrlConsoleStatus.Size = new System.Drawing.Size(458, 400); @@ -275,7 +275,7 @@ namespace Mesen.GUI.Debugger // this.ctrlDebuggerCodeSplit.Code = null; this.ctrlDebuggerCodeSplit.Dock = System.Windows.Forms.DockStyle.Fill; - this.ctrlDebuggerCodeSplit.Location = new System.Drawing.Point(423, 3); + this.ctrlDebuggerCodeSplit.Location = new System.Drawing.Point(420, 3); this.ctrlDebuggerCodeSplit.Name = "ctrlDebuggerCodeSplit"; this.ctrlDebuggerCodeSplit.Size = new System.Drawing.Size(1, 394); this.ctrlDebuggerCodeSplit.TabIndex = 4; @@ -297,7 +297,7 @@ 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(287, 400); + this.tlpFunctionLabelLists.Size = new System.Drawing.Size(290, 400); this.tlpFunctionLabelLists.TabIndex = 5; // // grpLabels @@ -306,7 +306,7 @@ namespace Mesen.GUI.Debugger this.grpLabels.Dock = System.Windows.Forms.DockStyle.Fill; this.grpLabels.Location = new System.Drawing.Point(3, 203); this.grpLabels.Name = "grpLabels"; - this.grpLabels.Size = new System.Drawing.Size(281, 194); + this.grpLabels.Size = new System.Drawing.Size(284, 194); this.grpLabels.TabIndex = 6; this.grpLabels.TabStop = false; this.grpLabels.Text = "Labels"; @@ -316,7 +316,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(275, 175); + this.ctrlLabelList.Size = new System.Drawing.Size(278, 175); this.ctrlLabelList.TabIndex = 0; this.ctrlLabelList.OnFindOccurrence += new System.EventHandler(this.ctrlLabelList_OnFindOccurrence); this.ctrlLabelList.OnLabelSelected += new System.EventHandler(this.ctrlLabelList_OnLabelSelected); @@ -327,7 +327,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(281, 194); + this.grpFunctions.Size = new System.Drawing.Size(284, 194); this.grpFunctions.TabIndex = 5; this.grpFunctions.TabStop = false; this.grpFunctions.Text = "Functions"; @@ -337,7 +337,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(275, 175); + this.ctrlFunctionList.Size = new System.Drawing.Size(278, 175); this.ctrlFunctionList.TabIndex = 0; this.ctrlFunctionList.OnFindOccurrence += new System.EventHandler(this.ctrlFunctionList_OnFindOccurrence); this.ctrlFunctionList.OnFunctionSelected += new System.EventHandler(this.ctrlFunctionList_OnFunctionSelected); @@ -379,7 +379,7 @@ namespace Mesen.GUI.Debugger this.picWatchHelp.Location = new System.Drawing.Point(43, 0); this.picWatchHelp.Name = "picWatchHelp"; this.picWatchHelp.Size = new System.Drawing.Size(14, 14); - this.picWatchHelp.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.picWatchHelp.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.picWatchHelp.TabIndex = 1; this.picWatchHelp.TabStop = false; // diff --git a/GUI.NET/Debugger/frmDebugger.cs b/GUI.NET/Debugger/frmDebugger.cs index 26e35a3d..1601d531 100644 --- a/GUI.NET/Debugger/frmDebugger.cs +++ b/GUI.NET/Debugger/frmDebugger.cs @@ -24,6 +24,7 @@ namespace Mesen.GUI.Debugger private InteropEmu.NotificationListener _notifListener; private ctrlDebuggerCode _lastCodeWindow; + private Size _minimumSize; public frmDebugger() { @@ -33,6 +34,8 @@ namespace Mesen.GUI.Debugger protected override void OnLoad(EventArgs e) { base.OnLoad(e); + + _minimumSize = this.MinimumSize; if(Program.IsMono) { //This doesn't work in Mono (menu is blank) - hide it for now @@ -283,11 +286,11 @@ namespace Mesen.GUI.Debugger tlpTop.ColumnStyles[1].SizeType = SizeType.Percent; tlpTop.ColumnStyles[0].Width = 50f; tlpTop.ColumnStyles[1].Width = 50f; - this.MinimumSize = new Size(1250, 725); + this.MinimumSize = new Size(_minimumSize.Width + 250, _minimumSize.Height); } else { tlpTop.ColumnStyles[1].SizeType = SizeType.Absolute; tlpTop.ColumnStyles[1].Width = 0f; - this.MinimumSize = new Size(1000, 725); + this.MinimumSize = _minimumSize; } ctrlDebuggerCodeSplit.Visible = mnuSplitView.Checked; return mnuSplitView.Checked; diff --git a/GUI.NET/Debugger/frmEditLabel.Designer.cs b/GUI.NET/Debugger/frmEditLabel.Designer.cs index 331f8200..5093df6a 100644 --- a/GUI.NET/Debugger/frmEditLabel.Designer.cs +++ b/GUI.NET/Debugger/frmEditLabel.Designer.cs @@ -36,8 +36,8 @@ this.lblAddress = new System.Windows.Forms.Label(); this.cboRegion = new System.Windows.Forms.ComboBox(); this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); - this.txtAddress = new System.Windows.Forms.TextBox(); this.lblAddressSign = new System.Windows.Forms.Label(); + this.txtAddress = new System.Windows.Forms.TextBox(); this.tableLayoutPanel1.SuspendLayout(); this.flowLayoutPanel2.SuspendLayout(); this.SuspendLayout(); @@ -51,9 +51,9 @@ this.tableLayoutPanel1.ColumnCount = 2; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.Controls.Add(this.txtComment, 1, 3); this.tableLayoutPanel1.Controls.Add(this.lblLabel, 0, 2); this.tableLayoutPanel1.Controls.Add(this.lblComment, 0, 3); + this.tableLayoutPanel1.Controls.Add(this.txtComment, 1, 3); this.tableLayoutPanel1.Controls.Add(this.txtLabel, 1, 2); this.tableLayoutPanel1.Controls.Add(this.lblRegion, 0, 0); this.tableLayoutPanel1.Controls.Add(this.lblAddress, 0, 1); @@ -66,7 +66,7 @@ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - 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(377, 233); this.tableLayoutPanel1.TabIndex = 2; // @@ -142,11 +142,22 @@ this.flowLayoutPanel2.Controls.Add(this.lblAddressSign); this.flowLayoutPanel2.Controls.Add(this.txtAddress); this.flowLayoutPanel2.Location = new System.Drawing.Point(60, 27); - this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0); + this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0); this.flowLayoutPanel2.Name = "flowLayoutPanel2"; this.flowLayoutPanel2.Size = new System.Drawing.Size(200, 26); this.flowLayoutPanel2.TabIndex = 7; // + // lblAddressSign + // + this.lblAddressSign.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblAddressSign.AutoSize = true; + this.lblAddressSign.Location = new System.Drawing.Point(0, 6); + this.lblAddressSign.Margin = new System.Windows.Forms.Padding(0); + this.lblAddressSign.Name = "lblAddressSign"; + this.lblAddressSign.Size = new System.Drawing.Size(13, 13); + this.lblAddressSign.TabIndex = 9; + this.lblAddressSign.Text = "$"; + // // txtAddress // this.txtAddress.Location = new System.Drawing.Point(13, 3); @@ -155,17 +166,6 @@ this.txtAddress.Size = new System.Drawing.Size(57, 20); this.txtAddress.TabIndex = 8; // - // lblAddressSign - // - this.lblAddressSign.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lblAddressSign.AutoSize = true; - this.lblAddressSign.Location = new System.Drawing.Point(0, 6); - this.lblAddressSign.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0); - this.lblAddressSign.Name = "lblAddressSign"; - this.lblAddressSign.Size = new System.Drawing.Size(13, 13); - this.lblAddressSign.TabIndex = 9; - this.lblAddressSign.Text = "$"; - // // frmEditLabel // this.AcceptButton = null; diff --git a/GUI.NET/Debugger/frmFadeSpeed.Designer.cs b/GUI.NET/Debugger/frmFadeSpeed.Designer.cs index 8f8efa7b..60f5a9ec 100644 --- a/GUI.NET/Debugger/frmFadeSpeed.Designer.cs +++ b/GUI.NET/Debugger/frmFadeSpeed.Designer.cs @@ -1,4 +1,6 @@ -namespace Mesen.GUI.Debugger +using Mesen.GUI.Controls; + +namespace Mesen.GUI.Debugger { partial class frmFadeSpeed { @@ -30,9 +32,8 @@ this.lblAddress = new System.Windows.Forms.Label(); this.lblFrames = new System.Windows.Forms.Label(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.nudFrameCount = new System.Windows.Forms.NumericUpDown(); + this.nudFrameCount = new MesenNumericUpDown(); this.tableLayoutPanel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudFrameCount)).BeginInit(); this.SuspendLayout(); // // baseConfigPanel @@ -110,7 +111,6 @@ this.Controls.SetChildIndex(this.baseConfigPanel, 0); this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudFrameCount)).EndInit(); this.ResumeLayout(false); } @@ -120,6 +120,6 @@ private System.Windows.Forms.Label lblAddress; private System.Windows.Forms.Label lblFrames; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private System.Windows.Forms.NumericUpDown nudFrameCount; + private MesenNumericUpDown nudFrameCount; } } \ No newline at end of file diff --git a/GUI.NET/Debugger/frmMemoryViewer.Designer.cs b/GUI.NET/Debugger/frmMemoryViewer.Designer.cs index e8f129de..a4fce66a 100644 --- a/GUI.NET/Debugger/frmMemoryViewer.Designer.cs +++ b/GUI.NET/Debugger/frmMemoryViewer.Designer.cs @@ -87,6 +87,7 @@ this.tpgProfiler = new System.Windows.Forms.TabPage(); this.ctrlProfiler = new Mesen.GUI.Debugger.Controls.ctrlProfiler(); this.tmrRefresh = new System.Windows.Forms.Timer(this.components); + this.panel1 = new System.Windows.Forms.Panel(); this.flowLayoutPanel1.SuspendLayout(); this.menuStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout(); @@ -94,14 +95,15 @@ this.tpgMemoryViewer.SuspendLayout(); this.tpgAccessCounters.SuspendLayout(); this.tpgProfiler.SuspendLayout(); + this.panel1.SuspendLayout(); this.SuspendLayout(); // // ctrlHexViewer // this.ctrlHexViewer.Dock = System.Windows.Forms.DockStyle.Fill; - this.ctrlHexViewer.Location = new System.Drawing.Point(3, 28); + this.ctrlHexViewer.Location = new System.Drawing.Point(0, 0); this.ctrlHexViewer.Name = "ctrlHexViewer"; - this.ctrlHexViewer.Size = new System.Drawing.Size(665, 346); + this.ctrlHexViewer.Size = new System.Drawing.Size(671, 352); this.ctrlHexViewer.TabIndex = 0; this.ctrlHexViewer.RequiredWidthChanged += new System.EventHandler(this.ctrlHexViewer_RequiredWidthChanged); this.ctrlHexViewer.InitializeContextMenu += new System.EventHandler(this.ctrlHexViewer_InitializeContextMenu); @@ -109,12 +111,16 @@ // // flowLayoutPanel1 // + this.flowLayoutPanel1.AutoSize = true; + this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.flowLayoutPanel1.Controls.Add(this.lblViewMemoryType); this.flowLayoutPanel1.Controls.Add(this.cboMemoryType); - this.flowLayoutPanel1.Location = new System.Drawing.Point(6, 27); + this.flowLayoutPanel1.Location = new System.Drawing.Point(5, 0); + this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(167, 27); + this.flowLayoutPanel1.Size = new System.Drawing.Size(166, 27); this.flowLayoutPanel1.TabIndex = 1; + this.flowLayoutPanel1.WrapContents = false; // // lblViewMemoryType // @@ -255,7 +261,7 @@ // this.mnuHightlightReads.CheckOnClick = true; this.mnuHightlightReads.Name = "mnuHightlightReads"; - this.mnuHightlightReads.Size = new System.Drawing.Size(152, 22); + this.mnuHightlightReads.Size = new System.Drawing.Size(133, 22); this.mnuHightlightReads.Text = "Reads"; this.mnuHightlightReads.Click += new System.EventHandler(this.mnuColorProviderOptions_Click); // @@ -263,7 +269,7 @@ // this.mnuHighlightWrites.CheckOnClick = true; this.mnuHighlightWrites.Name = "mnuHighlightWrites"; - this.mnuHighlightWrites.Size = new System.Drawing.Size(152, 22); + this.mnuHighlightWrites.Size = new System.Drawing.Size(133, 22); this.mnuHighlightWrites.Text = "Writes"; this.mnuHighlightWrites.Click += new System.EventHandler(this.mnuColorProviderOptions_Click); // @@ -271,14 +277,14 @@ // this.mnuHighlightExecution.CheckOnClick = true; this.mnuHighlightExecution.Name = "mnuHighlightExecution"; - this.mnuHighlightExecution.Size = new System.Drawing.Size(152, 22); + this.mnuHighlightExecution.Size = new System.Drawing.Size(133, 22); this.mnuHighlightExecution.Text = "Execution"; this.mnuHighlightExecution.Click += new System.EventHandler(this.mnuColorProviderOptions_Click); // // toolStripMenuItem6 // this.toolStripMenuItem6.Name = "toolStripMenuItem6"; - this.toolStripMenuItem6.Size = new System.Drawing.Size(149, 6); + this.toolStripMenuItem6.Size = new System.Drawing.Size(130, 6); // // fadeSpeedToolStripMenuItem // @@ -290,7 +296,7 @@ this.toolStripMenuItem7, this.mnuCustomFadeSpeed}); this.fadeSpeedToolStripMenuItem.Name = "fadeSpeedToolStripMenuItem"; - this.fadeSpeedToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.fadeSpeedToolStripMenuItem.Size = new System.Drawing.Size(133, 22); this.fadeSpeedToolStripMenuItem.Text = "Fade speed"; // // mnuFadeSlow @@ -505,9 +511,9 @@ this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.btnImport, this.btnExport}); - this.toolStrip1.Location = new System.Drawing.Point(3, 3); + this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.Size = new System.Drawing.Size(665, 25); + this.toolStrip1.Size = new System.Drawing.Size(671, 25); this.toolStrip1.TabIndex = 3; this.toolStrip1.Text = "toolStrip1"; // @@ -544,12 +550,10 @@ // // tpgMemoryViewer // - this.tpgMemoryViewer.Controls.Add(this.flowLayoutPanel1); - this.tpgMemoryViewer.Controls.Add(this.ctrlHexViewer); + this.tpgMemoryViewer.Controls.Add(this.panel1); this.tpgMemoryViewer.Controls.Add(this.toolStrip1); this.tpgMemoryViewer.Location = new System.Drawing.Point(4, 22); this.tpgMemoryViewer.Name = "tpgMemoryViewer"; - this.tpgMemoryViewer.Padding = new System.Windows.Forms.Padding(3); this.tpgMemoryViewer.Size = new System.Drawing.Size(671, 377); this.tpgMemoryViewer.TabIndex = 0; this.tpgMemoryViewer.Text = "Memory Viewer"; @@ -560,7 +564,6 @@ this.tpgAccessCounters.Controls.Add(this.ctrlMemoryAccessCounters); this.tpgAccessCounters.Location = new System.Drawing.Point(4, 22); this.tpgAccessCounters.Name = "tpgAccessCounters"; - this.tpgAccessCounters.Padding = new System.Windows.Forms.Padding(3); this.tpgAccessCounters.Size = new System.Drawing.Size(671, 377); this.tpgAccessCounters.TabIndex = 1; this.tpgAccessCounters.Text = "Access Counters"; @@ -569,9 +572,10 @@ // ctrlMemoryAccessCounters // this.ctrlMemoryAccessCounters.Dock = System.Windows.Forms.DockStyle.Fill; - this.ctrlMemoryAccessCounters.Location = new System.Drawing.Point(3, 3); + this.ctrlMemoryAccessCounters.Location = new System.Drawing.Point(0, 0); + this.ctrlMemoryAccessCounters.Margin = new System.Windows.Forms.Padding(0); this.ctrlMemoryAccessCounters.Name = "ctrlMemoryAccessCounters"; - this.ctrlMemoryAccessCounters.Size = new System.Drawing.Size(665, 371); + this.ctrlMemoryAccessCounters.Size = new System.Drawing.Size(671, 377); this.ctrlMemoryAccessCounters.TabIndex = 0; // // tpgProfiler @@ -597,6 +601,16 @@ this.tmrRefresh.Enabled = true; this.tmrRefresh.Tick += new System.EventHandler(this.tmrRefresh_Tick); // + // panel1 + // + this.panel1.Controls.Add(this.flowLayoutPanel1); + this.panel1.Controls.Add(this.ctrlHexViewer); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 25); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(671, 352); + this.panel1.TabIndex = 4; + // // frmMemoryViewer // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -619,6 +633,8 @@ this.tpgMemoryViewer.PerformLayout(); this.tpgAccessCounters.ResumeLayout(false); this.tpgProfiler.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -681,5 +697,6 @@ private System.Windows.Forms.ToolStripMenuItem mnuHideWrittenBytes; private System.Windows.Forms.ToolStripMenuItem mnuHideExecutedBytes; private System.Windows.Forms.ToolStripMenuItem mnuFadeNever; + private System.Windows.Forms.Panel panel1; } } \ No newline at end of file diff --git a/GUI.NET/Debugger/frmPpuViewer.Designer.cs b/GUI.NET/Debugger/frmPpuViewer.Designer.cs index 3b011c79..151fdd13 100644 --- a/GUI.NET/Debugger/frmPpuViewer.Designer.cs +++ b/GUI.NET/Debugger/frmPpuViewer.Designer.cs @@ -1,4 +1,6 @@ -namespace Mesen.GUI.Debugger +using Mesen.GUI.Controls; + +namespace Mesen.GUI.Debugger { partial class frmPpuViewer { @@ -49,9 +51,9 @@ this.ctrlPaletteViewer = new Mesen.GUI.Debugger.Controls.ctrlPaletteViewer(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.lblShowFrameAt = new System.Windows.Forms.Label(); - this.nudScanline = new System.Windows.Forms.NumericUpDown(); + this.nudScanline = new MesenNumericUpDown(); this.lblCycle = new System.Windows.Forms.Label(); - this.nudCycle = new System.Windows.Forms.NumericUpDown(); + this.nudCycle = new MesenNumericUpDown(); this.btnReset = new System.Windows.Forms.Button(); this.menuStrip1.SuspendLayout(); this.tabMain.SuspendLayout(); @@ -60,8 +62,6 @@ this.tpgSpriteViewer.SuspendLayout(); this.tpgPaletteViewer.SuspendLayout(); this.flowLayoutPanel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudScanline)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudCycle)).BeginInit(); this.SuspendLayout(); // // menuStrip1 @@ -320,8 +320,6 @@ this.tpgPaletteViewer.ResumeLayout(false); this.flowLayoutPanel1.ResumeLayout(false); this.flowLayoutPanel1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudScanline)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudCycle)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -347,9 +345,9 @@ private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; private System.Windows.Forms.Label lblShowFrameAt; - private System.Windows.Forms.NumericUpDown nudScanline; + private MesenNumericUpDown nudScanline; private System.Windows.Forms.Label lblCycle; - private System.Windows.Forms.NumericUpDown nudCycle; + private MesenNumericUpDown nudCycle; private System.Windows.Forms.Button btnReset; } } \ No newline at end of file diff --git a/GUI.NET/Forms/BaseForm.cs b/GUI.NET/Forms/BaseForm.cs index 1761f156..9000435f 100644 --- a/GUI.NET/Forms/BaseForm.cs +++ b/GUI.NET/Forms/BaseForm.cs @@ -120,28 +120,6 @@ namespace Mesen.GUI.Forms } } - public new SizeF AutoScaleDimensions - { - set - { - if(!Program.IsMono) { - base.AutoScaleDimensions = value; - } - } - } - - public new AutoScaleMode AutoScaleMode - { - set - { - if(Program.IsMono) { - base.AutoScaleMode = AutoScaleMode.None; - } else { - base.AutoScaleMode = value; - } - } - } - private void InitializeComponent() { this.components = new System.ComponentModel.Container(); diff --git a/GUI.NET/Forms/Cheats/ctrlCheatFinder.Designer.cs b/GUI.NET/Forms/Cheats/ctrlCheatFinder.Designer.cs index 1af01367..35a5b440 100644 --- a/GUI.NET/Forms/Cheats/ctrlCheatFinder.Designer.cs +++ b/GUI.NET/Forms/Cheats/ctrlCheatFinder.Designer.cs @@ -1,4 +1,6 @@ -namespace Mesen.GUI.Forms.Cheats +using Mesen.GUI.Controls; + +namespace Mesen.GUI.Forms.Cheats { partial class ctrlCheatFinder { @@ -38,7 +40,7 @@ this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel(); this.lblCurrentValue = new System.Windows.Forms.Label(); this.cboCurrentFilterType = new System.Windows.Forms.ComboBox(); - this.nudCurrentFilterValue = new System.Windows.Forms.NumericUpDown(); + this.nudCurrentFilterValue = new Mesen.GUI.Controls.MesenNumericUpDown(); this.btnAddCurrentFilter = new System.Windows.Forms.Button(); this.btnReset = new System.Windows.Forms.Button(); this.btnUndo = new System.Windows.Forms.Button(); @@ -55,7 +57,6 @@ this.tableLayoutPanel2.SuspendLayout(); this.flowLayoutPanel1.SuspendLayout(); this.flowLayoutPanel4.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudCurrentFilterValue)).BeginInit(); this.tableLayoutPanel1.SuspendLayout(); this.contextMenuStrip.SuspendLayout(); this.flowLayoutPanel2.SuspendLayout(); @@ -63,7 +64,6 @@ // // tmrRefresh // - this.tmrRefresh.Enabled = false; this.tmrRefresh.Tick += new System.EventHandler(this.tmrRefresh_Tick); // // grpFilters @@ -178,8 +178,9 @@ // // nudCurrentFilterValue // - this.nudCurrentFilterValue.Location = new System.Drawing.Point(205, 5); - this.nudCurrentFilterValue.Margin = new System.Windows.Forms.Padding(3, 5, 3, 3); + this.nudCurrentFilterValue.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.nudCurrentFilterValue.Location = new System.Drawing.Point(202, 4); + this.nudCurrentFilterValue.Margin = new System.Windows.Forms.Padding(0); this.nudCurrentFilterValue.Maximum = new decimal(new int[] { 255, 0, @@ -192,7 +193,7 @@ // btnAddCurrentFilter // this.btnAddCurrentFilter.AutoSize = true; - this.btnAddCurrentFilter.Location = new System.Drawing.Point(252, 3); + this.btnAddCurrentFilter.Location = new System.Drawing.Point(246, 3); this.btnAddCurrentFilter.Name = "btnAddCurrentFilter"; this.btnAddCurrentFilter.Size = new System.Drawing.Size(75, 23); this.btnAddCurrentFilter.TabIndex = 2; @@ -329,7 +330,6 @@ this.flowLayoutPanel1.PerformLayout(); this.flowLayoutPanel4.ResumeLayout(false); this.flowLayoutPanel4.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudCurrentFilterValue)).EndInit(); this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.PerformLayout(); this.contextMenuStrip.ResumeLayout(false); @@ -352,7 +352,7 @@ private System.Windows.Forms.Button btnAddPrevFilter; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel4; private System.Windows.Forms.ComboBox cboCurrentFilterType; - private System.Windows.Forms.NumericUpDown nudCurrentFilterValue; + private MesenNumericUpDown nudCurrentFilterValue; private System.Windows.Forms.Button btnAddCurrentFilter; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.Button btnCreateCheat; diff --git a/GUI.NET/Forms/Config/ctrlDipSwitch.Designer.cs b/GUI.NET/Forms/Config/ctrlDipSwitch.Designer.cs index 13072c04..640f4a7a 100644 --- a/GUI.NET/Forms/Config/ctrlDipSwitch.Designer.cs +++ b/GUI.NET/Forms/Config/ctrlDipSwitch.Designer.cs @@ -27,22 +27,12 @@ /// private void InitializeComponent() { - this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.lblName = new System.Windows.Forms.Label(); this.cboDipSwitch = new System.Windows.Forms.ComboBox(); - this.flowLayoutPanel1.SuspendLayout(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.tableLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // - // flowLayoutPanel1 - // - this.flowLayoutPanel1.Controls.Add(this.lblName); - this.flowLayoutPanel1.Controls.Add(this.cboDipSwitch); - this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(249, 27); - this.flowLayoutPanel1.TabIndex = 0; - // // lblName // this.lblName.Anchor = System.Windows.Forms.AnchorStyles.Left; @@ -55,30 +45,45 @@ // // cboDipSwitch // + this.cboDipSwitch.Dock = System.Windows.Forms.DockStyle.Fill; this.cboDipSwitch.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cboDipSwitch.FormattingEnabled = true; this.cboDipSwitch.Location = new System.Drawing.Point(64, 3); this.cboDipSwitch.Name = "cboDipSwitch"; - this.cboDipSwitch.Size = new System.Drawing.Size(181, 21); + this.cboDipSwitch.Size = new System.Drawing.Size(182, 21); this.cboDipSwitch.TabIndex = 2; // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 2; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Controls.Add(this.cboDipSwitch, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.lblName, 0, 0); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 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(249, 27); + this.tableLayoutPanel1.TabIndex = 1; + // // ctrlDipSwitch // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.flowLayoutPanel1); + this.Controls.Add(this.tableLayoutPanel1); this.Name = "ctrlDipSwitch"; this.Size = new System.Drawing.Size(249, 27); - this.flowLayoutPanel1.ResumeLayout(false); - this.flowLayoutPanel1.PerformLayout(); + this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel1.PerformLayout(); this.ResumeLayout(false); } #endregion - - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; private System.Windows.Forms.Label lblName; private System.Windows.Forms.ComboBox cboDipSwitch; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; } } diff --git a/GUI.NET/Forms/Config/ctrlEmulatorShortcuts.cs b/GUI.NET/Forms/Config/ctrlEmulatorShortcuts.cs index 5e724276..1adc1d18 100644 --- a/GUI.NET/Forms/Config/ctrlEmulatorShortcuts.cs +++ b/GUI.NET/Forms/Config/ctrlEmulatorShortcuts.cs @@ -19,6 +19,14 @@ namespace Mesen.GUI.Forms.Config } } + protected override void OnResize(EventArgs e) + { + base.OnResize(e); + this.colAction.Width = (int)(this.Width / 2.2); + this.colBinding1.Width = this.Width / 4; + this.colBinding2.Width = this.Width / 4; + } + private void InitializeGrid() { EmulatorShortcut[] displayOrder = new EmulatorShortcut[] { diff --git a/GUI.NET/Forms/Config/ctrlPathSelection.Designer.cs b/GUI.NET/Forms/Config/ctrlPathSelection.Designer.cs index 29569cad..8c0af67b 100644 --- a/GUI.NET/Forms/Config/ctrlPathSelection.Designer.cs +++ b/GUI.NET/Forms/Config/ctrlPathSelection.Designer.cs @@ -28,10 +28,10 @@ private void InitializeComponent() { this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.txtPath = new System.Windows.Forms.TextBox(); - this.btnBrowse = new System.Windows.Forms.Button(); this.tlpPath = new System.Windows.Forms.TableLayoutPanel(); this.txtDisabledPath = new System.Windows.Forms.TextBox(); + this.txtPath = new System.Windows.Forms.TextBox(); + this.btnBrowse = new System.Windows.Forms.Button(); this.tableLayoutPanel1.SuspendLayout(); this.tlpPath.SuspendLayout(); this.SuspendLayout(); @@ -52,27 +52,7 @@ this.tableLayoutPanel1.Size = new System.Drawing.Size(235, 21); this.tableLayoutPanel1.TabIndex = 0; // - // txtPath - // - this.txtPath.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtPath.Location = new System.Drawing.Point(0, 0); - this.txtPath.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0); - this.txtPath.Name = "txtPath"; - this.txtPath.Size = new System.Drawing.Size(211, 20); - this.txtPath.TabIndex = 0; - // - // btnBrowse - // - this.btnBrowse.Location = new System.Drawing.Point(211, 1); - this.btnBrowse.Margin = new System.Windows.Forms.Padding(0, 1, 0, 0); - this.btnBrowse.Name = "btnBrowse"; - this.btnBrowse.Size = new System.Drawing.Size(24, 20); - this.btnBrowse.TabIndex = 1; - this.btnBrowse.Text = "..."; - this.btnBrowse.UseVisualStyleBackColor = true; - this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click); - // - // tableLayoutPanel2 + // tlpPath // this.tlpPath.ColumnCount = 2; this.tlpPath.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); @@ -81,28 +61,49 @@ this.tlpPath.Controls.Add(this.txtPath, 0, 0); this.tlpPath.Dock = System.Windows.Forms.DockStyle.Fill; this.tlpPath.Location = new System.Drawing.Point(0, 0); - this.tlpPath.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0); - this.tlpPath.Name = "tableLayoutPanel2"; + this.tlpPath.Margin = new System.Windows.Forms.Padding(0); + this.tlpPath.Name = "tlpPath"; this.tlpPath.RowCount = 1; this.tlpPath.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tlpPath.Size = new System.Drawing.Size(211, 21); + this.tlpPath.Size = new System.Drawing.Size(209, 21); this.tlpPath.TabIndex = 1; // // txtDisabledPath // - this.txtDisabledPath.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtDisabledPath.Location = new System.Drawing.Point(211, 0); + this.txtDisabledPath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.txtDisabledPath.Location = new System.Drawing.Point(209, 0); this.txtDisabledPath.Margin = new System.Windows.Forms.Padding(0); this.txtDisabledPath.Name = "txtDisabledPath"; this.txtDisabledPath.Size = new System.Drawing.Size(1, 20); this.txtDisabledPath.TabIndex = 1; // + // txtPath + // + this.txtPath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.txtPath.Location = new System.Drawing.Point(0, 0); + this.txtPath.Margin = new System.Windows.Forms.Padding(0); + this.txtPath.Name = "txtPath"; + this.txtPath.Size = new System.Drawing.Size(209, 20); + this.txtPath.TabIndex = 0; + // + // btnBrowse + // + this.btnBrowse.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.btnBrowse.Location = new System.Drawing.Point(209, 0); + this.btnBrowse.Margin = new System.Windows.Forms.Padding(0); + this.btnBrowse.Name = "btnBrowse"; + this.btnBrowse.Size = new System.Drawing.Size(26, 20); + this.btnBrowse.TabIndex = 1; + this.btnBrowse.Text = "..."; + this.btnBrowse.UseVisualStyleBackColor = true; + this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click); + // // ctrlPathSelection // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.tableLayoutPanel1); - this.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0); + this.Margin = new System.Windows.Forms.Padding(0); this.MaximumSize = new System.Drawing.Size(1000, 21); this.MinimumSize = new System.Drawing.Size(0, 21); this.Name = "ctrlPathSelection"; diff --git a/GUI.NET/Forms/Config/ctrlStandardController.Designer.cs b/GUI.NET/Forms/Config/ctrlStandardController.Designer.cs index b742e00c..b518c407 100644 --- a/GUI.NET/Forms/Config/ctrlStandardController.Designer.cs +++ b/GUI.NET/Forms/Config/ctrlStandardController.Designer.cs @@ -123,7 +123,7 @@ // this.lblStart.AutoSize = true; this.lblStart.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblStart.Location = new System.Drawing.Point(324, 107); + this.lblStart.Location = new System.Drawing.Point(324, 104); this.lblStart.Name = "lblStart"; this.lblStart.Size = new System.Drawing.Size(42, 18); this.lblStart.TabIndex = 25; @@ -133,7 +133,7 @@ // this.lblSelect.AutoSize = true; this.lblSelect.Font = new System.Drawing.Font("Arial", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblSelect.Location = new System.Drawing.Point(237, 106); + this.lblSelect.Location = new System.Drawing.Point(237, 104); this.lblSelect.Name = "lblSelect"; this.lblSelect.Size = new System.Drawing.Size(53, 18); this.lblSelect.TabIndex = 24; @@ -183,7 +183,7 @@ // // btnSelect // - this.btnSelect.Location = new System.Drawing.Point(228, 131); + this.btnSelect.Location = new System.Drawing.Point(228, 132); this.btnSelect.Name = "btnSelect"; this.btnSelect.Size = new System.Drawing.Size(73, 37); this.btnSelect.TabIndex = 12; @@ -223,7 +223,7 @@ // // btnStart // - this.btnStart.Location = new System.Drawing.Point(310, 131); + this.btnStart.Location = new System.Drawing.Point(310, 132); this.btnStart.Name = "btnStart"; this.btnStart.Size = new System.Drawing.Size(73, 37); this.btnStart.TabIndex = 13; diff --git a/GUI.NET/Forms/Config/ctrlStandardController.cs b/GUI.NET/Forms/Config/ctrlStandardController.cs index 79b9afdd..0829a97f 100644 --- a/GUI.NET/Forms/Config/ctrlStandardController.cs +++ b/GUI.NET/Forms/Config/ctrlStandardController.cs @@ -45,7 +45,7 @@ namespace Mesen.GUI.Forms.Config new Point(56, 29), new Point(56, 85), new Point(22, 85), new Point(22, 130), new Point(56, 130), new Point(56, 181), new Point(145, 181), new Point(145, 130), new Point(179, 130), - new Point(179, 85), new Point(145, 85), new Point(145, 28), + new Point(179, 85), new Point(145, 85), new Point(145, 29), new Point(56, 29) }; @@ -59,8 +59,11 @@ namespace Mesen.GUI.Forms.Config { Rectangle rect = this.ClientRectangle; rect.Inflate(-2, -2); + float xFactor = picBackground.Width / 585f; + float yFactor = picBackground.Height / 210f; Bitmap bitmap = new Bitmap(picBackground.Width, picBackground.Height); using(Graphics g = Graphics.FromImage(bitmap)) { + g.ScaleTransform(xFactor, yFactor); using(Pen pen = new Pen(Color.Black, 2f)) { g.DrawRectangle(pen, rect); g.DrawRectangle(pen, 226, 128, 159, 43); diff --git a/GUI.NET/Forms/Config/frmAudioConfig.Designer.cs b/GUI.NET/Forms/Config/frmAudioConfig.Designer.cs index bb076d3e..bc55f3d7 100644 --- a/GUI.NET/Forms/Config/frmAudioConfig.Designer.cs +++ b/GUI.NET/Forms/Config/frmAudioConfig.Designer.cs @@ -48,15 +48,15 @@ namespace Mesen.GUI.Forms.Config this.chkReduceSoundInBackground = new System.Windows.Forms.CheckBox(); this.chkEnableAudio = new System.Windows.Forms.CheckBox(); this.lblSampleRate = new System.Windows.Forms.Label(); - this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); - this.nudLatency = new System.Windows.Forms.NumericUpDown(); - this.lblLatencyMs = new System.Windows.Forms.Label(); - this.picLatencyWarning = new System.Windows.Forms.PictureBox(); - this.lblLatencyWarning = new System.Windows.Forms.Label(); this.lblAudioLatency = new System.Windows.Forms.Label(); this.cboSampleRate = new System.Windows.Forms.ComboBox(); this.lblAudioDevice = new System.Windows.Forms.Label(); this.cboAudioDevice = new System.Windows.Forms.ComboBox(); + this.tableLayoutPanel7 = new System.Windows.Forms.TableLayoutPanel(); + this.lblLatencyWarning = new System.Windows.Forms.Label(); + this.picLatencyWarning = new System.Windows.Forms.PictureBox(); + this.lblLatencyMs = new System.Windows.Forms.Label(); + this.nudLatency = new Mesen.GUI.Controls.MesenNumericUpDown(); this.btnReset = new System.Windows.Forms.Button(); this.tabMain = new System.Windows.Forms.TabControl(); this.tpgGeneral = new System.Windows.Forms.TabPage(); @@ -108,15 +108,13 @@ namespace Mesen.GUI.Forms.Config this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel(); this.grpStereo = new System.Windows.Forms.GroupBox(); this.tlpStereoFilter = new System.Windows.Forms.TableLayoutPanel(); - this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel(); - this.nudStereoDelay = new System.Windows.Forms.NumericUpDown(); this.lblStereoDelayMs = new System.Windows.Forms.Label(); + this.lblStereoPanningAngle = new System.Windows.Forms.Label(); this.radStereoDisabled = new System.Windows.Forms.RadioButton(); this.radStereoDelay = new System.Windows.Forms.RadioButton(); this.radStereoPanning = new System.Windows.Forms.RadioButton(); - this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel(); - this.nudStereoPanning = new System.Windows.Forms.NumericUpDown(); - this.lblStereoPanningAngle = new System.Windows.Forms.Label(); + this.nudStereoDelay = new Mesen.GUI.Controls.MesenNumericUpDown(); + this.nudStereoPanning = new Mesen.GUI.Controls.MesenNumericUpDown(); this.grpReverb = new System.Windows.Forms.GroupBox(); this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel(); this.chkReverbEnabled = new System.Windows.Forms.CheckBox(); @@ -126,7 +124,7 @@ namespace Mesen.GUI.Forms.Config this.trkReverbStrength = new System.Windows.Forms.TrackBar(); this.flowLayoutPanel5 = new System.Windows.Forms.FlowLayoutPanel(); this.chkCrossFeedEnabled = new System.Windows.Forms.CheckBox(); - this.nudCrossFeedRatio = new System.Windows.Forms.NumericUpDown(); + this.nudCrossFeedRatio = new Mesen.GUI.Controls.MesenNumericUpDown(); this.lblCrossFeedRatio = new System.Windows.Forms.Label(); this.tpgAdvanced = new System.Windows.Forms.TabPage(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); @@ -138,8 +136,7 @@ namespace Mesen.GUI.Forms.Config this.grpVolume.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); this.tableLayoutPanel2.SuspendLayout(); - this.flowLayoutPanel2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudLatency)).BeginInit(); + this.tableLayoutPanel7.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.picLatencyWarning)).BeginInit(); this.tabMain.SuspendLayout(); this.tpgGeneral.SuspendLayout(); @@ -155,16 +152,11 @@ namespace Mesen.GUI.Forms.Config this.tableLayoutPanel4.SuspendLayout(); this.grpStereo.SuspendLayout(); this.tlpStereoFilter.SuspendLayout(); - this.flowLayoutPanel3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudStereoDelay)).BeginInit(); - this.flowLayoutPanel4.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudStereoPanning)).BeginInit(); this.grpReverb.SuspendLayout(); this.tableLayoutPanel5.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.trkReverbDelay)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.trkReverbStrength)).BeginInit(); this.flowLayoutPanel5.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudCrossFeedRatio)).BeginInit(); this.tpgAdvanced.SuspendLayout(); this.tableLayoutPanel3.SuspendLayout(); this.SuspendLayout(); @@ -407,11 +399,11 @@ namespace Mesen.GUI.Forms.Config this.tableLayoutPanel2.Controls.Add(this.chkReduceSoundInBackground, 0, 5); this.tableLayoutPanel2.Controls.Add(this.chkEnableAudio, 0, 0); this.tableLayoutPanel2.Controls.Add(this.lblSampleRate, 0, 2); - this.tableLayoutPanel2.Controls.Add(this.flowLayoutPanel2, 1, 3); this.tableLayoutPanel2.Controls.Add(this.lblAudioLatency, 0, 3); this.tableLayoutPanel2.Controls.Add(this.cboSampleRate, 1, 2); this.tableLayoutPanel2.Controls.Add(this.lblAudioDevice, 0, 1); this.tableLayoutPanel2.Controls.Add(this.cboAudioDevice, 1, 1); + this.tableLayoutPanel2.Controls.Add(this.tableLayoutPanel7, 1, 3); this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 3); this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(0); @@ -431,7 +423,7 @@ namespace Mesen.GUI.Forms.Config // this.chkMuteSoundInBackground.AutoSize = true; this.tableLayoutPanel2.SetColumnSpan(this.chkMuteSoundInBackground, 2); - this.chkMuteSoundInBackground.Location = new System.Drawing.Point(3, 107); + this.chkMuteSoundInBackground.Location = new System.Drawing.Point(3, 109); this.chkMuteSoundInBackground.Name = "chkMuteSoundInBackground"; this.chkMuteSoundInBackground.Size = new System.Drawing.Size(182, 17); this.chkMuteSoundInBackground.TabIndex = 14; @@ -443,7 +435,7 @@ namespace Mesen.GUI.Forms.Config // this.chkReduceSoundInBackground.AutoSize = true; this.tableLayoutPanel2.SetColumnSpan(this.chkReduceSoundInBackground, 2); - this.chkReduceSoundInBackground.Location = new System.Drawing.Point(3, 130); + this.chkReduceSoundInBackground.Location = new System.Drawing.Point(3, 132); this.chkReduceSoundInBackground.Name = "chkReduceSoundInBackground"; this.chkReduceSoundInBackground.Size = new System.Drawing.Size(201, 17); this.chkReduceSoundInBackground.TabIndex = 13; @@ -472,79 +464,11 @@ namespace Mesen.GUI.Forms.Config this.lblSampleRate.TabIndex = 0; this.lblSampleRate.Text = "Sample Rate:"; // - // flowLayoutPanel2 - // - this.flowLayoutPanel2.Controls.Add(this.nudLatency); - this.flowLayoutPanel2.Controls.Add(this.lblLatencyMs); - this.flowLayoutPanel2.Controls.Add(this.picLatencyWarning); - this.flowLayoutPanel2.Controls.Add(this.lblLatencyWarning); - this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel2.Location = new System.Drawing.Point(77, 80); - this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0); - this.flowLayoutPanel2.Name = "flowLayoutPanel2"; - this.flowLayoutPanel2.Size = new System.Drawing.Size(386, 24); - this.flowLayoutPanel2.TabIndex = 4; - // - // nudLatency - // - this.nudLatency.Location = new System.Drawing.Point(3, 3); - this.nudLatency.Maximum = new decimal(new int[] { - 300, - 0, - 0, - 0}); - this.nudLatency.Minimum = new decimal(new int[] { - 15, - 0, - 0, - 0}); - this.nudLatency.Name = "nudLatency"; - this.nudLatency.Size = new System.Drawing.Size(45, 20); - this.nudLatency.TabIndex = 1; - this.nudLatency.Value = new decimal(new int[] { - 100, - 0, - 0, - 0}); - this.nudLatency.ValueChanged += new System.EventHandler(this.nudLatency_ValueChanged); - // - // lblLatencyMs - // - this.lblLatencyMs.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lblLatencyMs.AutoSize = true; - this.lblLatencyMs.Location = new System.Drawing.Point(54, 6); - this.lblLatencyMs.Name = "lblLatencyMs"; - this.lblLatencyMs.Size = new System.Drawing.Size(20, 13); - this.lblLatencyMs.TabIndex = 2; - this.lblLatencyMs.Text = "ms"; - // - // picLatencyWarning - // - this.picLatencyWarning.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.picLatencyWarning.Image = global::Mesen.GUI.Properties.Resources.Warning; - this.picLatencyWarning.Location = new System.Drawing.Point(82, 5); - this.picLatencyWarning.Margin = new System.Windows.Forms.Padding(5, 3, 0, 3); - this.picLatencyWarning.Name = "picLatencyWarning"; - this.picLatencyWarning.Size = new System.Drawing.Size(16, 16); - this.picLatencyWarning.TabIndex = 3; - this.picLatencyWarning.TabStop = false; - // - // lblLatencyWarning - // - this.lblLatencyWarning.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lblLatencyWarning.AutoSize = true; - this.lblLatencyWarning.Location = new System.Drawing.Point(98, 6); - this.lblLatencyWarning.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0); - this.lblLatencyWarning.Name = "lblLatencyWarning"; - this.lblLatencyWarning.Size = new System.Drawing.Size(192, 13); - this.lblLatencyWarning.TabIndex = 4; - this.lblLatencyWarning.Text = "Low values may cause sound problems"; - // // lblAudioLatency // this.lblAudioLatency.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblAudioLatency.AutoSize = true; - this.lblAudioLatency.Location = new System.Drawing.Point(3, 85); + this.lblAudioLatency.Location = new System.Drawing.Point(3, 86); this.lblAudioLatency.Name = "lblAudioLatency"; this.lblAudioLatency.Size = new System.Drawing.Size(48, 13); this.lblAudioLatency.TabIndex = 0; @@ -584,6 +508,91 @@ namespace Mesen.GUI.Forms.Config this.cboAudioDevice.Size = new System.Drawing.Size(209, 21); this.cboAudioDevice.TabIndex = 7; // + // tableLayoutPanel7 + // + this.tableLayoutPanel7.AutoSize = true; + this.tableLayoutPanel7.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.tableLayoutPanel7.ColumnCount = 4; + this.tableLayoutPanel7.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel7.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel7.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel7.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel7.Controls.Add(this.lblLatencyWarning, 3, 0); + this.tableLayoutPanel7.Controls.Add(this.picLatencyWarning, 2, 0); + this.tableLayoutPanel7.Controls.Add(this.lblLatencyMs, 1, 0); + this.tableLayoutPanel7.Controls.Add(this.nudLatency, 0, 0); + this.tableLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel7.Location = new System.Drawing.Point(77, 80); + this.tableLayoutPanel7.Margin = new System.Windows.Forms.Padding(0); + this.tableLayoutPanel7.Name = "tableLayoutPanel7"; + this.tableLayoutPanel7.RowCount = 1; + this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel7.Size = new System.Drawing.Size(386, 26); + this.tableLayoutPanel7.TabIndex = 15; + // + // lblLatencyWarning + // + this.lblLatencyWarning.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblLatencyWarning.AutoSize = true; + this.lblLatencyWarning.Location = new System.Drawing.Point(98, 6); + this.lblLatencyWarning.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0); + this.lblLatencyWarning.Name = "lblLatencyWarning"; + this.lblLatencyWarning.Size = new System.Drawing.Size(192, 13); + this.lblLatencyWarning.TabIndex = 4; + this.lblLatencyWarning.Text = "Low values may cause sound problems"; + // + // picLatencyWarning + // + this.picLatencyWarning.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.picLatencyWarning.BackgroundImage = global::Mesen.GUI.Properties.Resources.Warning; + this.picLatencyWarning.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.picLatencyWarning.Location = new System.Drawing.Point(82, 5); + this.picLatencyWarning.Margin = new System.Windows.Forms.Padding(5, 3, 0, 3); + this.picLatencyWarning.Name = "picLatencyWarning"; + this.picLatencyWarning.Size = new System.Drawing.Size(16, 16); + this.picLatencyWarning.TabIndex = 3; + this.picLatencyWarning.TabStop = false; + // + // lblLatencyMs + // + this.lblLatencyMs.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblLatencyMs.AutoSize = true; + this.lblLatencyMs.Location = new System.Drawing.Point(54, 6); + this.lblLatencyMs.Name = "lblLatencyMs"; + this.lblLatencyMs.Size = new System.Drawing.Size(20, 13); + this.lblLatencyMs.TabIndex = 2; + this.lblLatencyMs.Text = "ms"; + // + // nudLatency + // + this.nudLatency.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.nudLatency.DecimalPlaces = 0; + this.nudLatency.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nudLatency.Location = new System.Drawing.Point(3, 3); + this.nudLatency.Maximum = new decimal(new int[] { + 300, + 0, + 0, + 0}); + this.nudLatency.Minimum = new decimal(new int[] { + 15, + 0, + 0, + 0}); + this.nudLatency.Name = "nudLatency"; + this.nudLatency.Size = new System.Drawing.Size(45, 20); + this.nudLatency.TabIndex = 1; + this.nudLatency.Value = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.nudLatency.ValueChanged += new System.EventHandler(this.nudLatency_ValueChanged); + // // btnReset // this.btnReset.AutoSize = true; @@ -865,7 +874,7 @@ namespace Mesen.GUI.Forms.Config // this.chkEnableEqualizer.AutoSize = true; this.chkEnableEqualizer.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.chkEnableEqualizer.Location = new System.Drawing.Point(7, -1); + this.chkEnableEqualizer.Location = new System.Drawing.Point(7, 0); this.chkEnableEqualizer.Name = "chkEnableEqualizer"; this.chkEnableEqualizer.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0); this.chkEnableEqualizer.Size = new System.Drawing.Size(110, 17); @@ -1352,14 +1361,17 @@ namespace Mesen.GUI.Forms.Config // // tlpStereoFilter // - this.tlpStereoFilter.ColumnCount = 2; + this.tlpStereoFilter.ColumnCount = 3; + this.tlpStereoFilter.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tlpStereoFilter.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tlpStereoFilter.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tlpStereoFilter.Controls.Add(this.flowLayoutPanel3, 1, 1); + this.tlpStereoFilter.Controls.Add(this.lblStereoDelayMs, 2, 1); + this.tlpStereoFilter.Controls.Add(this.lblStereoPanningAngle, 2, 2); this.tlpStereoFilter.Controls.Add(this.radStereoDisabled, 0, 0); this.tlpStereoFilter.Controls.Add(this.radStereoDelay, 0, 1); this.tlpStereoFilter.Controls.Add(this.radStereoPanning, 0, 2); - this.tlpStereoFilter.Controls.Add(this.flowLayoutPanel4, 1, 2); + this.tlpStereoFilter.Controls.Add(this.nudStereoDelay, 1, 1); + this.tlpStereoFilter.Controls.Add(this.nudStereoPanning, 1, 2); this.tlpStereoFilter.Dock = System.Windows.Forms.DockStyle.Fill; this.tlpStereoFilter.Location = new System.Drawing.Point(3, 16); this.tlpStereoFilter.Name = "tlpStereoFilter"; @@ -1368,39 +1380,29 @@ namespace Mesen.GUI.Forms.Config this.tlpStereoFilter.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tlpStereoFilter.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tlpStereoFilter.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tlpStereoFilter.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tlpStereoFilter.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tlpStereoFilter.Size = new System.Drawing.Size(451, 76); this.tlpStereoFilter.TabIndex = 0; // - // flowLayoutPanel3 - // - this.flowLayoutPanel3.Controls.Add(this.nudStereoDelay); - this.flowLayoutPanel3.Controls.Add(this.lblStereoDelayMs); - this.flowLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel3.Location = new System.Drawing.Point(72, 23); - this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(0); - this.flowLayoutPanel3.Name = "flowLayoutPanel3"; - this.flowLayoutPanel3.Size = new System.Drawing.Size(379, 26); - this.flowLayoutPanel3.TabIndex = 1; - // - // nudStereoDelay - // - this.nudStereoDelay.Location = new System.Drawing.Point(3, 3); - this.nudStereoDelay.Name = "nudStereoDelay"; - this.nudStereoDelay.Size = new System.Drawing.Size(45, 20); - this.nudStereoDelay.TabIndex = 1; - // // lblStereoDelayMs // this.lblStereoDelayMs.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblStereoDelayMs.AutoSize = true; - this.lblStereoDelayMs.Location = new System.Drawing.Point(54, 6); + this.lblStereoDelayMs.Location = new System.Drawing.Point(120, 28); this.lblStereoDelayMs.Name = "lblStereoDelayMs"; this.lblStereoDelayMs.Size = new System.Drawing.Size(20, 13); this.lblStereoDelayMs.TabIndex = 1; this.lblStereoDelayMs.Text = "ms"; // + // lblStereoPanningAngle + // + this.lblStereoPanningAngle.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.lblStereoPanningAngle.AutoSize = true; + this.lblStereoPanningAngle.Location = new System.Drawing.Point(120, 51); + this.lblStereoPanningAngle.Name = "lblStereoPanningAngle"; + this.lblStereoPanningAngle.Size = new System.Drawing.Size(92, 13); + this.lblStereoPanningAngle.TabIndex = 1; + this.lblStereoPanningAngle.Text = "(Angle in degrees)"; + // // radStereoDisabled // this.radStereoDisabled.AutoSize = true; @@ -1429,7 +1431,7 @@ namespace Mesen.GUI.Forms.Config // radStereoPanning // this.radStereoPanning.AutoSize = true; - this.radStereoPanning.Location = new System.Drawing.Point(3, 52); + this.radStereoPanning.Location = new System.Drawing.Point(3, 49); this.radStereoPanning.Name = "radStereoPanning"; this.radStereoPanning.Size = new System.Drawing.Size(64, 17); this.radStereoPanning.TabIndex = 3; @@ -1438,20 +1440,47 @@ namespace Mesen.GUI.Forms.Config this.radStereoPanning.Text = "Panning"; this.radStereoPanning.UseVisualStyleBackColor = true; // - // flowLayoutPanel4 + // nudStereoDelay // - this.flowLayoutPanel4.Controls.Add(this.nudStereoPanning); - this.flowLayoutPanel4.Controls.Add(this.lblStereoPanningAngle); - this.flowLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel4.Location = new System.Drawing.Point(72, 49); - this.flowLayoutPanel4.Margin = new System.Windows.Forms.Padding(0); - this.flowLayoutPanel4.Name = "flowLayoutPanel4"; - this.flowLayoutPanel4.Size = new System.Drawing.Size(379, 26); - this.flowLayoutPanel4.TabIndex = 4; + this.nudStereoDelay.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.nudStereoDelay.DecimalPlaces = 0; + this.nudStereoDelay.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nudStereoDelay.Location = new System.Drawing.Point(72, 24); + this.nudStereoDelay.Margin = new System.Windows.Forms.Padding(0); + this.nudStereoDelay.Maximum = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.nudStereoDelay.Minimum = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.nudStereoDelay.Name = "nudStereoDelay"; + this.nudStereoDelay.Size = new System.Drawing.Size(45, 20); + this.nudStereoDelay.TabIndex = 1; + this.nudStereoDelay.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); // // nudStereoPanning // - this.nudStereoPanning.Location = new System.Drawing.Point(3, 3); + this.nudStereoPanning.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.nudStereoPanning.DecimalPlaces = 0; + this.nudStereoPanning.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nudStereoPanning.Location = new System.Drawing.Point(72, 47); + this.nudStereoPanning.Margin = new System.Windows.Forms.Padding(0); this.nudStereoPanning.Maximum = new decimal(new int[] { 180, 0, @@ -1465,30 +1494,27 @@ namespace Mesen.GUI.Forms.Config this.nudStereoPanning.Name = "nudStereoPanning"; this.nudStereoPanning.Size = new System.Drawing.Size(45, 20); this.nudStereoPanning.TabIndex = 1; - // - // lblStereoPanningAngle - // - this.lblStereoPanningAngle.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lblStereoPanningAngle.AutoSize = true; - this.lblStereoPanningAngle.Location = new System.Drawing.Point(54, 6); - this.lblStereoPanningAngle.Name = "lblStereoPanningAngle"; - this.lblStereoPanningAngle.Size = new System.Drawing.Size(92, 13); - this.lblStereoPanningAngle.TabIndex = 1; - this.lblStereoPanningAngle.Text = "(Angle in degrees)"; + this.nudStereoPanning.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); // // grpReverb // + this.grpReverb.AutoSize = true; this.grpReverb.Controls.Add(this.tableLayoutPanel5); this.grpReverb.Dock = System.Windows.Forms.DockStyle.Fill; this.grpReverb.Location = new System.Drawing.Point(3, 104); this.grpReverb.Name = "grpReverb"; - this.grpReverb.Size = new System.Drawing.Size(457, 109); + this.grpReverb.Size = new System.Drawing.Size(457, 106); this.grpReverb.TabIndex = 1; this.grpReverb.TabStop = false; this.grpReverb.Text = "Reverb"; // // tableLayoutPanel5 // + this.tableLayoutPanel5.AutoSize = true; this.tableLayoutPanel5.ColumnCount = 2; this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); @@ -1505,7 +1531,7 @@ namespace Mesen.GUI.Forms.Config this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32F)); this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 32F)); this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel5.Size = new System.Drawing.Size(451, 90); + this.tableLayoutPanel5.Size = new System.Drawing.Size(451, 87); this.tableLayoutPanel5.TabIndex = 0; // // chkReverbEnabled @@ -1561,11 +1587,12 @@ namespace Mesen.GUI.Forms.Config // // flowLayoutPanel5 // + this.flowLayoutPanel5.AutoSize = true; this.flowLayoutPanel5.Controls.Add(this.chkCrossFeedEnabled); this.flowLayoutPanel5.Controls.Add(this.nudCrossFeedRatio); this.flowLayoutPanel5.Controls.Add(this.lblCrossFeedRatio); this.flowLayoutPanel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel5.Location = new System.Drawing.Point(6, 216); + this.flowLayoutPanel5.Location = new System.Drawing.Point(6, 213); this.flowLayoutPanel5.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.flowLayoutPanel5.Name = "flowLayoutPanel5"; this.flowLayoutPanel5.Size = new System.Drawing.Size(457, 25); @@ -1586,16 +1613,38 @@ namespace Mesen.GUI.Forms.Config // nudCrossFeedRatio // this.nudCrossFeedRatio.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.nudCrossFeedRatio.Location = new System.Drawing.Point(121, 3); + this.nudCrossFeedRatio.DecimalPlaces = 0; + this.nudCrossFeedRatio.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nudCrossFeedRatio.Location = new System.Drawing.Point(118, 2); + this.nudCrossFeedRatio.Margin = new System.Windows.Forms.Padding(0); + this.nudCrossFeedRatio.Maximum = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.nudCrossFeedRatio.Minimum = new decimal(new int[] { + 0, + 0, + 0, + 0}); this.nudCrossFeedRatio.Name = "nudCrossFeedRatio"; this.nudCrossFeedRatio.Size = new System.Drawing.Size(42, 20); this.nudCrossFeedRatio.TabIndex = 2; + this.nudCrossFeedRatio.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); // // lblCrossFeedRatio // this.lblCrossFeedRatio.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblCrossFeedRatio.AutoSize = true; - this.lblCrossFeedRatio.Location = new System.Drawing.Point(169, 6); + this.lblCrossFeedRatio.Location = new System.Drawing.Point(163, 6); this.lblCrossFeedRatio.Name = "lblCrossFeedRatio"; this.lblCrossFeedRatio.Size = new System.Drawing.Size(15, 13); this.lblCrossFeedRatio.TabIndex = 3; @@ -1693,9 +1742,8 @@ namespace Mesen.GUI.Forms.Config this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel2.ResumeLayout(false); this.tableLayoutPanel2.PerformLayout(); - this.flowLayoutPanel2.ResumeLayout(false); - this.flowLayoutPanel2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudLatency)).EndInit(); + this.tableLayoutPanel7.ResumeLayout(false); + this.tableLayoutPanel7.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.picLatencyWarning)).EndInit(); this.tabMain.ResumeLayout(false); this.tpgGeneral.ResumeLayout(false); @@ -1713,23 +1761,18 @@ namespace Mesen.GUI.Forms.Config this.flowLayoutPanel7.PerformLayout(); this.tpgEffects.ResumeLayout(false); this.tableLayoutPanel4.ResumeLayout(false); + this.tableLayoutPanel4.PerformLayout(); this.grpStereo.ResumeLayout(false); this.tlpStereoFilter.ResumeLayout(false); this.tlpStereoFilter.PerformLayout(); - this.flowLayoutPanel3.ResumeLayout(false); - this.flowLayoutPanel3.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudStereoDelay)).EndInit(); - this.flowLayoutPanel4.ResumeLayout(false); - this.flowLayoutPanel4.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudStereoPanning)).EndInit(); this.grpReverb.ResumeLayout(false); + this.grpReverb.PerformLayout(); this.tableLayoutPanel5.ResumeLayout(false); this.tableLayoutPanel5.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.trkReverbDelay)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.trkReverbStrength)).EndInit(); this.flowLayoutPanel5.ResumeLayout(false); this.flowLayoutPanel5.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudCrossFeedRatio)).EndInit(); this.tpgAdvanced.ResumeLayout(false); this.tableLayoutPanel3.ResumeLayout(false); this.tableLayoutPanel3.PerformLayout(); @@ -1743,11 +1786,10 @@ namespace Mesen.GUI.Forms.Config private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private System.Windows.Forms.CheckBox chkEnableAudio; private System.Windows.Forms.Label lblAudioLatency; - private System.Windows.Forms.NumericUpDown nudLatency; + private MesenNumericUpDown nudLatency; private System.Windows.Forms.Label lblLatencyMs; private System.Windows.Forms.Button btnReset; private System.Windows.Forms.Label lblSampleRate; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; private System.Windows.Forms.ComboBox cboSampleRate; private System.Windows.Forms.Label lblAudioDevice; private System.Windows.Forms.ComboBox cboAudioDevice; @@ -1776,14 +1818,12 @@ namespace Mesen.GUI.Forms.Config private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4; private System.Windows.Forms.GroupBox grpStereo; private System.Windows.Forms.TableLayoutPanel tlpStereoFilter; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel3; - private System.Windows.Forms.NumericUpDown nudStereoDelay; + private MesenNumericUpDown nudStereoDelay; private System.Windows.Forms.Label lblStereoDelayMs; private System.Windows.Forms.RadioButton radStereoDisabled; private System.Windows.Forms.RadioButton radStereoDelay; private System.Windows.Forms.RadioButton radStereoPanning; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel4; - private System.Windows.Forms.NumericUpDown nudStereoPanning; + private MesenNumericUpDown nudStereoPanning; private System.Windows.Forms.Label lblStereoPanningAngle; private System.Windows.Forms.GroupBox grpReverb; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel5; @@ -1810,7 +1850,7 @@ namespace Mesen.GUI.Forms.Config private Controls.ctrlHorizontalTrackbar trkSquare1Pan; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel5; private System.Windows.Forms.CheckBox chkCrossFeedEnabled; - private System.Windows.Forms.NumericUpDown nudCrossFeedRatio; + private MesenNumericUpDown nudCrossFeedRatio; private System.Windows.Forms.Label lblCrossFeedRatio; private Controls.ctrlHorizontalTrackbar trkTrianglePan; private ctrlRiskyOption chkDisableNoiseModeFlag; @@ -1844,5 +1884,6 @@ namespace Mesen.GUI.Forms.Config private System.Windows.Forms.Label lblEqualizerPreset; private System.Windows.Forms.ComboBox cboEqualizerPreset; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel7; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel7; } } \ No newline at end of file diff --git a/GUI.NET/Forms/Config/frmControllerConfig.Designer.cs b/GUI.NET/Forms/Config/frmControllerConfig.Designer.cs index 504c2345..f7c7073a 100644 --- a/GUI.NET/Forms/Config/frmControllerConfig.Designer.cs +++ b/GUI.NET/Forms/Config/frmControllerConfig.Designer.cs @@ -48,6 +48,10 @@ this.panel1 = new System.Windows.Forms.Panel(); this.lblTurboFast = new System.Windows.Forms.Label(); this.lblSlow = new System.Windows.Forms.Label(); + this.pnlHint = new System.Windows.Forms.Panel(); + this.flpHint = new System.Windows.Forms.FlowLayoutPanel(); + this.picHint = new System.Windows.Forms.PictureBox(); + this.lblHint = new System.Windows.Forms.Label(); this.mnuStripPreset = new System.Windows.Forms.ContextMenuStrip(this.components); this.mnuKeyboard = new System.Windows.Forms.ToolStripMenuItem(); this.mnuWasdLayout = new System.Windows.Forms.ToolStripMenuItem(); @@ -64,10 +68,6 @@ this.mnuSnes30Controller = new System.Windows.Forms.ToolStripMenuItem(); this.mnuSnes30Layout1 = new System.Windows.Forms.ToolStripMenuItem(); this.mnuSnes30Layout2 = new System.Windows.Forms.ToolStripMenuItem(); - this.pnlHint = new System.Windows.Forms.Panel(); - this.flpHint = new System.Windows.Forms.FlowLayoutPanel(); - this.picHint = new System.Windows.Forms.PictureBox(); - this.lblHint = new System.Windows.Forms.Label(); this.baseConfigPanel.SuspendLayout(); this.tabMain.SuspendLayout(); this.tpgSet1.SuspendLayout(); @@ -78,10 +78,10 @@ this.tableLayoutPanel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.trkTurboSpeed)).BeginInit(); this.panel1.SuspendLayout(); - this.mnuStripPreset.SuspendLayout(); this.pnlHint.SuspendLayout(); this.flpHint.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.picHint)).BeginInit(); + this.mnuStripPreset.SuspendLayout(); this.SuspendLayout(); // // baseConfigPanel @@ -97,7 +97,7 @@ this.ctrlStandardController0.Location = new System.Drawing.Point(0, 0); this.ctrlStandardController0.Margin = new System.Windows.Forms.Padding(0); this.ctrlStandardController0.Name = "ctrlStandardController0"; - this.ctrlStandardController0.Size = new System.Drawing.Size(585, 197); + this.ctrlStandardController0.Size = new System.Drawing.Size(585, 209); this.ctrlStandardController0.TabIndex = 0; this.ctrlStandardController0.OnChange += new System.EventHandler(this.ctrlStandardController_OnChange); // @@ -121,7 +121,7 @@ this.tpgSet1.Controls.Add(this.ctrlStandardController0); this.tpgSet1.Location = new System.Drawing.Point(4, 23); this.tpgSet1.Name = "tpgSet1"; - this.tpgSet1.Size = new System.Drawing.Size(585, 197); + this.tpgSet1.Size = new System.Drawing.Size(585, 209); this.tpgSet1.TabIndex = 0; this.tpgSet1.Text = "Key Set #1"; this.tpgSet1.UseVisualStyleBackColor = true; @@ -131,7 +131,7 @@ this.tpgSet2.Controls.Add(this.ctrlStandardController1); this.tpgSet2.Location = new System.Drawing.Point(4, 23); this.tpgSet2.Name = "tpgSet2"; - this.tpgSet2.Size = new System.Drawing.Size(585, 208); + this.tpgSet2.Size = new System.Drawing.Size(585, 209); this.tpgSet2.TabIndex = 1; this.tpgSet2.Text = "Key Set #2"; this.tpgSet2.UseVisualStyleBackColor = true; @@ -142,7 +142,7 @@ this.ctrlStandardController1.Location = new System.Drawing.Point(0, 0); this.ctrlStandardController1.Margin = new System.Windows.Forms.Padding(0); this.ctrlStandardController1.Name = "ctrlStandardController1"; - this.ctrlStandardController1.Size = new System.Drawing.Size(585, 208); + this.ctrlStandardController1.Size = new System.Drawing.Size(585, 209); this.ctrlStandardController1.TabIndex = 1; this.ctrlStandardController1.OnChange += new System.EventHandler(this.ctrlStandardController_OnChange); // @@ -151,7 +151,7 @@ this.tpgSet3.Controls.Add(this.ctrlStandardController2); this.tpgSet3.Location = new System.Drawing.Point(4, 23); this.tpgSet3.Name = "tpgSet3"; - this.tpgSet3.Size = new System.Drawing.Size(585, 208); + this.tpgSet3.Size = new System.Drawing.Size(585, 209); this.tpgSet3.TabIndex = 2; this.tpgSet3.Text = "Key Set #3"; this.tpgSet3.UseVisualStyleBackColor = true; @@ -162,7 +162,7 @@ this.ctrlStandardController2.Location = new System.Drawing.Point(0, 0); this.ctrlStandardController2.Margin = new System.Windows.Forms.Padding(0); this.ctrlStandardController2.Name = "ctrlStandardController2"; - this.ctrlStandardController2.Size = new System.Drawing.Size(585, 208); + this.ctrlStandardController2.Size = new System.Drawing.Size(585, 209); this.ctrlStandardController2.TabIndex = 1; this.ctrlStandardController2.OnChange += new System.EventHandler(this.ctrlStandardController_OnChange); // @@ -299,6 +299,52 @@ this.lblSlow.Size = new System.Drawing.Size(30, 13); this.lblSlow.TabIndex = 0; this.lblSlow.Text = "Slow"; + // + // pnlHint + // + this.pnlHint.BackColor = System.Drawing.Color.WhiteSmoke; + this.pnlHint.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.tableLayoutPanel1.SetColumnSpan(this.pnlHint, 3); + this.pnlHint.Controls.Add(this.flpHint); + this.pnlHint.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlHint.Location = new System.Drawing.Point(3, 3); + this.pnlHint.Name = "pnlHint"; + this.pnlHint.Size = new System.Drawing.Size(593, 29); + this.pnlHint.TabIndex = 5; + // + // flpHint + // + this.flpHint.Controls.Add(this.picHint); + this.flpHint.Controls.Add(this.lblHint); + this.flpHint.Dock = System.Windows.Forms.DockStyle.Fill; + this.flpHint.Location = new System.Drawing.Point(0, 0); + this.flpHint.Margin = new System.Windows.Forms.Padding(0); + this.flpHint.Name = "flpHint"; + this.flpHint.Size = new System.Drawing.Size(591, 27); + this.flpHint.TabIndex = 0; + // + // picHint + // + this.picHint.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.picHint.BackgroundImage = global::Mesen.GUI.Properties.Resources.Help; + this.picHint.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.picHint.Location = new System.Drawing.Point(3, 5); + this.picHint.Name = "picHint"; + this.picHint.Size = new System.Drawing.Size(16, 16); + this.picHint.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.picHint.TabIndex = 0; + this.picHint.TabStop = false; + // + // lblHint + // + this.lblHint.AutoSize = true; + this.lblHint.Dock = System.Windows.Forms.DockStyle.Fill; + this.lblHint.Location = new System.Drawing.Point(25, 0); + this.lblHint.Name = "lblHint"; + this.lblHint.Size = new System.Drawing.Size(403, 26); + this.lblHint.TabIndex = 1; + this.lblHint.Text = "Tabs with an icon contain key bindings for this player.\r\nEach button can be mappe" + + "d to up to 4 different keyboard keys or gamepad buttons."; // // mnuStripPreset // @@ -423,49 +469,6 @@ this.mnuSnes30Layout2.Size = new System.Drawing.Size(143, 22); this.mnuSnes30Layout2.Text = "Controller #2"; this.mnuSnes30Layout2.Click += new System.EventHandler(this.mnuSnes30Layout2_Click); - // - // pnlHint - // - this.pnlHint.BackColor = System.Drawing.Color.WhiteSmoke; - this.pnlHint.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.tableLayoutPanel1.SetColumnSpan(this.pnlHint, 3); - this.pnlHint.Controls.Add(this.flpHint); - this.pnlHint.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlHint.Location = new System.Drawing.Point(3, 3); - this.pnlHint.Name = "pnlHint"; - this.pnlHint.Size = new System.Drawing.Size(593, 29); - this.pnlHint.TabIndex = 5; - // - // flpHint - // - this.flpHint.Controls.Add(this.picHint); - this.flpHint.Controls.Add(this.lblHint); - this.flpHint.Dock = System.Windows.Forms.DockStyle.Fill; - this.flpHint.Location = new System.Drawing.Point(0, 0); - this.flpHint.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0); - this.flpHint.Name = "flpHint"; - this.flpHint.Size = new System.Drawing.Size(591, 27); - this.flpHint.TabIndex = 0; - // - // picHint - // - this.picHint.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.picHint.Image = global::Mesen.GUI.Properties.Resources.Help; - this.picHint.Location = new System.Drawing.Point(3, 5); - this.picHint.Name = "picHint"; - this.picHint.Size = new System.Drawing.Size(16, 16); - this.picHint.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; - this.picHint.TabIndex = 0; - this.picHint.TabStop = false; - // - // lblHint - // - this.lblHint.Location = new System.Drawing.Point(25, 0); - this.lblHint.Name = "lblHint"; - this.lblHint.Size = new System.Drawing.Size(520, 27); - this.lblHint.TabIndex = 1; - this.lblHint.Text = "Tabs with an icon contain key bindings for this player.\r\nEach button can be mappe" + - "d to up to 4 different keyboard keys or gamepad buttons."; // // frmControllerConfig // @@ -491,11 +494,11 @@ ((System.ComponentModel.ISupportInitialize)(this.trkTurboSpeed)).EndInit(); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); - this.mnuStripPreset.ResumeLayout(false); this.pnlHint.ResumeLayout(false); this.flpHint.ResumeLayout(false); this.flpHint.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.picHint)).EndInit(); + this.mnuStripPreset.ResumeLayout(false); this.ResumeLayout(false); } diff --git a/GUI.NET/Forms/Config/frmControllerConfig.resx b/GUI.NET/Forms/Config/frmControllerConfig.resx index b44781d9..4fc9039a 100644 --- a/GUI.NET/Forms/Config/frmControllerConfig.resx +++ b/GUI.NET/Forms/Config/frmControllerConfig.resx @@ -120,6 +120,15 @@ 17, 17 + + + + iVBORw0KGgoAAAANSUhEUgAAAAcAAAAGCAYAAAAPDoR2AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuNWWFMmUA + AAArSURBVBhXY/j//z9OjFUQhkEARGLHUBUYEmBxJCNQJFAkwRwkif///zMAAD5AXaOzoq98AAAAAElF + TkSuQmCC + + 242, 17 @@ -128,7 +137,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAK - CQAAAk1TRnQBSQFMAgEBAgEAATABAAEwAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CQAAAk1TRnQBSQFMAgEBAgEAATgBAAE4AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA @@ -167,15 +176,6 @@ ASsBUwFMMAAB9AGSBgABGgErAlIBTAErAVIBmTAAAf8B7AYAAf8CTAJSASsBTAH/OQAB/wGZAkwBmQH/ JAABQgFNAT4HAAE+AwABKAMAAUADAAEQAwABAQEAAQEFAAGAFwAD/0kAAccB/wYAAeMB/wYAAeABAQYA Af8B8QH4AQcEAAH/AfkB+AEHBAAB/wH5AfgBBwQAAv8B/AEPBAAL - - - - - - iVBORw0KGgoAAAANSUhEUgAAAAcAAAAGCAYAAAAPDoR2AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuNWWFMmUA - AAArSURBVBhXY/j//z9OjFUQhkEARGLHUBUYEmBxJCNQJFAkwRwkif///zMAAD5AXaOzoq98AAAAAElF - TkSuQmCC diff --git a/GUI.NET/Forms/Config/frmEmulationConfig.Designer.cs b/GUI.NET/Forms/Config/frmEmulationConfig.Designer.cs index b2bcacab..e187b82b 100644 --- a/GUI.NET/Forms/Config/frmEmulationConfig.Designer.cs +++ b/GUI.NET/Forms/Config/frmEmulationConfig.Designer.cs @@ -34,16 +34,16 @@ namespace Mesen.GUI.Forms.Config this.tpgGeneral = new System.Windows.Forms.TabPage(); this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel(); this.flowLayoutPanel9 = new System.Windows.Forms.FlowLayoutPanel(); - this.nudTurboSpeed = new System.Windows.Forms.NumericUpDown(); + this.nudTurboSpeed = new Mesen.GUI.Controls.MesenNumericUpDown(); this.lblTurboSpeedHint = new System.Windows.Forms.Label(); this.lblTurboSpeed = new System.Windows.Forms.Label(); this.flowLayoutPanel6 = new System.Windows.Forms.FlowLayoutPanel(); - this.nudEmulationSpeed = new System.Windows.Forms.NumericUpDown(); + this.nudEmulationSpeed = new Mesen.GUI.Controls.MesenNumericUpDown(); this.lblEmuSpeedHint = new System.Windows.Forms.Label(); this.lblEmulationSpeed = new System.Windows.Forms.Label(); this.lblRewindSpeed = new System.Windows.Forms.Label(); this.flowLayoutPanel10 = new System.Windows.Forms.FlowLayoutPanel(); - this.nudRewindSpeed = new System.Windows.Forms.NumericUpDown(); + this.nudRewindSpeed = new Mesen.GUI.Controls.MesenNumericUpDown(); this.lblRewindSpeedHint = new System.Windows.Forms.Label(); this.tpgAdvanced = new System.Windows.Forms.TabPage(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); @@ -59,6 +59,7 @@ namespace Mesen.GUI.Forms.Config this.chkUseNes101Hvc101Behavior = new System.Windows.Forms.CheckBox(); this.chkAllowInvalidInput = new Mesen.GUI.Controls.ctrlRiskyOption(); this.chkUseAlternativeMmc3Irq = new System.Windows.Forms.CheckBox(); + this.chkAdaptiveSpriteLimit = new System.Windows.Forms.CheckBox(); this.tpgOverclocking = new System.Windows.Forms.TabPage(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel(); @@ -71,14 +72,13 @@ namespace Mesen.GUI.Forms.Config this.lblEffectiveClockRateValuePal = new System.Windows.Forms.Label(); this.grpOverclocking = new System.Windows.Forms.GroupBox(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); - this.flowLayoutPanel5 = new System.Windows.Forms.FlowLayoutPanel(); this.lblClockRate = new System.Windows.Forms.Label(); - this.nudOverclockRate = new System.Windows.Forms.NumericUpDown(); + this.nudOverclockRate = new Mesen.GUI.Controls.MesenNumericUpDown(); this.lblClockRatePercent = new System.Windows.Forms.Label(); this.grpPpuTiming = new System.Windows.Forms.GroupBox(); this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel(); - this.nudExtraScanlinesAfterNmi = new System.Windows.Forms.NumericUpDown(); - this.nudExtraScanlinesBeforeNmi = new System.Windows.Forms.NumericUpDown(); + this.nudExtraScanlinesAfterNmi = new Mesen.GUI.Controls.MesenNumericUpDown(); + this.nudExtraScanlinesBeforeNmi = new Mesen.GUI.Controls.MesenNumericUpDown(); this.lblExtraScanlinesBeforeNmi = new System.Windows.Forms.Label(); this.lblExtraScanlinesAfterNmi = new System.Windows.Forms.Label(); this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); @@ -88,16 +88,12 @@ namespace Mesen.GUI.Forms.Config this.chkShowLagCounter = new System.Windows.Forms.CheckBox(); this.btnResetLagCounter = new System.Windows.Forms.Button(); this.tmrUpdateClockRate = new System.Windows.Forms.Timer(this.components); - this.chkAdaptiveSpriteLimit = new System.Windows.Forms.CheckBox(); this.tabMain.SuspendLayout(); this.tpgGeneral.SuspendLayout(); this.tableLayoutPanel4.SuspendLayout(); this.flowLayoutPanel9.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudTurboSpeed)).BeginInit(); this.flowLayoutPanel6.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudEmulationSpeed)).BeginInit(); this.flowLayoutPanel10.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudRewindSpeed)).BeginInit(); this.tpgAdvanced.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); this.flowLayoutPanel8.SuspendLayout(); @@ -107,12 +103,8 @@ namespace Mesen.GUI.Forms.Config this.flowLayoutPanel3.SuspendLayout(); this.grpOverclocking.SuspendLayout(); this.tableLayoutPanel2.SuspendLayout(); - this.flowLayoutPanel5.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudOverclockRate)).BeginInit(); this.grpPpuTiming.SuspendLayout(); this.tableLayoutPanel5.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudExtraScanlinesAfterNmi)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudExtraScanlinesBeforeNmi)).BeginInit(); this.flowLayoutPanel2.SuspendLayout(); this.flowLayoutPanel7.SuspendLayout(); this.SuspendLayout(); @@ -131,7 +123,7 @@ namespace Mesen.GUI.Forms.Config this.tabMain.Location = new System.Drawing.Point(0, 0); this.tabMain.Name = "tabMain"; this.tabMain.SelectedIndex = 0; - this.tabMain.Size = new System.Drawing.Size(533, 328); + this.tabMain.Size = new System.Drawing.Size(533, 299); this.tabMain.TabIndex = 2; // // tpgGeneral @@ -140,13 +132,14 @@ namespace Mesen.GUI.Forms.Config this.tpgGeneral.Location = new System.Drawing.Point(4, 22); this.tpgGeneral.Name = "tpgGeneral"; this.tpgGeneral.Padding = new System.Windows.Forms.Padding(3); - this.tpgGeneral.Size = new System.Drawing.Size(525, 302); + this.tpgGeneral.Size = new System.Drawing.Size(525, 273); this.tpgGeneral.TabIndex = 0; this.tpgGeneral.Text = "General"; this.tpgGeneral.UseVisualStyleBackColor = true; // // tableLayoutPanel4 // + this.tableLayoutPanel4.AutoSize = true; this.tableLayoutPanel4.ColumnCount = 2; this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); @@ -164,7 +157,7 @@ namespace Mesen.GUI.Forms.Config this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel4.Size = new System.Drawing.Size(519, 296); + this.tableLayoutPanel4.Size = new System.Drawing.Size(519, 267); this.tableLayoutPanel4.TabIndex = 0; // // flowLayoutPanel9 @@ -181,15 +174,31 @@ namespace Mesen.GUI.Forms.Config // // nudTurboSpeed // + this.nudTurboSpeed.DecimalPlaces = 0; + this.nudTurboSpeed.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); this.nudTurboSpeed.Location = new System.Drawing.Point(3, 3); this.nudTurboSpeed.Maximum = new decimal(new int[] { 5000, 0, 0, + 0}); + this.nudTurboSpeed.Minimum = new decimal(new int[] { + 0, + 0, + 0, 0}); this.nudTurboSpeed.Name = "nudTurboSpeed"; this.nudTurboSpeed.Size = new System.Drawing.Size(48, 20); this.nudTurboSpeed.TabIndex = 1; + this.nudTurboSpeed.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); // // lblTurboSpeedHint // @@ -225,15 +234,31 @@ namespace Mesen.GUI.Forms.Config // // nudEmulationSpeed // + this.nudEmulationSpeed.DecimalPlaces = 0; + this.nudEmulationSpeed.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); this.nudEmulationSpeed.Location = new System.Drawing.Point(3, 3); this.nudEmulationSpeed.Maximum = new decimal(new int[] { 5000, 0, 0, + 0}); + this.nudEmulationSpeed.Minimum = new decimal(new int[] { + 0, + 0, + 0, 0}); this.nudEmulationSpeed.Name = "nudEmulationSpeed"; this.nudEmulationSpeed.Size = new System.Drawing.Size(48, 20); this.nudEmulationSpeed.TabIndex = 1; + this.nudEmulationSpeed.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); // // lblEmuSpeedHint // @@ -279,15 +304,31 @@ namespace Mesen.GUI.Forms.Config // // nudRewindSpeed // + this.nudRewindSpeed.DecimalPlaces = 0; + this.nudRewindSpeed.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); this.nudRewindSpeed.Location = new System.Drawing.Point(3, 3); this.nudRewindSpeed.Maximum = new decimal(new int[] { 5000, 0, 0, + 0}); + this.nudRewindSpeed.Minimum = new decimal(new int[] { + 0, + 0, + 0, 0}); this.nudRewindSpeed.Name = "nudRewindSpeed"; this.nudRewindSpeed.Size = new System.Drawing.Size(48, 20); this.nudRewindSpeed.TabIndex = 1; + this.nudRewindSpeed.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); // // lblRewindSpeedHint // @@ -305,7 +346,7 @@ namespace Mesen.GUI.Forms.Config this.tpgAdvanced.Location = new System.Drawing.Point(4, 22); this.tpgAdvanced.Name = "tpgAdvanced"; this.tpgAdvanced.Padding = new System.Windows.Forms.Padding(3); - this.tpgAdvanced.Size = new System.Drawing.Size(525, 302); + this.tpgAdvanced.Size = new System.Drawing.Size(525, 273); this.tpgAdvanced.TabIndex = 1; this.tpgAdvanced.Text = "Advanced"; this.tpgAdvanced.UseVisualStyleBackColor = true; @@ -341,7 +382,7 @@ namespace Mesen.GUI.Forms.Config this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); 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(519, 296); + this.tableLayoutPanel1.Size = new System.Drawing.Size(519, 267); this.tableLayoutPanel1.TabIndex = 0; // // chkEnableOamDecay @@ -466,19 +507,33 @@ namespace Mesen.GUI.Forms.Config this.chkUseAlternativeMmc3Irq.Text = "Use alternative MMC3 IRQ behavior"; this.chkUseAlternativeMmc3Irq.UseVisualStyleBackColor = true; // + // chkAdaptiveSpriteLimit + // + this.chkAdaptiveSpriteLimit.AutoSize = true; + this.chkAdaptiveSpriteLimit.Enabled = false; + this.chkAdaptiveSpriteLimit.Location = new System.Drawing.Point(18, 26); + this.chkAdaptiveSpriteLimit.Margin = new System.Windows.Forms.Padding(18, 3, 3, 3); + this.chkAdaptiveSpriteLimit.Name = "chkAdaptiveSpriteLimit"; + this.chkAdaptiveSpriteLimit.Size = new System.Drawing.Size(442, 17); + this.chkAdaptiveSpriteLimit.TabIndex = 10; + this.chkAdaptiveSpriteLimit.Text = "Automatically re-enable sprite limit as needed to prevent graphical glitches when" + + " possible"; + this.chkAdaptiveSpriteLimit.UseVisualStyleBackColor = true; + // // tpgOverclocking // this.tpgOverclocking.Controls.Add(this.tableLayoutPanel3); this.tpgOverclocking.Location = new System.Drawing.Point(4, 22); this.tpgOverclocking.Name = "tpgOverclocking"; this.tpgOverclocking.Padding = new System.Windows.Forms.Padding(3); - this.tpgOverclocking.Size = new System.Drawing.Size(525, 302); + this.tpgOverclocking.Size = new System.Drawing.Size(525, 273); this.tpgOverclocking.TabIndex = 2; this.tpgOverclocking.Text = "Overclocking"; this.tpgOverclocking.UseVisualStyleBackColor = true; // // tableLayoutPanel3 // + this.tableLayoutPanel3.AutoSize = true; this.tableLayoutPanel3.ColumnCount = 1; this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel3.Controls.Add(this.flowLayoutPanel4, 0, 5); @@ -498,10 +553,10 @@ namespace Mesen.GUI.Forms.Config this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel3.Size = new System.Drawing.Size(519, 296); + this.tableLayoutPanel3.Size = new System.Drawing.Size(519, 267); this.tableLayoutPanel3.TabIndex = 0; // // flowLayoutPanel4 @@ -509,7 +564,7 @@ namespace Mesen.GUI.Forms.Config this.flowLayoutPanel4.Controls.Add(this.lblEffectiveClockRateDendy); this.flowLayoutPanel4.Controls.Add(this.lblEffectiveClockRateValueDendy); this.flowLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel4.Location = new System.Drawing.Point(0, 189); + this.flowLayoutPanel4.Location = new System.Drawing.Point(0, 185); this.flowLayoutPanel4.Margin = new System.Windows.Forms.Padding(0); this.flowLayoutPanel4.Name = "flowLayoutPanel4"; this.flowLayoutPanel4.Size = new System.Drawing.Size(519, 20); @@ -548,7 +603,7 @@ namespace Mesen.GUI.Forms.Config // chkOverclockAdjustApu // this.chkOverclockAdjustApu.AutoSize = true; - this.chkOverclockAdjustApu.Location = new System.Drawing.Point(3, 212); + this.chkOverclockAdjustApu.Location = new System.Drawing.Point(3, 208); this.chkOverclockAdjustApu.Name = "chkOverclockAdjustApu"; this.chkOverclockAdjustApu.Size = new System.Drawing.Size(401, 17); this.chkOverclockAdjustApu.TabIndex = 10; @@ -560,7 +615,7 @@ namespace Mesen.GUI.Forms.Config this.flowLayoutPanel3.Controls.Add(this.lblEffectiveClockRatePal); this.flowLayoutPanel3.Controls.Add(this.lblEffectiveClockRateValuePal); this.flowLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel3.Location = new System.Drawing.Point(0, 172); + this.flowLayoutPanel3.Location = new System.Drawing.Point(0, 168); this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(0); this.flowLayoutPanel3.Name = "flowLayoutPanel3"; this.flowLayoutPanel3.Size = new System.Drawing.Size(519, 17); @@ -587,6 +642,7 @@ namespace Mesen.GUI.Forms.Config // // grpOverclocking // + this.grpOverclocking.AutoSize = true; this.grpOverclocking.Controls.Add(this.tableLayoutPanel2); this.grpOverclocking.Dock = System.Windows.Forms.DockStyle.Fill; this.grpOverclocking.Location = new System.Drawing.Point(3, 26); @@ -598,33 +654,24 @@ namespace Mesen.GUI.Forms.Config // // tableLayoutPanel2 // - this.tableLayoutPanel2.ColumnCount = 1; + this.tableLayoutPanel2.AutoSize = true; + this.tableLayoutPanel2.ColumnCount = 4; + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel2.Controls.Add(this.flowLayoutPanel5, 0, 0); + this.tableLayoutPanel2.Controls.Add(this.lblClockRate, 0, 0); + this.tableLayoutPanel2.Controls.Add(this.nudOverclockRate, 1, 0); + this.tableLayoutPanel2.Controls.Add(this.lblClockRatePercent, 2, 0); this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 16); this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(0); this.tableLayoutPanel2.Name = "tableLayoutPanel2"; - this.tableLayoutPanel2.RowCount = 2; + this.tableLayoutPanel2.RowCount = 1; this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel2.Size = new System.Drawing.Size(507, 26); this.tableLayoutPanel2.TabIndex = 0; // - // flowLayoutPanel5 - // - this.flowLayoutPanel5.Controls.Add(this.lblClockRate); - this.flowLayoutPanel5.Controls.Add(this.nudOverclockRate); - this.flowLayoutPanel5.Controls.Add(this.lblClockRatePercent); - this.flowLayoutPanel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel5.Location = new System.Drawing.Point(0, 0); - this.flowLayoutPanel5.Margin = new System.Windows.Forms.Padding(0); - this.flowLayoutPanel5.Name = "flowLayoutPanel5"; - this.flowLayoutPanel5.Size = new System.Drawing.Size(507, 25); - this.flowLayoutPanel5.TabIndex = 1; - // // lblClockRate // this.lblClockRate.Anchor = System.Windows.Forms.AnchorStyles.Left; @@ -638,6 +685,12 @@ namespace Mesen.GUI.Forms.Config // // nudOverclockRate // + this.nudOverclockRate.DecimalPlaces = 0; + this.nudOverclockRate.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); this.nudOverclockRate.Location = new System.Drawing.Point(110, 3); this.nudOverclockRate.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.nudOverclockRate.Maximum = new decimal(new int[] { @@ -673,17 +726,19 @@ namespace Mesen.GUI.Forms.Config // // grpPpuTiming // + this.grpPpuTiming.AutoSize = true; this.grpPpuTiming.Controls.Add(this.tableLayoutPanel5); this.grpPpuTiming.Dock = System.Windows.Forms.DockStyle.Fill; this.grpPpuTiming.Location = new System.Drawing.Point(3, 77); this.grpPpuTiming.Name = "grpPpuTiming"; - this.grpPpuTiming.Size = new System.Drawing.Size(513, 75); + this.grpPpuTiming.Size = new System.Drawing.Size(513, 71); this.grpPpuTiming.TabIndex = 7; this.grpPpuTiming.TabStop = false; this.grpPpuTiming.Text = "PPU Vertical Blank Configuration"; // // tableLayoutPanel5 // + this.tableLayoutPanel5.AutoSize = true; this.tableLayoutPanel5.ColumnCount = 2; this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); @@ -698,17 +753,28 @@ namespace Mesen.GUI.Forms.Config this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel5.Size = new System.Drawing.Size(507, 56); + this.tableLayoutPanel5.Size = new System.Drawing.Size(507, 52); this.tableLayoutPanel5.TabIndex = 0; // // nudExtraScanlinesAfterNmi // - this.nudExtraScanlinesAfterNmi.Location = new System.Drawing.Point(171, 29); + this.nudExtraScanlinesAfterNmi.DecimalPlaces = 0; + this.nudExtraScanlinesAfterNmi.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nudExtraScanlinesAfterNmi.Location = new System.Drawing.Point(165, 29); this.nudExtraScanlinesAfterNmi.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.nudExtraScanlinesAfterNmi.Maximum = new decimal(new int[] { 1000, 0, 0, + 0}); + this.nudExtraScanlinesAfterNmi.Minimum = new decimal(new int[] { + 0, + 0, + 0, 0}); this.nudExtraScanlinesAfterNmi.Name = "nudExtraScanlinesAfterNmi"; this.nudExtraScanlinesAfterNmi.Size = new System.Drawing.Size(46, 20); @@ -722,12 +788,23 @@ namespace Mesen.GUI.Forms.Config // // nudExtraScanlinesBeforeNmi // - this.nudExtraScanlinesBeforeNmi.Location = new System.Drawing.Point(171, 3); + this.nudExtraScanlinesBeforeNmi.DecimalPlaces = 0; + this.nudExtraScanlinesBeforeNmi.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nudExtraScanlinesBeforeNmi.Location = new System.Drawing.Point(165, 3); this.nudExtraScanlinesBeforeNmi.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.nudExtraScanlinesBeforeNmi.Maximum = new decimal(new int[] { 1000, 0, 0, + 0}); + this.nudExtraScanlinesBeforeNmi.Minimum = new decimal(new int[] { + 0, + 0, + 0, 0}); this.nudExtraScanlinesBeforeNmi.Name = "nudExtraScanlinesBeforeNmi"; this.nudExtraScanlinesBeforeNmi.Size = new System.Drawing.Size(46, 20); @@ -745,7 +822,7 @@ namespace Mesen.GUI.Forms.Config this.lblExtraScanlinesBeforeNmi.AutoSize = true; this.lblExtraScanlinesBeforeNmi.Location = new System.Drawing.Point(3, 6); this.lblExtraScanlinesBeforeNmi.Name = "lblExtraScanlinesBeforeNmi"; - this.lblExtraScanlinesBeforeNmi.Size = new System.Drawing.Size(165, 13); + this.lblExtraScanlinesBeforeNmi.Size = new System.Drawing.Size(159, 13); this.lblExtraScanlinesBeforeNmi.TabIndex = 0; this.lblExtraScanlinesBeforeNmi.Text = "Additional scanlines before NMI:"; // @@ -755,7 +832,7 @@ namespace Mesen.GUI.Forms.Config this.lblExtraScanlinesAfterNmi.AutoSize = true; this.lblExtraScanlinesAfterNmi.Location = new System.Drawing.Point(3, 32); this.lblExtraScanlinesAfterNmi.Name = "lblExtraScanlinesAfterNmi"; - this.lblExtraScanlinesAfterNmi.Size = new System.Drawing.Size(156, 13); + this.lblExtraScanlinesAfterNmi.Size = new System.Drawing.Size(150, 13); this.lblExtraScanlinesAfterNmi.TabIndex = 1; this.lblExtraScanlinesAfterNmi.Text = "Additional scanlines after NMI:"; // @@ -764,7 +841,7 @@ namespace Mesen.GUI.Forms.Config this.flowLayoutPanel2.Controls.Add(this.lblEffectiveClockRate); this.flowLayoutPanel2.Controls.Add(this.lblEffectiveClockRateValue); this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel2.Location = new System.Drawing.Point(0, 155); + this.flowLayoutPanel2.Location = new System.Drawing.Point(0, 151); this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0); this.flowLayoutPanel2.Name = "flowLayoutPanel2"; this.flowLayoutPanel2.Size = new System.Drawing.Size(519, 17); @@ -794,10 +871,10 @@ namespace Mesen.GUI.Forms.Config this.flowLayoutPanel7.Controls.Add(this.chkShowLagCounter); this.flowLayoutPanel7.Controls.Add(this.btnResetLagCounter); this.flowLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel7.Location = new System.Drawing.Point(0, 232); + this.flowLayoutPanel7.Location = new System.Drawing.Point(0, 228); this.flowLayoutPanel7.Margin = new System.Windows.Forms.Padding(0); this.flowLayoutPanel7.Name = "flowLayoutPanel7"; - this.flowLayoutPanel7.Size = new System.Drawing.Size(519, 64); + this.flowLayoutPanel7.Size = new System.Drawing.Size(519, 39); this.flowLayoutPanel7.TabIndex = 12; // // chkShowLagCounter @@ -827,23 +904,11 @@ namespace Mesen.GUI.Forms.Config this.tmrUpdateClockRate.Enabled = true; this.tmrUpdateClockRate.Tick += new System.EventHandler(this.tmrUpdateClockRate_Tick); // - // chkAdaptiveSpriteLimit - // - this.chkAdaptiveSpriteLimit.AutoSize = true; - this.chkAdaptiveSpriteLimit.Enabled = false; - this.chkAdaptiveSpriteLimit.Location = new System.Drawing.Point(18, 26); - this.chkAdaptiveSpriteLimit.Margin = new System.Windows.Forms.Padding(18, 3, 3, 3); - this.chkAdaptiveSpriteLimit.Name = "chkAdaptiveSpriteLimit"; - this.chkAdaptiveSpriteLimit.Size = new System.Drawing.Size(442, 17); - this.chkAdaptiveSpriteLimit.TabIndex = 10; - this.chkAdaptiveSpriteLimit.Text = "Automatically re-enable sprite limit as needed to prevent graphical glitches when" + - " possible"; - this.chkAdaptiveSpriteLimit.UseVisualStyleBackColor = true; - // // frmEmulationConfig // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoSize = true; this.ClientSize = new System.Drawing.Size(533, 328); this.Controls.Add(this.tabMain); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; @@ -853,27 +918,26 @@ namespace Mesen.GUI.Forms.Config this.Name = "frmEmulationConfig"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Emulation Settings"; - this.Controls.SetChildIndex(this.tabMain, 0); this.Controls.SetChildIndex(this.baseConfigPanel, 0); + this.Controls.SetChildIndex(this.tabMain, 0); this.tabMain.ResumeLayout(false); this.tpgGeneral.ResumeLayout(false); + this.tpgGeneral.PerformLayout(); this.tableLayoutPanel4.ResumeLayout(false); this.tableLayoutPanel4.PerformLayout(); this.flowLayoutPanel9.ResumeLayout(false); this.flowLayoutPanel9.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudTurboSpeed)).EndInit(); this.flowLayoutPanel6.ResumeLayout(false); this.flowLayoutPanel6.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudEmulationSpeed)).EndInit(); this.flowLayoutPanel10.ResumeLayout(false); this.flowLayoutPanel10.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudRewindSpeed)).EndInit(); this.tpgAdvanced.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.PerformLayout(); this.flowLayoutPanel8.ResumeLayout(false); this.flowLayoutPanel8.PerformLayout(); this.tpgOverclocking.ResumeLayout(false); + this.tpgOverclocking.PerformLayout(); this.tableLayoutPanel3.ResumeLayout(false); this.tableLayoutPanel3.PerformLayout(); this.flowLayoutPanel4.ResumeLayout(false); @@ -881,15 +945,13 @@ namespace Mesen.GUI.Forms.Config this.flowLayoutPanel3.ResumeLayout(false); this.flowLayoutPanel3.PerformLayout(); this.grpOverclocking.ResumeLayout(false); + this.grpOverclocking.PerformLayout(); this.tableLayoutPanel2.ResumeLayout(false); - this.flowLayoutPanel5.ResumeLayout(false); - this.flowLayoutPanel5.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudOverclockRate)).EndInit(); + this.tableLayoutPanel2.PerformLayout(); this.grpPpuTiming.ResumeLayout(false); + this.grpPpuTiming.PerformLayout(); this.tableLayoutPanel5.ResumeLayout(false); this.tableLayoutPanel5.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudExtraScanlinesAfterNmi)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudExtraScanlinesBeforeNmi)).EndInit(); this.flowLayoutPanel2.ResumeLayout(false); this.flowLayoutPanel2.PerformLayout(); this.flowLayoutPanel7.ResumeLayout(false); @@ -911,19 +973,18 @@ namespace Mesen.GUI.Forms.Config private System.Windows.Forms.GroupBox grpOverclocking; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private System.Windows.Forms.Label lblOverclockWarning; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel5; private System.Windows.Forms.Label lblClockRate; - private System.Windows.Forms.NumericUpDown nudOverclockRate; + private MesenNumericUpDown nudOverclockRate; private System.Windows.Forms.Label lblClockRatePercent; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel6; - private System.Windows.Forms.NumericUpDown nudEmulationSpeed; + private MesenNumericUpDown nudEmulationSpeed; private System.Windows.Forms.Label lblEmuSpeedHint; private System.Windows.Forms.Label lblEmulationSpeed; private System.Windows.Forms.GroupBox grpPpuTiming; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel5; - private System.Windows.Forms.NumericUpDown nudExtraScanlinesAfterNmi; - private System.Windows.Forms.NumericUpDown nudExtraScanlinesBeforeNmi; + private MesenNumericUpDown nudExtraScanlinesAfterNmi; + private MesenNumericUpDown nudExtraScanlinesBeforeNmi; private System.Windows.Forms.Label lblExtraScanlinesBeforeNmi; private System.Windows.Forms.Label lblExtraScanlinesAfterNmi; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; @@ -944,7 +1005,7 @@ namespace Mesen.GUI.Forms.Config private System.Windows.Forms.Label lblRamPowerOnState; private System.Windows.Forms.ComboBox cboRamPowerOnState; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel9; - private System.Windows.Forms.NumericUpDown nudTurboSpeed; + private MesenNumericUpDown nudTurboSpeed; private System.Windows.Forms.Label lblTurboSpeed; private System.Windows.Forms.Label lblTurboSpeedHint; private ctrlRiskyOption chkDisablePpu2004Reads; @@ -955,7 +1016,7 @@ namespace Mesen.GUI.Forms.Config private Mesen.GUI.Controls.ctrlRiskyOption chkEnableOamDecay; private System.Windows.Forms.Label lblRewindSpeed; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel10; - private System.Windows.Forms.NumericUpDown nudRewindSpeed; + private MesenNumericUpDown nudRewindSpeed; private System.Windows.Forms.Label lblRewindSpeedHint; private System.Windows.Forms.CheckBox chkAdaptiveSpriteLimit; } diff --git a/GUI.NET/Forms/Config/frmEmulationConfig.cs b/GUI.NET/Forms/Config/frmEmulationConfig.cs index 4c599976..a010339c 100644 --- a/GUI.NET/Forms/Config/frmEmulationConfig.cs +++ b/GUI.NET/Forms/Config/frmEmulationConfig.cs @@ -72,7 +72,7 @@ namespace Mesen.GUI.Forms.Config nudExtraScanlinesBeforeNmi.Value = 0; } if(string.IsNullOrWhiteSpace(nudOverclockRate.Text)) { - nudOverclockRate.Value = 0; + nudOverclockRate.Value = 100; } } diff --git a/GUI.NET/Forms/Config/frmGetKey.Designer.cs b/GUI.NET/Forms/Config/frmGetKey.Designer.cs index ecdd946f..19d05b10 100644 --- a/GUI.NET/Forms/Config/frmGetKey.Designer.cs +++ b/GUI.NET/Forms/Config/frmGetKey.Designer.cs @@ -29,41 +29,63 @@ { this.components = new System.ComponentModel.Container(); this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.lblCurrentKeys = new System.Windows.Forms.Label(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.lblSetKeyMessage = new System.Windows.Forms.Label(); + this.lblCurrentKeys = new System.Windows.Forms.Label(); this.tmrCheckKey = new System.Windows.Forms.Timer(this.components); this.groupBox1.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // // groupBox1 // - this.groupBox1.Controls.Add(this.lblSetKeyMessage); - this.groupBox1.Controls.Add(this.lblCurrentKeys); - this.groupBox1.Location = new System.Drawing.Point(4, -1); + this.groupBox1.AutoSize = true; + this.groupBox1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.groupBox1.Controls.Add(this.tableLayoutPanel1); + this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox1.Location = new System.Drawing.Point(3, 0); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(369, 102); + this.groupBox1.Size = new System.Drawing.Size(391, 105); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; // - // lblCurrentKeys + // tableLayoutPanel1 // - this.lblCurrentKeys.Dock = System.Windows.Forms.DockStyle.Bottom; - this.lblCurrentKeys.Location = new System.Drawing.Point(3, 55); - this.lblCurrentKeys.Name = "lblCurrentKeys"; - this.lblCurrentKeys.Size = new System.Drawing.Size(363, 44); - this.lblCurrentKeys.TabIndex = 1; - this.lblCurrentKeys.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.tableLayoutPanel1.AutoSize = true; + this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.tableLayoutPanel1.ColumnCount = 1; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.Controls.Add(this.lblSetKeyMessage, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.lblCurrentKeys, 0, 1); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 16); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 2; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(385, 86); + this.tableLayoutPanel1.TabIndex = 2; // // lblSetKeyMessage // + this.lblSetKeyMessage.AutoSize = true; this.lblSetKeyMessage.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblSetKeyMessage.Location = new System.Drawing.Point(3, 16); + this.lblSetKeyMessage.Location = new System.Drawing.Point(3, 0); this.lblSetKeyMessage.Name = "lblSetKeyMessage"; - this.lblSetKeyMessage.Size = new System.Drawing.Size(363, 39); + this.lblSetKeyMessage.Size = new System.Drawing.Size(379, 43); this.lblSetKeyMessage.TabIndex = 0; this.lblSetKeyMessage.Text = "Press any key on your keyboard or controller to set a new binding."; this.lblSetKeyMessage.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // + // lblCurrentKeys + // + this.lblCurrentKeys.Dock = System.Windows.Forms.DockStyle.Fill; + this.lblCurrentKeys.Location = new System.Drawing.Point(3, 43); + this.lblCurrentKeys.Name = "lblCurrentKeys"; + this.lblCurrentKeys.Size = new System.Drawing.Size(379, 43); + this.lblCurrentKeys.TabIndex = 1; + this.lblCurrentKeys.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // // tmrCheckKey // this.tmrCheckKey.Enabled = true; @@ -74,14 +96,19 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(377, 104); + this.ClientSize = new System.Drawing.Size(397, 108); this.Controls.Add(this.groupBox1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.Name = "frmGetKey"; + this.Padding = new System.Windows.Forms.Padding(3, 0, 3, 3); this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Set key binding..."; this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel1.PerformLayout(); this.ResumeLayout(false); + this.PerformLayout(); } @@ -91,5 +118,6 @@ private System.Windows.Forms.Label lblSetKeyMessage; private System.Windows.Forms.Timer tmrCheckKey; private System.Windows.Forms.Label lblCurrentKeys; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; } } \ No newline at end of file diff --git a/GUI.NET/Forms/Config/frmGetKey.cs b/GUI.NET/Forms/Config/frmGetKey.cs index ffaf0f49..3ec61611 100644 --- a/GUI.NET/Forms/Config/frmGetKey.cs +++ b/GUI.NET/Forms/Config/frmGetKey.cs @@ -18,12 +18,15 @@ namespace Mesen.GUI.Forms.Config const int WM_SYSKEYUP = 0x105; private bool _singleKeyMode = false; - private string[] _invalidKeys = new string[] { "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12" }; public frmGetKey(bool singleKeyMode) { InitializeComponent(); _singleKeyMode = singleKeyMode; + if(_singleKeyMode) { + tableLayoutPanel1.RowStyles[1].SizeType = SizeType.Absolute; + tableLayoutPanel1.RowStyles[1].Height = 0; + } if(_singleKeyMode) { lblCurrentKeys.Height = 1; lblCurrentKeys.Visible = false; diff --git a/GUI.NET/Forms/Config/frmPreferences.Designer.cs b/GUI.NET/Forms/Config/frmPreferences.Designer.cs index 28e02e3e..26097d2a 100644 --- a/GUI.NET/Forms/Config/frmPreferences.Designer.cs +++ b/GUI.NET/Forms/Config/frmPreferences.Designer.cs @@ -76,17 +76,17 @@ namespace Mesen.GUI.Forms.Config this.chkAutoSaveNotify = new System.Windows.Forms.CheckBox(); this.flpAutoSave = new System.Windows.Forms.FlowLayoutPanel(); this.chkAutoSave = new System.Windows.Forms.CheckBox(); - this.nudAutoSave = new System.Windows.Forms.NumericUpDown(); + this.nudAutoSave = new Mesen.GUI.Controls.MesenNumericUpDown(); this.lblAutoSave = new System.Windows.Forms.Label(); this.tpgNsf = new System.Windows.Forms.TabPage(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.flowLayoutPanel7 = new System.Windows.Forms.FlowLayoutPanel(); this.chkNsfAutoDetectSilence = new System.Windows.Forms.CheckBox(); - this.nudNsfAutoDetectSilenceDelay = new System.Windows.Forms.NumericUpDown(); + this.nudNsfAutoDetectSilenceDelay = new Mesen.GUI.Controls.MesenNumericUpDown(); this.lblNsfMillisecondsOfSilence = new System.Windows.Forms.Label(); this.flowLayoutPanel5 = new System.Windows.Forms.FlowLayoutPanel(); this.chkNsfMoveToNextTrackAfterTime = new System.Windows.Forms.CheckBox(); - this.nudNsfMoveToNextTrackTime = new System.Windows.Forms.NumericUpDown(); + this.nudNsfMoveToNextTrackTime = new Mesen.GUI.Controls.MesenNumericUpDown(); this.lblNsfSeconds = new System.Windows.Forms.Label(); this.chkNsfDisableApuIrqs = new System.Windows.Forms.CheckBox(); this.tpgFiles = new System.Windows.Forms.TabPage(); @@ -133,7 +133,7 @@ namespace Mesen.GUI.Forms.Config this.chkDisplayTitleBarInfo = new System.Windows.Forms.CheckBox(); this.flowLayoutPanel6 = new System.Windows.Forms.FlowLayoutPanel(); this.lblRewind = new System.Windows.Forms.Label(); - this.nudRewindBufferSize = new System.Windows.Forms.NumericUpDown(); + this.nudRewindBufferSize = new Mesen.GUI.Controls.MesenNumericUpDown(); this.lblRewindMinutes = new System.Windows.Forms.Label(); this.chkFdsAutoInsertDisk = new System.Windows.Forms.CheckBox(); this.chkShowGameTimer = new System.Windows.Forms.CheckBox(); @@ -162,13 +162,10 @@ namespace Mesen.GUI.Forms.Config this.grpAutomaticSaves.SuspendLayout(); this.tableLayoutPanel4.SuspendLayout(); this.flpAutoSave.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudAutoSave)).BeginInit(); this.tpgNsf.SuspendLayout(); this.tableLayoutPanel2.SuspendLayout(); this.flowLayoutPanel7.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudNsfAutoDetectSilenceDelay)).BeginInit(); this.flowLayoutPanel5.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudNsfMoveToNextTrackTime)).BeginInit(); this.tpgFiles.SuspendLayout(); this.tableLayoutPanel6.SuspendLayout(); this.grpPathOverrides.SuspendLayout(); @@ -182,7 +179,6 @@ namespace Mesen.GUI.Forms.Config this.tpgAdvanced.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); this.flowLayoutPanel6.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudRewindBufferSize)).BeginInit(); this.SuspendLayout(); // // baseConfigPanel @@ -570,6 +566,7 @@ namespace Mesen.GUI.Forms.Config // // btnEnableIntegration // + this.btnEnableIntegration.AutoSize = true; this.btnEnableIntegration.Location = new System.Drawing.Point(3, 55); this.btnEnableIntegration.Name = "btnEnableIntegration"; this.btnEnableIntegration.Size = new System.Drawing.Size(172, 23); @@ -739,7 +736,7 @@ namespace Mesen.GUI.Forms.Config // this.chkAutoSave.Anchor = System.Windows.Forms.AnchorStyles.Left; this.chkAutoSave.AutoSize = true; - this.chkAutoSave.Location = new System.Drawing.Point(3, 4); + this.chkAutoSave.Location = new System.Drawing.Point(3, 3); this.chkAutoSave.Name = "chkAutoSave"; this.chkAutoSave.Size = new System.Drawing.Size(211, 17); this.chkAutoSave.TabIndex = 0; @@ -749,7 +746,9 @@ namespace Mesen.GUI.Forms.Config // // nudAutoSave // - this.nudAutoSave.Location = new System.Drawing.Point(220, 3); + this.nudAutoSave.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.nudAutoSave.Location = new System.Drawing.Point(217, 1); + this.nudAutoSave.Margin = new System.Windows.Forms.Padding(0); this.nudAutoSave.Maximum = new decimal(new int[] { 600, 0, @@ -773,7 +772,7 @@ namespace Mesen.GUI.Forms.Config // this.lblAutoSave.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblAutoSave.AutoSize = true; - this.lblAutoSave.Location = new System.Drawing.Point(268, 6); + this.lblAutoSave.Location = new System.Drawing.Point(262, 5); this.lblAutoSave.Name = "lblAutoSave"; this.lblAutoSave.Size = new System.Drawing.Size(99, 13); this.lblAutoSave.TabIndex = 2; @@ -823,7 +822,7 @@ namespace Mesen.GUI.Forms.Config // this.chkNsfAutoDetectSilence.Anchor = System.Windows.Forms.AnchorStyles.Left; this.chkNsfAutoDetectSilence.AutoSize = true; - this.chkNsfAutoDetectSilence.Location = new System.Drawing.Point(3, 4); + this.chkNsfAutoDetectSilence.Location = new System.Drawing.Point(3, 3); this.chkNsfAutoDetectSilence.Name = "chkNsfAutoDetectSilence"; this.chkNsfAutoDetectSilence.Size = new System.Drawing.Size(139, 17); this.chkNsfAutoDetectSilence.TabIndex = 1; @@ -832,8 +831,9 @@ namespace Mesen.GUI.Forms.Config // // nudNsfAutoDetectSilenceDelay // - this.nudNsfAutoDetectSilenceDelay.Location = new System.Drawing.Point(145, 3); - this.nudNsfAutoDetectSilenceDelay.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.nudNsfAutoDetectSilenceDelay.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.nudNsfAutoDetectSilenceDelay.Location = new System.Drawing.Point(145, 1); + this.nudNsfAutoDetectSilenceDelay.Margin = new System.Windows.Forms.Padding(0); this.nudNsfAutoDetectSilenceDelay.Maximum = new decimal(new int[] { 999999, 0, @@ -857,7 +857,7 @@ namespace Mesen.GUI.Forms.Config // this.lblNsfMillisecondsOfSilence.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblNsfMillisecondsOfSilence.AutoSize = true; - this.lblNsfMillisecondsOfSilence.Location = new System.Drawing.Point(205, 6); + this.lblNsfMillisecondsOfSilence.Location = new System.Drawing.Point(202, 5); this.lblNsfMillisecondsOfSilence.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0); this.lblNsfMillisecondsOfSilence.Name = "lblNsfMillisecondsOfSilence"; this.lblNsfMillisecondsOfSilence.Size = new System.Drawing.Size(111, 13); @@ -880,7 +880,7 @@ namespace Mesen.GUI.Forms.Config // this.chkNsfMoveToNextTrackAfterTime.Anchor = System.Windows.Forms.AnchorStyles.Left; this.chkNsfMoveToNextTrackAfterTime.AutoSize = true; - this.chkNsfMoveToNextTrackAfterTime.Location = new System.Drawing.Point(3, 4); + this.chkNsfMoveToNextTrackAfterTime.Location = new System.Drawing.Point(3, 3); this.chkNsfMoveToNextTrackAfterTime.Margin = new System.Windows.Forms.Padding(3, 3, 0, 3); this.chkNsfMoveToNextTrackAfterTime.Name = "chkNsfMoveToNextTrackAfterTime"; this.chkNsfMoveToNextTrackAfterTime.Size = new System.Drawing.Size(126, 17); @@ -890,8 +890,9 @@ namespace Mesen.GUI.Forms.Config // // nudNsfMoveToNextTrackTime // - this.nudNsfMoveToNextTrackTime.Location = new System.Drawing.Point(129, 3); - this.nudNsfMoveToNextTrackTime.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.nudNsfMoveToNextTrackTime.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.nudNsfMoveToNextTrackTime.Location = new System.Drawing.Point(129, 1); + this.nudNsfMoveToNextTrackTime.Margin = new System.Windows.Forms.Padding(0); this.nudNsfMoveToNextTrackTime.Maximum = new decimal(new int[] { 999, 0, @@ -915,7 +916,7 @@ namespace Mesen.GUI.Forms.Config // this.lblNsfSeconds.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblNsfSeconds.AutoSize = true; - this.lblNsfSeconds.Location = new System.Drawing.Point(176, 6); + this.lblNsfSeconds.Location = new System.Drawing.Point(173, 5); this.lblNsfSeconds.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0); this.lblNsfSeconds.Name = "lblNsfSeconds"; this.lblNsfSeconds.Size = new System.Drawing.Size(47, 13); @@ -1266,7 +1267,7 @@ namespace Mesen.GUI.Forms.Config this.chkNsfFormat.AutoSize = true; this.chkNsfFormat.Location = new System.Drawing.Point(238, 3); this.chkNsfFormat.Name = "chkNsfFormat"; - this.chkNsfFormat.Size = new System.Drawing.Size(171, 17); + this.chkNsfFormat.Size = new System.Drawing.Size(207, 17); this.chkNsfFormat.TabIndex = 14; this.chkNsfFormat.Text = ".NSF/.NSFE (Nintendo Sound Format)"; this.chkNsfFormat.UseVisualStyleBackColor = true; @@ -1276,7 +1277,7 @@ namespace Mesen.GUI.Forms.Config this.chkMstFormat.AutoSize = true; this.chkMstFormat.Location = new System.Drawing.Point(238, 26); this.chkMstFormat.Name = "chkMstFormat"; - this.chkMstFormat.Size = new System.Drawing.Size(226, 17); + this.chkMstFormat.Size = new System.Drawing.Size(149, 17); this.chkMstFormat.TabIndex = 15; this.chkMstFormat.Text = ".MST (Mesen Save State)"; this.chkMstFormat.UseVisualStyleBackColor = true; @@ -1525,7 +1526,7 @@ namespace Mesen.GUI.Forms.Config // this.lblRewind.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblRewind.AutoSize = true; - this.lblRewind.Location = new System.Drawing.Point(3, 6); + this.lblRewind.Location = new System.Drawing.Point(3, 3); this.lblRewind.Name = "lblRewind"; this.lblRewind.Size = new System.Drawing.Size(142, 13); this.lblRewind.TabIndex = 3; @@ -1533,7 +1534,9 @@ namespace Mesen.GUI.Forms.Config // // nudRewindBufferSize // - this.nudRewindBufferSize.Location = new System.Drawing.Point(151, 3); + this.nudRewindBufferSize.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.nudRewindBufferSize.Location = new System.Drawing.Point(148, 0); + this.nudRewindBufferSize.Margin = new System.Windows.Forms.Padding(0); this.nudRewindBufferSize.Maximum = new decimal(new int[] { 900, 0, @@ -1552,7 +1555,7 @@ namespace Mesen.GUI.Forms.Config // this.lblRewindMinutes.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblRewindMinutes.AutoSize = true; - this.lblRewindMinutes.Location = new System.Drawing.Point(199, 6); + this.lblRewindMinutes.Location = new System.Drawing.Point(193, 3); this.lblRewindMinutes.Name = "lblRewindMinutes"; this.lblRewindMinutes.Size = new System.Drawing.Size(175, 13); this.lblRewindMinutes.TabIndex = 2; @@ -1695,16 +1698,13 @@ namespace Mesen.GUI.Forms.Config this.tableLayoutPanel4.PerformLayout(); this.flpAutoSave.ResumeLayout(false); this.flpAutoSave.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudAutoSave)).EndInit(); this.tpgNsf.ResumeLayout(false); this.tableLayoutPanel2.ResumeLayout(false); this.tableLayoutPanel2.PerformLayout(); this.flowLayoutPanel7.ResumeLayout(false); this.flowLayoutPanel7.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudNsfAutoDetectSilenceDelay)).EndInit(); this.flowLayoutPanel5.ResumeLayout(false); this.flowLayoutPanel5.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudNsfMoveToNextTrackTime)).EndInit(); this.tpgFiles.ResumeLayout(false); this.tableLayoutPanel6.ResumeLayout(false); this.grpPathOverrides.ResumeLayout(false); @@ -1725,7 +1725,6 @@ namespace Mesen.GUI.Forms.Config this.tableLayoutPanel1.PerformLayout(); this.flowLayoutPanel6.ResumeLayout(false); this.flowLayoutPanel6.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudRewindBufferSize)).EndInit(); this.ResumeLayout(false); } @@ -1774,11 +1773,11 @@ namespace Mesen.GUI.Forms.Config private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel5; private System.Windows.Forms.CheckBox chkNsfMoveToNextTrackAfterTime; - private System.Windows.Forms.NumericUpDown nudNsfMoveToNextTrackTime; + private MesenNumericUpDown nudNsfMoveToNextTrackTime; private System.Windows.Forms.Label lblNsfSeconds; private System.Windows.Forms.CheckBox chkNsfAutoDetectSilence; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel7; - private System.Windows.Forms.NumericUpDown nudNsfAutoDetectSilenceDelay; + private MesenNumericUpDown nudNsfAutoDetectSilenceDelay; private System.Windows.Forms.Label lblNsfMillisecondsOfSilence; private System.Windows.Forms.CheckBox chkNsfDisableApuIrqs; private System.Windows.Forms.CheckBox chkUnfFormat; @@ -1788,7 +1787,7 @@ namespace Mesen.GUI.Forms.Config private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4; private System.Windows.Forms.FlowLayoutPanel flpAutoSave; private System.Windows.Forms.CheckBox chkAutoSave; - private System.Windows.Forms.NumericUpDown nudAutoSave; + private MesenNumericUpDown nudAutoSave; private System.Windows.Forms.Label lblAutoSave; private System.Windows.Forms.CheckBox chkAutoSaveNotify; private System.Windows.Forms.TabPage tpgShortcuts; @@ -1809,7 +1808,7 @@ namespace Mesen.GUI.Forms.Config private System.Windows.Forms.Button btnResetSettings; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel6; private System.Windows.Forms.Label lblRewind; - private System.Windows.Forms.NumericUpDown nudRewindBufferSize; + private MesenNumericUpDown nudRewindBufferSize; private System.Windows.Forms.Label lblRewindMinutes; private System.Windows.Forms.CheckBox chkShowVsConfigOnLoad; private System.Windows.Forms.CheckBox chkDisableOsd; diff --git a/GUI.NET/Forms/Config/frmVideoConfig.Designer.cs b/GUI.NET/Forms/Config/frmVideoConfig.Designer.cs index 3142dcda..eab3ca4d 100644 --- a/GUI.NET/Forms/Config/frmVideoConfig.Designer.cs +++ b/GUI.NET/Forms/Config/frmVideoConfig.Designer.cs @@ -38,11 +38,11 @@ namespace Mesen.GUI.Forms.Config this.flowLayoutPanel7 = new System.Windows.Forms.FlowLayoutPanel(); this.chkUseHdPacks = new System.Windows.Forms.CheckBox(); this.picHdNesTooltip = new System.Windows.Forms.PictureBox(); - this.nudScale = new System.Windows.Forms.NumericUpDown(); + this.nudScale = new Mesen.GUI.Controls.MesenNumericUpDown(); this.flowLayoutPanel6 = new System.Windows.Forms.FlowLayoutPanel(); this.cboAspectRatio = new System.Windows.Forms.ComboBox(); this.lblCustomRatio = new System.Windows.Forms.Label(); - this.nudCustomRatio = new System.Windows.Forms.NumericUpDown(); + this.nudCustomRatio = new Mesen.GUI.Controls.MesenNumericUpDown(); this.chkFullscreenForceIntegerScale = new System.Windows.Forms.CheckBox(); this.chkShowFps = new System.Windows.Forms.CheckBox(); this.tabMain = new System.Windows.Forms.TabControl(); @@ -83,16 +83,16 @@ namespace Mesen.GUI.Forms.Config this.picOverscan = new System.Windows.Forms.PictureBox(); this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel(); this.lblLeft = new System.Windows.Forms.Label(); - this.nudOverscanLeft = new System.Windows.Forms.NumericUpDown(); + this.nudOverscanLeft = new Mesen.GUI.Controls.MesenNumericUpDown(); this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel(); this.lblTop = new System.Windows.Forms.Label(); - this.nudOverscanTop = new System.Windows.Forms.NumericUpDown(); + this.nudOverscanTop = new Mesen.GUI.Controls.MesenNumericUpDown(); this.flowLayoutPanel5 = new System.Windows.Forms.FlowLayoutPanel(); this.lblBottom = new System.Windows.Forms.Label(); - this.nudOverscanBottom = new System.Windows.Forms.NumericUpDown(); + this.nudOverscanBottom = new Mesen.GUI.Controls.MesenNumericUpDown(); this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); this.lblRight = new System.Windows.Forms.Label(); - this.nudOverscanRight = new System.Windows.Forms.NumericUpDown(); + this.nudOverscanRight = new Mesen.GUI.Controls.MesenNumericUpDown(); this.tpgPalette = new System.Windows.Forms.TabPage(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); @@ -128,9 +128,7 @@ namespace Mesen.GUI.Forms.Config this.tlpMain.SuspendLayout(); this.flowLayoutPanel7.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.picHdNesTooltip)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudScale)).BeginInit(); this.flowLayoutPanel6.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudCustomRatio)).BeginInit(); this.tabMain.SuspendLayout(); this.tpgGeneral.SuspendLayout(); this.tpgPicture.SuspendLayout(); @@ -148,13 +146,9 @@ namespace Mesen.GUI.Forms.Config this.tableLayoutPanel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.picOverscan)).BeginInit(); this.flowLayoutPanel3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudOverscanLeft)).BeginInit(); this.flowLayoutPanel4.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudOverscanTop)).BeginInit(); this.flowLayoutPanel5.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudOverscanBottom)).BeginInit(); this.flowLayoutPanel2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudOverscanRight)).BeginInit(); this.tpgPalette.SuspendLayout(); this.tableLayoutPanel3.SuspendLayout(); this.tableLayoutPanel2.SuspendLayout(); @@ -201,7 +195,7 @@ namespace Mesen.GUI.Forms.Config // this.lblVideoScale.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblVideoScale.AutoSize = true; - this.lblVideoScale.Location = new System.Drawing.Point(3, 6); + this.lblVideoScale.Location = new System.Drawing.Point(3, 3); this.lblVideoScale.Name = "lblVideoScale"; this.lblVideoScale.Size = new System.Drawing.Size(37, 13); this.lblVideoScale.TabIndex = 11; @@ -212,7 +206,7 @@ namespace Mesen.GUI.Forms.Config this.chkVerticalSync.Anchor = System.Windows.Forms.AnchorStyles.Left; this.chkVerticalSync.AutoSize = true; this.tlpMain.SetColumnSpan(this.chkVerticalSync, 2); - this.chkVerticalSync.Location = new System.Drawing.Point(3, 78); + this.chkVerticalSync.Location = new System.Drawing.Point(3, 72); this.chkVerticalSync.Name = "chkVerticalSync"; this.chkVerticalSync.Size = new System.Drawing.Size(121, 17); this.chkVerticalSync.TabIndex = 15; @@ -223,7 +217,7 @@ namespace Mesen.GUI.Forms.Config // this.lblDisplayRatio.Anchor = System.Windows.Forms.AnchorStyles.Left; this.lblDisplayRatio.AutoSize = true; - this.lblDisplayRatio.Location = new System.Drawing.Point(3, 32); + this.lblDisplayRatio.Location = new System.Drawing.Point(3, 26); this.lblDisplayRatio.Name = "lblDisplayRatio"; this.lblDisplayRatio.Size = new System.Drawing.Size(71, 13); this.lblDisplayRatio.TabIndex = 17; @@ -235,7 +229,7 @@ namespace Mesen.GUI.Forms.Config this.flowLayoutPanel7.Controls.Add(this.chkUseHdPacks); this.flowLayoutPanel7.Controls.Add(this.picHdNesTooltip); this.flowLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel7.Location = new System.Drawing.Point(0, 52); + this.flowLayoutPanel7.Location = new System.Drawing.Point(0, 46); this.flowLayoutPanel7.Margin = new System.Windows.Forms.Padding(0); this.flowLayoutPanel7.Name = "flowLayoutPanel7"; this.flowLayoutPanel7.Size = new System.Drawing.Size(521, 23); @@ -254,7 +248,8 @@ namespace Mesen.GUI.Forms.Config // // picHdNesTooltip // - this.picHdNesTooltip.Image = global::Mesen.GUI.Properties.Resources.Help; + this.picHdNesTooltip.BackgroundImage = global::Mesen.GUI.Properties.Resources.Help; + this.picHdNesTooltip.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.picHdNesTooltip.Location = new System.Drawing.Point(143, 3); this.picHdNesTooltip.Name = "picHdNesTooltip"; this.picHdNesTooltip.Size = new System.Drawing.Size(17, 17); @@ -264,7 +259,8 @@ namespace Mesen.GUI.Forms.Config // nudScale // this.nudScale.DecimalPlaces = 2; - this.nudScale.Location = new System.Drawing.Point(80, 3); + this.nudScale.Location = new System.Drawing.Point(77, 0); + this.nudScale.Margin = new System.Windows.Forms.Padding(0); this.nudScale.Maximum = new decimal(new int[] { 9999, 0, @@ -283,7 +279,7 @@ namespace Mesen.GUI.Forms.Config this.flowLayoutPanel6.Controls.Add(this.lblCustomRatio); this.flowLayoutPanel6.Controls.Add(this.nudCustomRatio); this.flowLayoutPanel6.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel6.Location = new System.Drawing.Point(77, 26); + this.flowLayoutPanel6.Location = new System.Drawing.Point(77, 20); this.flowLayoutPanel6.Margin = new System.Windows.Forms.Padding(0); this.flowLayoutPanel6.Name = "flowLayoutPanel6"; this.flowLayoutPanel6.Size = new System.Drawing.Size(444, 26); @@ -318,13 +314,15 @@ namespace Mesen.GUI.Forms.Config // // nudCustomRatio // + this.nudCustomRatio.Anchor = System.Windows.Forms.AnchorStyles.Left; this.nudCustomRatio.DecimalPlaces = 3; this.nudCustomRatio.Increment = new decimal(new int[] { 1, 0, 0, 65536}); - this.nudCustomRatio.Location = new System.Drawing.Point(288, 3); + this.nudCustomRatio.Location = new System.Drawing.Point(285, 3); + this.nudCustomRatio.Margin = new System.Windows.Forms.Padding(0); this.nudCustomRatio.Maximum = new decimal(new int[] { 5, 0, @@ -350,7 +348,7 @@ namespace Mesen.GUI.Forms.Config this.chkFullscreenForceIntegerScale.Anchor = System.Windows.Forms.AnchorStyles.Left; this.chkFullscreenForceIntegerScale.AutoSize = true; this.tlpMain.SetColumnSpan(this.chkFullscreenForceIntegerScale, 2); - this.chkFullscreenForceIntegerScale.Location = new System.Drawing.Point(3, 101); + this.chkFullscreenForceIntegerScale.Location = new System.Drawing.Point(3, 95); this.chkFullscreenForceIntegerScale.Name = "chkFullscreenForceIntegerScale"; this.chkFullscreenForceIntegerScale.Size = new System.Drawing.Size(289, 17); this.chkFullscreenForceIntegerScale.TabIndex = 23; @@ -362,7 +360,7 @@ namespace Mesen.GUI.Forms.Config this.chkShowFps.Anchor = System.Windows.Forms.AnchorStyles.Left; this.chkShowFps.AutoSize = true; this.tlpMain.SetColumnSpan(this.chkShowFps, 2); - this.chkShowFps.Location = new System.Drawing.Point(3, 124); + this.chkShowFps.Location = new System.Drawing.Point(3, 118); this.chkShowFps.Name = "chkShowFps"; this.chkShowFps.Size = new System.Drawing.Size(76, 17); this.chkShowFps.TabIndex = 9; @@ -435,12 +433,12 @@ namespace Mesen.GUI.Forms.Config this.tableLayoutPanel7.Controls.Add(this.btnSelectPreset, 1, 0); this.tableLayoutPanel7.Controls.Add(this.btnResetPictureSettings, 0, 0); this.tableLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel7.Location = new System.Drawing.Point(0, 337); + this.tableLayoutPanel7.Location = new System.Drawing.Point(0, 339); this.tableLayoutPanel7.Margin = new System.Windows.Forms.Padding(0); this.tableLayoutPanel7.Name = "tableLayoutPanel7"; this.tableLayoutPanel7.RowCount = 1; this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel7.Size = new System.Drawing.Size(260, 33); + this.tableLayoutPanel7.Size = new System.Drawing.Size(260, 31); this.tableLayoutPanel7.TabIndex = 3; // // btnSelectPreset @@ -449,7 +447,7 @@ namespace Mesen.GUI.Forms.Config this.btnSelectPreset.AutoSize = true; this.btnSelectPreset.Image = ((System.Drawing.Image)(resources.GetObject("btnSelectPreset.Image"))); this.btnSelectPreset.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; - this.btnSelectPreset.Location = new System.Drawing.Point(161, 7); + this.btnSelectPreset.Location = new System.Drawing.Point(161, 5); this.btnSelectPreset.Name = "btnSelectPreset"; this.btnSelectPreset.Size = new System.Drawing.Size(96, 23); this.btnSelectPreset.TabIndex = 3; @@ -462,7 +460,7 @@ namespace Mesen.GUI.Forms.Config // this.btnResetPictureSettings.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnResetPictureSettings.AutoSize = true; - this.btnResetPictureSettings.Location = new System.Drawing.Point(3, 7); + this.btnResetPictureSettings.Location = new System.Drawing.Point(3, 5); this.btnResetPictureSettings.Name = "btnResetPictureSettings"; this.btnResetPictureSettings.Size = new System.Drawing.Size(75, 23); this.btnResetPictureSettings.TabIndex = 3; @@ -680,10 +678,11 @@ namespace Mesen.GUI.Forms.Config // grpCommon // this.grpCommon.Controls.Add(this.tableLayoutPanel4); + this.grpCommon.Dock = System.Windows.Forms.DockStyle.Fill; this.grpCommon.Location = new System.Drawing.Point(0, 27); this.grpCommon.Margin = new System.Windows.Forms.Padding(0, 0, 2, 0); this.grpCommon.Name = "grpCommon"; - this.grpCommon.Size = new System.Drawing.Size(248, 238); + this.grpCommon.Size = new System.Drawing.Size(258, 240); this.grpCommon.TabIndex = 3; this.grpCommon.TabStop = false; this.grpCommon.Text = "Common Settings"; @@ -698,6 +697,7 @@ namespace Mesen.GUI.Forms.Config this.tableLayoutPanel4.Controls.Add(this.trkContrast, 0, 1); this.tableLayoutPanel4.Controls.Add(this.trkHue, 0, 2); this.tableLayoutPanel4.Controls.Add(this.trkSaturation, 0, 3); + this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel4.Location = new System.Drawing.Point(3, 16); this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(0); this.tableLayoutPanel4.Name = "tableLayoutPanel4"; @@ -707,7 +707,7 @@ namespace Mesen.GUI.Forms.Config this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel4.Size = new System.Drawing.Size(242, 236); + this.tableLayoutPanel4.Size = new System.Drawing.Size(252, 221); this.tableLayoutPanel4.TabIndex = 4; // // chkBilinearInterpolation @@ -716,7 +716,7 @@ namespace Mesen.GUI.Forms.Config this.tableLayoutPanel4.SetColumnSpan(this.chkBilinearInterpolation, 2); this.chkBilinearInterpolation.Location = new System.Drawing.Point(3, 203); this.chkBilinearInterpolation.Name = "chkBilinearInterpolation"; - this.chkBilinearInterpolation.Size = new System.Drawing.Size(206, 17); + this.chkBilinearInterpolation.Size = new System.Drawing.Size(206, 15); this.chkBilinearInterpolation.TabIndex = 28; this.chkBilinearInterpolation.Text = "Use bilinear interpolation when scaling"; this.chkBilinearInterpolation.UseVisualStyleBackColor = true; @@ -731,7 +731,7 @@ namespace Mesen.GUI.Forms.Config this.trkBrightness.Minimum = -100; this.trkBrightness.MinimumSize = new System.Drawing.Size(206, 50); this.trkBrightness.Name = "trkBrightness"; - this.trkBrightness.Size = new System.Drawing.Size(242, 50); + this.trkBrightness.Size = new System.Drawing.Size(252, 50); this.trkBrightness.TabIndex = 24; this.trkBrightness.Text = "Brightness"; this.trkBrightness.Value = 0; @@ -746,7 +746,7 @@ namespace Mesen.GUI.Forms.Config this.trkContrast.Minimum = -100; this.trkContrast.MinimumSize = new System.Drawing.Size(206, 50); this.trkContrast.Name = "trkContrast"; - this.trkContrast.Size = new System.Drawing.Size(242, 50); + this.trkContrast.Size = new System.Drawing.Size(252, 50); this.trkContrast.TabIndex = 25; this.trkContrast.Text = "Contrast"; this.trkContrast.Value = 0; @@ -761,7 +761,7 @@ namespace Mesen.GUI.Forms.Config this.trkHue.Minimum = -100; this.trkHue.MinimumSize = new System.Drawing.Size(206, 50); this.trkHue.Name = "trkHue"; - this.trkHue.Size = new System.Drawing.Size(242, 50); + this.trkHue.Size = new System.Drawing.Size(252, 50); this.trkHue.TabIndex = 26; this.trkHue.Text = "Hue"; this.trkHue.Value = 0; @@ -776,7 +776,7 @@ namespace Mesen.GUI.Forms.Config this.trkSaturation.Minimum = -100; this.trkSaturation.MinimumSize = new System.Drawing.Size(206, 50); this.trkSaturation.Name = "trkSaturation"; - this.trkSaturation.Size = new System.Drawing.Size(242, 50); + this.trkSaturation.Size = new System.Drawing.Size(252, 50); this.trkSaturation.TabIndex = 27; this.trkSaturation.Text = "Saturation"; this.trkSaturation.Value = 0; @@ -785,10 +785,10 @@ namespace Mesen.GUI.Forms.Config // this.grpScanlines.Controls.Add(this.trkScanlines); this.grpScanlines.Dock = System.Windows.Forms.DockStyle.Fill; - this.grpScanlines.Location = new System.Drawing.Point(0, 265); - this.grpScanlines.Margin = new System.Windows.Forms.Padding(0); + this.grpScanlines.Location = new System.Drawing.Point(0, 267); + this.grpScanlines.Margin = new System.Windows.Forms.Padding(0, 0, 2, 0); this.grpScanlines.Name = "grpScanlines"; - this.grpScanlines.Size = new System.Drawing.Size(260, 72); + this.grpScanlines.Size = new System.Drawing.Size(258, 72); this.grpScanlines.TabIndex = 5; this.grpScanlines.TabStop = false; this.grpScanlines.Text = "Scanlines"; @@ -803,7 +803,7 @@ namespace Mesen.GUI.Forms.Config this.trkScanlines.Minimum = 0; this.trkScanlines.MinimumSize = new System.Drawing.Size(206, 50); this.trkScanlines.Name = "trkScanlines"; - this.trkScanlines.Size = new System.Drawing.Size(254, 50); + this.trkScanlines.Size = new System.Drawing.Size(252, 50); this.trkScanlines.TabIndex = 28; this.trkScanlines.Text = "Scanlines"; this.trkScanlines.Value = 0; @@ -909,10 +909,10 @@ namespace Mesen.GUI.Forms.Config this.flowLayoutPanel3.Controls.Add(this.lblLeft); this.flowLayoutPanel3.Controls.Add(this.nudOverscanLeft); this.flowLayoutPanel3.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; - this.flowLayoutPanel3.Location = new System.Drawing.Point(70, 155); + this.flowLayoutPanel3.Location = new System.Drawing.Point(85, 158); this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(0); this.flowLayoutPanel3.Name = "flowLayoutPanel3"; - this.flowLayoutPanel3.Size = new System.Drawing.Size(56, 39); + this.flowLayoutPanel3.Size = new System.Drawing.Size(41, 33); this.flowLayoutPanel3.TabIndex = 1; // // lblLeft @@ -921,16 +921,17 @@ namespace Mesen.GUI.Forms.Config this.lblLeft.Dock = System.Windows.Forms.DockStyle.Fill; this.lblLeft.Location = new System.Drawing.Point(3, 0); this.lblLeft.Name = "lblLeft"; - this.lblLeft.Size = new System.Drawing.Size(50, 13); + this.lblLeft.Size = new System.Drawing.Size(35, 13); this.lblLeft.TabIndex = 0; this.lblLeft.Text = "Left"; this.lblLeft.TextAlign = System.Drawing.ContentAlignment.TopCenter; // // nudOverscanLeft // - this.nudOverscanLeft.Location = new System.Drawing.Point(3, 16); + this.nudOverscanLeft.Location = new System.Drawing.Point(0, 13); + this.nudOverscanLeft.Margin = new System.Windows.Forms.Padding(0); this.nudOverscanLeft.Name = "nudOverscanLeft"; - this.nudOverscanLeft.Size = new System.Drawing.Size(50, 20); + this.nudOverscanLeft.Size = new System.Drawing.Size(41, 20); this.nudOverscanLeft.TabIndex = 2; this.nudOverscanLeft.ValueChanged += new System.EventHandler(this.nudOverscan_ValueChanged); // @@ -941,10 +942,10 @@ namespace Mesen.GUI.Forms.Config this.flowLayoutPanel4.Controls.Add(this.lblTop); this.flowLayoutPanel4.Controls.Add(this.nudOverscanTop); this.flowLayoutPanel4.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; - this.flowLayoutPanel4.Location = new System.Drawing.Point(229, 13); + this.flowLayoutPanel4.Location = new System.Drawing.Point(236, 19); this.flowLayoutPanel4.Margin = new System.Windows.Forms.Padding(0); this.flowLayoutPanel4.Name = "flowLayoutPanel4"; - this.flowLayoutPanel4.Size = new System.Drawing.Size(56, 39); + this.flowLayoutPanel4.Size = new System.Drawing.Size(41, 33); this.flowLayoutPanel4.TabIndex = 2; // // lblTop @@ -953,16 +954,17 @@ namespace Mesen.GUI.Forms.Config this.lblTop.Dock = System.Windows.Forms.DockStyle.Fill; this.lblTop.Location = new System.Drawing.Point(3, 0); this.lblTop.Name = "lblTop"; - this.lblTop.Size = new System.Drawing.Size(50, 13); + this.lblTop.Size = new System.Drawing.Size(35, 13); this.lblTop.TabIndex = 0; this.lblTop.Text = "Top"; this.lblTop.TextAlign = System.Drawing.ContentAlignment.TopCenter; // // nudOverscanTop // - this.nudOverscanTop.Location = new System.Drawing.Point(3, 16); + this.nudOverscanTop.Location = new System.Drawing.Point(0, 13); + this.nudOverscanTop.Margin = new System.Windows.Forms.Padding(0); this.nudOverscanTop.Name = "nudOverscanTop"; - this.nudOverscanTop.Size = new System.Drawing.Size(50, 20); + this.nudOverscanTop.Size = new System.Drawing.Size(41, 20); this.nudOverscanTop.TabIndex = 2; this.nudOverscanTop.ValueChanged += new System.EventHandler(this.nudOverscan_ValueChanged); // @@ -973,10 +975,10 @@ namespace Mesen.GUI.Forms.Config this.flowLayoutPanel5.Controls.Add(this.lblBottom); this.flowLayoutPanel5.Controls.Add(this.nudOverscanBottom); this.flowLayoutPanel5.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; - this.flowLayoutPanel5.Location = new System.Drawing.Point(229, 298); + this.flowLayoutPanel5.Location = new System.Drawing.Point(234, 298); this.flowLayoutPanel5.Margin = new System.Windows.Forms.Padding(0); this.flowLayoutPanel5.Name = "flowLayoutPanel5"; - this.flowLayoutPanel5.Size = new System.Drawing.Size(56, 39); + this.flowLayoutPanel5.Size = new System.Drawing.Size(46, 33); this.flowLayoutPanel5.TabIndex = 3; // // lblBottom @@ -985,16 +987,17 @@ namespace Mesen.GUI.Forms.Config this.lblBottom.Dock = System.Windows.Forms.DockStyle.Fill; this.lblBottom.Location = new System.Drawing.Point(3, 0); this.lblBottom.Name = "lblBottom"; - this.lblBottom.Size = new System.Drawing.Size(50, 13); + this.lblBottom.Size = new System.Drawing.Size(40, 13); this.lblBottom.TabIndex = 0; this.lblBottom.Text = "Bottom"; this.lblBottom.TextAlign = System.Drawing.ContentAlignment.TopCenter; // // nudOverscanBottom // - this.nudOverscanBottom.Location = new System.Drawing.Point(3, 16); + this.nudOverscanBottom.Location = new System.Drawing.Point(0, 13); + this.nudOverscanBottom.Margin = new System.Windows.Forms.Padding(0); this.nudOverscanBottom.Name = "nudOverscanBottom"; - this.nudOverscanBottom.Size = new System.Drawing.Size(50, 20); + this.nudOverscanBottom.Size = new System.Drawing.Size(41, 20); this.nudOverscanBottom.TabIndex = 2; this.nudOverscanBottom.ValueChanged += new System.EventHandler(this.nudOverscan_ValueChanged); // @@ -1005,10 +1008,10 @@ namespace Mesen.GUI.Forms.Config this.flowLayoutPanel2.Controls.Add(this.lblRight); this.flowLayoutPanel2.Controls.Add(this.nudOverscanRight); this.flowLayoutPanel2.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; - this.flowLayoutPanel2.Location = new System.Drawing.Point(388, 155); + this.flowLayoutPanel2.Location = new System.Drawing.Point(388, 158); this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0); this.flowLayoutPanel2.Name = "flowLayoutPanel2"; - this.flowLayoutPanel2.Size = new System.Drawing.Size(56, 39); + this.flowLayoutPanel2.Size = new System.Drawing.Size(41, 33); this.flowLayoutPanel2.TabIndex = 0; // // lblRight @@ -1017,16 +1020,17 @@ namespace Mesen.GUI.Forms.Config this.lblRight.Dock = System.Windows.Forms.DockStyle.Fill; this.lblRight.Location = new System.Drawing.Point(3, 0); this.lblRight.Name = "lblRight"; - this.lblRight.Size = new System.Drawing.Size(50, 13); + this.lblRight.Size = new System.Drawing.Size(35, 13); this.lblRight.TabIndex = 0; this.lblRight.Text = "Right"; this.lblRight.TextAlign = System.Drawing.ContentAlignment.TopCenter; // // nudOverscanRight // - this.nudOverscanRight.Location = new System.Drawing.Point(3, 16); + this.nudOverscanRight.Location = new System.Drawing.Point(0, 13); + this.nudOverscanRight.Margin = new System.Windows.Forms.Padding(0); this.nudOverscanRight.Name = "nudOverscanRight"; - this.nudOverscanRight.Size = new System.Drawing.Size(50, 20); + this.nudOverscanRight.Size = new System.Drawing.Size(41, 20); this.nudOverscanRight.TabIndex = 1; this.nudOverscanRight.ValueChanged += new System.EventHandler(this.nudOverscan_ValueChanged); // @@ -1361,10 +1365,8 @@ namespace Mesen.GUI.Forms.Config this.flowLayoutPanel7.ResumeLayout(false); this.flowLayoutPanel7.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.picHdNesTooltip)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.nudScale)).EndInit(); this.flowLayoutPanel6.ResumeLayout(false); this.flowLayoutPanel6.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudCustomRatio)).EndInit(); this.tabMain.ResumeLayout(false); this.tpgGeneral.ResumeLayout(false); this.tpgPicture.ResumeLayout(false); @@ -1388,16 +1390,12 @@ namespace Mesen.GUI.Forms.Config ((System.ComponentModel.ISupportInitialize)(this.picOverscan)).EndInit(); this.flowLayoutPanel3.ResumeLayout(false); this.flowLayoutPanel3.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudOverscanLeft)).EndInit(); this.flowLayoutPanel4.ResumeLayout(false); this.flowLayoutPanel4.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudOverscanTop)).EndInit(); this.flowLayoutPanel5.ResumeLayout(false); this.flowLayoutPanel5.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudOverscanBottom)).EndInit(); this.flowLayoutPanel2.ResumeLayout(false); this.flowLayoutPanel2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudOverscanRight)).EndInit(); this.tpgPalette.ResumeLayout(false); this.tableLayoutPanel3.ResumeLayout(false); this.tableLayoutPanel3.PerformLayout(); @@ -1428,16 +1426,16 @@ namespace Mesen.GUI.Forms.Config private System.Windows.Forms.PictureBox picOverscan; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel3; private System.Windows.Forms.Label lblLeft; - private System.Windows.Forms.NumericUpDown nudOverscanLeft; + private MesenNumericUpDown nudOverscanLeft; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel4; private System.Windows.Forms.Label lblTop; - private System.Windows.Forms.NumericUpDown nudOverscanTop; + private MesenNumericUpDown nudOverscanTop; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel5; private System.Windows.Forms.Label lblBottom; - private System.Windows.Forms.NumericUpDown nudOverscanBottom; + private MesenNumericUpDown nudOverscanBottom; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; private System.Windows.Forms.Label lblRight; - private System.Windows.Forms.NumericUpDown nudOverscanRight; + private MesenNumericUpDown nudOverscanRight; private System.Windows.Forms.TabPage tpgPalette; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel7; private System.Windows.Forms.CheckBox chkUseHdPacks; @@ -1446,7 +1444,7 @@ namespace Mesen.GUI.Forms.Config private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private System.Windows.Forms.Button btnLoadPalFile; private System.Windows.Forms.ColorDialog colorDialog; - private System.Windows.Forms.NumericUpDown nudScale; + private MesenNumericUpDown nudScale; private System.Windows.Forms.TabPage tpgPicture; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4; private Controls.ctrlHorizontalTrackbar trkBrightness; @@ -1500,7 +1498,7 @@ namespace Mesen.GUI.Forms.Config private System.Windows.Forms.ToolStripMenuItem mnuPaletteSonyCxa2025As; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel6; private System.Windows.Forms.Label lblCustomRatio; - private System.Windows.Forms.NumericUpDown nudCustomRatio; + private MesenNumericUpDown nudCustomRatio; private System.Windows.Forms.ToolStripMenuItem mnuPalettePvmStyle; private System.Windows.Forms.ToolStripMenuItem mnuPaletteOriginalHardware; private System.Windows.Forms.ToolStripMenuItem mnuPaletteCompositeDirect; diff --git a/GUI.NET/Forms/Config/frmVideoConfig.cs b/GUI.NET/Forms/Config/frmVideoConfig.cs index cd37315a..7514c289 100644 --- a/GUI.NET/Forms/Config/frmVideoConfig.cs +++ b/GUI.NET/Forms/Config/frmVideoConfig.cs @@ -162,13 +162,13 @@ namespace Mesen.GUI.Forms.Config private void UpdateOverscanImage() { - Bitmap overscan = new Bitmap(256, 240); + Bitmap overscan = new Bitmap(picOverscan.Width - 2, picOverscan.Height - 2); using(Graphics g = Graphics.FromImage(overscan)) { - Rectangle bg = new Rectangle(0, 0, 256, 240); - g.FillRectangle(Brushes.DarkGray, bg); + g.Clear(Color.DarkGray); Rectangle fg = new Rectangle((int)nudOverscanLeft.Value, (int)nudOverscanTop.Value, 256 - (int)nudOverscanLeft.Value - (int)nudOverscanRight.Value, 240 - (int)nudOverscanTop.Value - (int)nudOverscanBottom.Value); + g.ScaleTransform((float)overscan.Width / 256, (float)overscan.Height / 240); g.FillRectangle(Brushes.LightCyan, fg); } picOverscan.Image = overscan; diff --git a/GUI.NET/Forms/Config/frmVsGameConfig.cs b/GUI.NET/Forms/Config/frmVsGameConfig.cs index 00aa7d3d..f7933884 100644 --- a/GUI.NET/Forms/Config/frmVsGameConfig.cs +++ b/GUI.NET/Forms/Config/frmVsGameConfig.cs @@ -95,6 +95,7 @@ namespace Mesen.GUI.Forms.Config int selectedIndex = (value >> currentBit) & ((1 << bitCount) - 1); optionDropdown.SelectedIndex = selectedIndex; + optionDropdown.Dock = DockStyle.Fill; currentBit += bitCount; diff --git a/GUI.NET/Forms/EntityBinder.cs b/GUI.NET/Forms/EntityBinder.cs index 4e374f0a..14ea04d2 100644 --- a/GUI.NET/Forms/EntityBinder.cs +++ b/GUI.NET/Forms/EntityBinder.cs @@ -99,8 +99,8 @@ namespace Mesen.GUI.Forms } else { ((TrackBar)kvp.Value).Value = (int)(uint)value; } - } else if(kvp.Value is NumericUpDown) { - NumericUpDown nud = kvp.Value as NumericUpDown; + } else if(kvp.Value is MesenNumericUpDown) { + MesenNumericUpDown nud = kvp.Value as MesenNumericUpDown; decimal val; if(field.FieldType == typeof(UInt32)) { val = (UInt32)value; @@ -197,13 +197,13 @@ namespace Mesen.GUI.Forms } else { field.SetValue(Entity, (UInt32)((TrackBar)kvp.Value).Value); } - } else if(kvp.Value is NumericUpDown) { + } else if(kvp.Value is MesenNumericUpDown) { if(field.FieldType == typeof(UInt32)) { - field.SetValue(Entity, (UInt32)((NumericUpDown)kvp.Value).Value); + field.SetValue(Entity, (UInt32)((MesenNumericUpDown)kvp.Value).Value); } else if(field.FieldType == typeof(Int32)) { - field.SetValue(Entity, (Int32)((NumericUpDown)kvp.Value).Value); + field.SetValue(Entity, (Int32)((MesenNumericUpDown)kvp.Value).Value); } else { - field.SetValue(Entity, (double)((NumericUpDown)kvp.Value).Value); + field.SetValue(Entity, (double)((MesenNumericUpDown)kvp.Value).Value); } } else if(kvp.Value is ComboBox) { if(field.FieldType.IsSubclassOf(typeof(Enum))) { diff --git a/GUI.NET/Forms/HdPackEditor/frmHdPackEditor.Designer.cs b/GUI.NET/Forms/HdPackEditor/frmHdPackEditor.Designer.cs index 96e751d8..5aceae07 100644 --- a/GUI.NET/Forms/HdPackEditor/frmHdPackEditor.Designer.cs +++ b/GUI.NET/Forms/HdPackEditor/frmHdPackEditor.Designer.cs @@ -154,6 +154,7 @@ // picBankPreview // this.tableLayoutPanel3.SetColumnSpan(this.picBankPreview, 2); + this.picBankPreview.Dock = System.Windows.Forms.DockStyle.Fill; this.picBankPreview.Location = new System.Drawing.Point(3, 30); this.picBankPreview.Name = "picBankPreview"; this.picBankPreview.Size = new System.Drawing.Size(257, 258); @@ -242,7 +243,9 @@ // // picIgnoreOverscanHelp // - this.picIgnoreOverscanHelp.Image = global::Mesen.GUI.Properties.Resources.Help; + this.picIgnoreOverscanHelp.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.picIgnoreOverscanHelp.BackgroundImage = global::Mesen.GUI.Properties.Resources.Help; + this.picIgnoreOverscanHelp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.picIgnoreOverscanHelp.Location = new System.Drawing.Point(266, 3); this.picIgnoreOverscanHelp.Name = "picIgnoreOverscanHelp"; this.picIgnoreOverscanHelp.Size = new System.Drawing.Size(16, 16); @@ -295,7 +298,9 @@ // // picGroupBlankHelp // - this.picGroupBlankHelp.Image = global::Mesen.GUI.Properties.Resources.Help; + this.picGroupBlankHelp.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.picGroupBlankHelp.BackgroundImage = global::Mesen.GUI.Properties.Resources.Help; + this.picGroupBlankHelp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.picGroupBlankHelp.Location = new System.Drawing.Point(114, 3); this.picGroupBlankHelp.Name = "picGroupBlankHelp"; this.picGroupBlankHelp.Size = new System.Drawing.Size(16, 16); @@ -328,7 +333,9 @@ // // picFrequencyHelp // - this.picFrequencyHelp.Image = global::Mesen.GUI.Properties.Resources.Help; + this.picFrequencyHelp.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.picFrequencyHelp.BackgroundImage = global::Mesen.GUI.Properties.Resources.Help; + this.picFrequencyHelp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.picFrequencyHelp.Location = new System.Drawing.Point(182, 3); this.picFrequencyHelp.Name = "picFrequencyHelp"; this.picFrequencyHelp.Size = new System.Drawing.Size(16, 16); @@ -359,7 +366,9 @@ // // picLargeSpritesHelp // - this.picLargeSpritesHelp.Image = global::Mesen.GUI.Properties.Resources.Help; + this.picLargeSpritesHelp.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.picLargeSpritesHelp.BackgroundImage = global::Mesen.GUI.Properties.Resources.Help; + this.picLargeSpritesHelp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.picLargeSpritesHelp.Location = new System.Drawing.Point(172, 3); this.picLargeSpritesHelp.Name = "picLargeSpritesHelp"; this.picLargeSpritesHelp.Size = new System.Drawing.Size(16, 16); @@ -392,8 +401,10 @@ // // picBankSizeHelp // - this.picBankSizeHelp.Image = global::Mesen.GUI.Properties.Resources.Help; - this.picBankSizeHelp.Location = new System.Drawing.Point(114, 5); + this.picBankSizeHelp.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.picBankSizeHelp.BackgroundImage = global::Mesen.GUI.Properties.Resources.Help; + this.picBankSizeHelp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.picBankSizeHelp.Location = new System.Drawing.Point(114, 6); this.picBankSizeHelp.Margin = new System.Windows.Forms.Padding(3, 5, 3, 3); this.picBankSizeHelp.Name = "picBankSizeHelp"; this.picBankSizeHelp.Size = new System.Drawing.Size(16, 16); @@ -422,8 +433,10 @@ // // picScaleHelp // - this.picScaleHelp.Image = global::Mesen.GUI.Properties.Resources.Help; - this.picScaleHelp.Location = new System.Drawing.Point(114, 5); + this.picScaleHelp.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.picScaleHelp.BackgroundImage = global::Mesen.GUI.Properties.Resources.Help; + this.picScaleHelp.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.picScaleHelp.Location = new System.Drawing.Point(114, 6); this.picScaleHelp.Margin = new System.Windows.Forms.Padding(3, 5, 3, 3); this.picScaleHelp.Name = "picScaleHelp"; this.picScaleHelp.Size = new System.Drawing.Size(16, 16); @@ -432,14 +445,14 @@ // // flowLayoutPanel2 // - this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.flowLayoutPanel2.Controls.Add(this.btnStartRecording); this.flowLayoutPanel2.Controls.Add(this.btnStopRecording); + this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; this.flowLayoutPanel2.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; - this.flowLayoutPanel2.Location = new System.Drawing.Point(348, 345); + this.flowLayoutPanel2.Location = new System.Drawing.Point(337, 345); this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0, 0, 0, 3); this.flowLayoutPanel2.Name = "flowLayoutPanel2"; - this.flowLayoutPanel2.Size = new System.Drawing.Size(264, 26); + this.flowLayoutPanel2.Size = new System.Drawing.Size(275, 26); this.flowLayoutPanel2.TabIndex = 7; // // btnStartRecording @@ -448,7 +461,7 @@ this.btnStartRecording.AutoSize = true; this.btnStartRecording.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.btnStartRecording.Image = global::Mesen.GUI.Properties.Resources.Record; - this.btnStartRecording.Location = new System.Drawing.Point(154, 3); + this.btnStartRecording.Location = new System.Drawing.Point(165, 3); this.btnStartRecording.Name = "btnStartRecording"; this.btnStartRecording.Size = new System.Drawing.Size(107, 23); this.btnStartRecording.TabIndex = 6; @@ -461,10 +474,11 @@ // this.btnStopRecording.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnStopRecording.AutoSize = true; + this.btnStopRecording.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.btnStopRecording.Image = global::Mesen.GUI.Properties.Resources.Stop; - this.btnStopRecording.Location = new System.Drawing.Point(41, 3); + this.btnStopRecording.Location = new System.Drawing.Point(52, 3); this.btnStopRecording.Name = "btnStopRecording"; - this.btnStopRecording.Size = new System.Drawing.Size(107, 24); + this.btnStopRecording.Size = new System.Drawing.Size(107, 23); this.btnStopRecording.TabIndex = 7; this.btnStopRecording.Text = "Stop Recording"; this.btnStopRecording.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; diff --git a/GUI.NET/Forms/HdPackEditor/frmHdPackEditor.cs b/GUI.NET/Forms/HdPackEditor/frmHdPackEditor.cs index 92b6bb8e..71a6d338 100644 --- a/GUI.NET/Forms/HdPackEditor/frmHdPackEditor.cs +++ b/GUI.NET/Forms/HdPackEditor/frmHdPackEditor.cs @@ -29,7 +29,8 @@ namespace Mesen.GUI.Forms.HdPackEditor } txtSaveFolder.Text = Path.Combine(ConfigManager.HdPackFolder, InteropEmu.GetRomInfo().GetRomName()); - picBankPreview.Image = new Bitmap(256, 256); + picBankPreview.BackgroundImage = new Bitmap(256, 256); + picBankPreview.BackgroundImageLayout = ImageLayout.Zoom; UpdateFilterDropdown(); @@ -95,7 +96,7 @@ namespace Mesen.GUI.Forms.HdPackEditor int scale = (int)((FilterInfo)cboScale.SelectedItem).Scale; - using(Graphics g = Graphics.FromImage(picBankPreview.Image)) { + using(Graphics g = Graphics.FromImage(picBankPreview.BackgroundImage)) { Byte[] rgbBuffer = InteropEmu.HdBuilderGetBankPreview((uint)cboBank.SelectedItem, scale, 0); GCHandle handle = GCHandle.Alloc(rgbBuffer, GCHandleType.Pinned); Bitmap source = new Bitmap(128*scale, 128*scale, 4*128*scale, System.Drawing.Imaging.PixelFormat.Format32bppArgb, handle.AddrOfPinnedObject()); diff --git a/GUI.NET/Forms/NetPlay/frmServerConfig.Designer.cs b/GUI.NET/Forms/NetPlay/frmServerConfig.Designer.cs index 5be42242..4c6f103e 100644 --- a/GUI.NET/Forms/NetPlay/frmServerConfig.Designer.cs +++ b/GUI.NET/Forms/NetPlay/frmServerConfig.Designer.cs @@ -1,4 +1,6 @@ -namespace Mesen.GUI.Forms.NetPlay +using Mesen.GUI.Controls; + +namespace Mesen.GUI.Forms.NetPlay { partial class frmServerConfig { @@ -37,9 +39,8 @@ this.lblMaxPlayers = new System.Windows.Forms.Label(); this.lblPassword = new System.Windows.Forms.Label(); this.txtPassword = new System.Windows.Forms.TextBox(); - this.nudNbPlayers = new System.Windows.Forms.NumericUpDown(); + this.nudNbPlayers = new MesenNumericUpDown(); this.tlpMain.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudNbPlayers)).BeginInit(); this.SuspendLayout(); // // baseConfigPanel @@ -211,7 +212,6 @@ this.Controls.SetChildIndex(this.tlpMain, 0); this.tlpMain.ResumeLayout(false); this.tlpMain.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudNbPlayers)).EndInit(); this.ResumeLayout(false); } @@ -223,7 +223,7 @@ private System.Windows.Forms.Label lblMaxPlayers; private System.Windows.Forms.TextBox txtServerName; private System.Windows.Forms.CheckBox chkSpectator; - private System.Windows.Forms.NumericUpDown nudNbPlayers; + private MesenNumericUpDown nudNbPlayers; private System.Windows.Forms.CheckBox chkPublicServer; private System.Windows.Forms.Label lblPassword; private System.Windows.Forms.TextBox txtPassword; diff --git a/GUI.NET/Forms/frmAbout.Designer.cs b/GUI.NET/Forms/frmAbout.Designer.cs index 7eaf48fe..5f7fe34d 100644 --- a/GUI.NET/Forms/frmAbout.Designer.cs +++ b/GUI.NET/Forms/frmAbout.Designer.cs @@ -35,10 +35,9 @@ this.lblWebsite = new System.Windows.Forms.Label(); this.lblLink = new System.Windows.Forms.Label(); this.labelVersion = new System.Windows.Forms.Label(); - this.okButton = new System.Windows.Forms.Button(); - this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); - this.picDonate = new System.Windows.Forms.PictureBox(); this.lblDonate = new System.Windows.Forms.Label(); + this.picDonate = new System.Windows.Forms.PictureBox(); + this.okButton = new System.Windows.Forms.Button(); this.tableLayoutPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit(); this.flowLayoutPanel1.SuspendLayout(); @@ -47,6 +46,8 @@ // // tableLayoutPanel // + this.tableLayoutPanel.AutoSize = true; + this.tableLayoutPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.tableLayoutPanel.ColumnCount = 2; this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 84F)); this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); @@ -56,7 +57,6 @@ this.tableLayoutPanel.Controls.Add(this.flowLayoutPanel1, 1, 3); this.tableLayoutPanel.Controls.Add(this.labelVersion, 1, 1); this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5); - this.tableLayoutPanel.Controls.Add(this.flowLayoutPanel2, 0, 6); this.tableLayoutPanel.Controls.Add(this.picDonate, 0, 5); this.tableLayoutPanel.Controls.Add(this.lblDonate, 0, 4); this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; @@ -70,6 +70,7 @@ this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel.Size = new System.Drawing.Size(337, 134); this.tableLayoutPanel.TabIndex = 0; // @@ -82,6 +83,7 @@ this.logoPictureBox.Name = "logoPictureBox"; this.tableLayoutPanel.SetRowSpan(this.logoPictureBox, 4); this.logoPictureBox.Size = new System.Drawing.Size(64, 65); + this.logoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.logoPictureBox.TabIndex = 12; this.logoPictureBox.TabStop = false; // @@ -155,53 +157,48 @@ this.labelVersion.Text = "Version: 0.9.3 (Beta)"; this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // okButton + // lblDonate // - this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.okButton.Location = new System.Drawing.Point(259, 108); - this.okButton.Name = "okButton"; - this.okButton.Size = new System.Drawing.Size(75, 23); - this.okButton.TabIndex = 24; - this.okButton.Text = "&OK"; - // - // flowLayoutPanel2 - // - this.flowLayoutPanel2.Location = new System.Drawing.Point(3, 137); - this.flowLayoutPanel2.Name = "flowLayoutPanel2"; - this.flowLayoutPanel2.Size = new System.Drawing.Size(64, 1); - this.flowLayoutPanel2.TabIndex = 27; + this.lblDonate.AutoSize = true; + this.tableLayoutPanel.SetColumnSpan(this.lblDonate, 2); + this.lblDonate.Location = new System.Drawing.Point(0, 75); + this.lblDonate.Margin = new System.Windows.Forms.Padding(0, 5, 0, 0); + this.lblDonate.Name = "lblDonate"; + this.lblDonate.Size = new System.Drawing.Size(271, 26); + this.lblDonate.TabIndex = 30; + this.lblDonate.Text = "If you want to support Mesen, please consider donating.\r\nThank you for your suppo" + + "rt!"; // // picDonate // this.picDonate.Anchor = System.Windows.Forms.AnchorStyles.Left; this.picDonate.Cursor = System.Windows.Forms.Cursors.Hand; this.picDonate.Image = ((System.Drawing.Image)(resources.GetObject("picDonate.Image"))); - this.picDonate.Location = new System.Drawing.Point(3, 108); + this.picDonate.Location = new System.Drawing.Point(3, 104); this.picDonate.Name = "picDonate"; this.picDonate.Size = new System.Drawing.Size(78, 22); - this.picDonate.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.picDonate.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.picDonate.TabIndex = 29; this.picDonate.TabStop = false; this.picDonate.Click += new System.EventHandler(this.picDonate_Click); // - // lblDonate + // okButton // - this.tableLayoutPanel.SetColumnSpan(this.lblDonate, 2); - this.lblDonate.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblDonate.Location = new System.Drawing.Point(0, 75); - this.lblDonate.Margin = new System.Windows.Forms.Padding(0, 5, 0, 0); - this.lblDonate.Name = "lblDonate"; - this.lblDonate.Size = new System.Drawing.Size(337, 30); - this.lblDonate.TabIndex = 30; - this.lblDonate.Text = "If you want to support Mesen, please consider donating.\r\nThank you for your suppo" + - "rt!"; + this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.okButton.Location = new System.Drawing.Point(259, 104); + this.okButton.Name = "okButton"; + this.okButton.Size = new System.Drawing.Size(75, 23); + this.okButton.TabIndex = 24; + this.okButton.Text = "&OK"; // // frmAbout // this.AcceptButton = this.okButton; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoSize = true; + this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.CancelButton = this.okButton; this.ClientSize = new System.Drawing.Size(347, 144); this.Controls.Add(this.tableLayoutPanel); @@ -220,6 +217,7 @@ this.flowLayoutPanel1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.picDonate)).EndInit(); this.ResumeLayout(false); + this.PerformLayout(); } @@ -230,11 +228,10 @@ private System.Windows.Forms.Label labelProductName; private System.Windows.Forms.Label labelVersion; private System.Windows.Forms.Label labelCopyright; - private System.Windows.Forms.Button okButton; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; private System.Windows.Forms.Label lblWebsite; private System.Windows.Forms.Label lblLink; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; + private System.Windows.Forms.Button okButton; private System.Windows.Forms.PictureBox picDonate; private System.Windows.Forms.Label lblDonate; } diff --git a/GUI.NET/Forms/frmMain.Designer.cs b/GUI.NET/Forms/frmMain.Designer.cs index 90d59aa4..24b1a55b 100644 --- a/GUI.NET/Forms/frmMain.Designer.cs +++ b/GUI.NET/Forms/frmMain.Designer.cs @@ -249,12 +249,11 @@ namespace Mesen.GUI.Forms // picIcon // this.picIcon.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.picIcon.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.picIcon.Image = global::Mesen.GUI.Properties.Resources.MesenIconSmall; + this.picIcon.BackgroundImage = global::Mesen.GUI.Properties.Resources.MesenIconSmall; + this.picIcon.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.picIcon.Location = new System.Drawing.Point(50, 5); this.picIcon.Name = "picIcon"; - this.picIcon.Size = new System.Drawing.Size(18, 18); - this.picIcon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.picIcon.Size = new System.Drawing.Size(16, 16); this.picIcon.TabIndex = 5; this.picIcon.TabStop = false; // @@ -339,49 +338,49 @@ namespace Mesen.GUI.Forms // this.mnuOpen.Image = global::Mesen.GUI.Properties.Resources.FolderOpen; this.mnuOpen.Name = "mnuOpen"; - this.mnuOpen.Size = new System.Drawing.Size(136, 22); + this.mnuOpen.Size = new System.Drawing.Size(152, 22); this.mnuOpen.Text = "Open"; // // toolStripMenuItem4 // this.toolStripMenuItem4.Name = "toolStripMenuItem4"; - this.toolStripMenuItem4.Size = new System.Drawing.Size(133, 6); + this.toolStripMenuItem4.Size = new System.Drawing.Size(149, 6); // // mnuSaveState // this.mnuSaveState.Name = "mnuSaveState"; - this.mnuSaveState.Size = new System.Drawing.Size(136, 22); + this.mnuSaveState.Size = new System.Drawing.Size(152, 22); this.mnuSaveState.Text = "Save State"; this.mnuSaveState.DropDownOpening += new System.EventHandler(this.mnuSaveState_DropDownOpening); // // mnuLoadState // this.mnuLoadState.Name = "mnuLoadState"; - this.mnuLoadState.Size = new System.Drawing.Size(136, 22); + this.mnuLoadState.Size = new System.Drawing.Size(152, 22); this.mnuLoadState.Text = "Load State"; this.mnuLoadState.DropDownOpening += new System.EventHandler(this.mnuLoadState_DropDownOpening); // // toolStripMenuItem7 // this.toolStripMenuItem7.Name = "toolStripMenuItem7"; - this.toolStripMenuItem7.Size = new System.Drawing.Size(133, 6); + this.toolStripMenuItem7.Size = new System.Drawing.Size(149, 6); // // mnuRecentFiles // this.mnuRecentFiles.Name = "mnuRecentFiles"; - this.mnuRecentFiles.Size = new System.Drawing.Size(136, 22); + this.mnuRecentFiles.Size = new System.Drawing.Size(152, 22); this.mnuRecentFiles.Text = "Recent Files"; // // toolStripMenuItem6 // this.toolStripMenuItem6.Name = "toolStripMenuItem6"; - this.toolStripMenuItem6.Size = new System.Drawing.Size(133, 6); + this.toolStripMenuItem6.Size = new System.Drawing.Size(149, 6); // // mnuExit // this.mnuExit.Image = global::Mesen.GUI.Properties.Resources.Exit; this.mnuExit.Name = "mnuExit"; - this.mnuExit.Size = new System.Drawing.Size(136, 22); + this.mnuExit.Size = new System.Drawing.Size(152, 22); this.mnuExit.Text = "Exit"; // // mnuGame diff --git a/GUI.NET/Forms/frmMain.cs b/GUI.NET/Forms/frmMain.cs index 86c11a1d..b4f7d0d0 100644 --- a/GUI.NET/Forms/frmMain.cs +++ b/GUI.NET/Forms/frmMain.cs @@ -42,11 +42,14 @@ namespace Mesen.GUI.Forms private FormWindowState _originalWindowState; private bool _fullscreenMode = false; private Size? _nonNsfSize = null; + private Size _nonNsfMinimumSize; private bool _isNsfPlayerMode = false; private object _loadRomLock = new object(); private int _romLoadCounter = 0; private bool _removeFocus = false; private bool _showUpgradeMessage = false; + private float _xFactor = 1; + private float _yFactor = 1; private Dictionary> _actionEnabledFuncs = new Dictionary>(); @@ -309,12 +312,19 @@ namespace Mesen.GUI.Forms this.Resize += frmMain_Resize; } + protected override void ScaleControl(SizeF factor, BoundsSpecified specified) + { + _xFactor = factor.Width; + _yFactor = factor.Height; + base.ScaleControl(factor, specified); + } + private void ResizeRecentGames(object sender, EventArgs e) { - if(this.ClientSize.Height < 400) { - ctrlRecentGames.Height = this.ClientSize.Height - 125 + Math.Min(50, (400 - this.ClientSize.Height)); + if(this.ClientSize.Height < 400 * _yFactor) { + ctrlRecentGames.Height = this.ClientSize.Height - (int)((125 - Math.Min(50, 400 - (int)(this.ClientSize.Height / _yFactor))) * _yFactor); } else { - ctrlRecentGames.Height = this.ClientSize.Height - 125; + ctrlRecentGames.Height = this.ClientSize.Height - (int)(125 * _yFactor); } ctrlRecentGames.Width = this.ClientSize.Width; ctrlRecentGames.Top = (this.HideMenuStrip && this.menuStrip.Visible) ? -menuStrip.Height : 0; @@ -1017,8 +1027,9 @@ namespace Mesen.GUI.Forms if(!this._isNsfPlayerMode) { this._nonNsfSize = this.WindowState == FormWindowState.Maximized ? this.RestoreBounds.Size : this.Size; - this.Size = new Size(380, 320); - this.MinimumSize = new Size(380, 320); + this._nonNsfMinimumSize = this.MinimumSize; + this.Size = ctrlNsfPlayer.WindowMinimumSize; + this.MinimumSize = ctrlNsfPlayer.WindowMinimumSize; } this._isNsfPlayerMode = true; this.ctrlNsfPlayer.UpdateText(); @@ -1034,7 +1045,7 @@ namespace Mesen.GUI.Forms _currentGame = header.GetSongName(); } } else if(this._isNsfPlayerMode) { - this.MinimumSize = new Size(340, 280); + this.MinimumSize = this._nonNsfMinimumSize; this.Size = this._nonNsfSize.Value; this._nonNsfSize = null; this._isNsfPlayerMode = false; diff --git a/GUI.NET/GUI.NET.csproj b/GUI.NET/GUI.NET.csproj index d5089d41..7825956a 100644 --- a/GUI.NET/GUI.NET.csproj +++ b/GUI.NET/GUI.NET.csproj @@ -149,6 +149,9 @@ + + app.manifest + False @@ -253,6 +256,9 @@ ctrlRecentGames.cs + + UserControl + UserControl @@ -840,8 +846,12 @@ + + + MesenNumericUpDown.cs + diff --git a/GUI.NET/app.manifest b/GUI.NET/app.manifest new file mode 100644 index 00000000..bee14f56 --- /dev/null +++ b/GUI.NET/app.manifest @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + +