From 163ee0e6fd5888d514da49e9296533e14b470193 Mon Sep 17 00:00:00 2001 From: adelikat Date: Thu, 19 Dec 2013 18:18:40 +0000 Subject: [PATCH] Path Config - remove Firmwares buttons in system specific tabs, instead add a ? icon in global next to the firmware path that opens the firmware config dialog --- BizHawk.Client.EmuHawk/config/PathConfig.cs | 22 ++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/BizHawk.Client.EmuHawk/config/PathConfig.cs b/BizHawk.Client.EmuHawk/config/PathConfig.cs index 32406729aa..72447dc11b 100644 --- a/BizHawk.Client.EmuHawk/config/PathConfig.cs +++ b/BizHawk.Client.EmuHawk/config/PathConfig.cs @@ -152,10 +152,16 @@ namespace BizHawk.Client.EmuHawk BrowseFolder(tempBox, tempPath, tempSystem); }; + int infoPadding = 0; + if (tabPage.Name.Contains("Global") && path.Type == "Firmware") + { + infoPadding = 26; + } + var label = new Label { Text = path.Type, - Location = new Point(widgetOffset + buttonWidth + padding, ypos + 4), + Location = new Point(widgetOffset + buttonWidth + padding + infoPadding, ypos + 4), Width = 100, Name = path.Type, Anchor = AnchorStyles.Top | AnchorStyles.Right, @@ -174,17 +180,18 @@ namespace BizHawk.Client.EmuHawk sys = "PCECD"; } - var hasFirmwares = FirmwaresConfig.SystemGroupNames.Any(x => x.Key == sys); - - if (hasFirmwares) + if (tabPage.Name.Contains("Global")) { var firmwareButton = new Button { Name = sys, - Text = "&Firmware", - Location = new Point(xpos, ypos), - Width = 75, + Text = String.Empty, + Image = Properties.Resources.Help, + Location = new Point(499, 253), + Width = 26, + Anchor = AnchorStyles.Top | AnchorStyles.Right }; + firmwareButton.Click += delegate { var f = new FirmwaresConfig { TargetSystem = sys }; @@ -304,6 +311,7 @@ namespace BizHawk.Client.EmuHawk t.Controls.Add(firmwareButton); } + tabPages.Add(t); }