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

This commit is contained in:
adelikat 2013-12-19 18:18:40 +00:00
parent 5a8afc0411
commit 163ee0e6fd
1 changed files with 15 additions and 7 deletions

View File

@ -152,10 +152,16 @@ namespace BizHawk.Client.EmuHawk
BrowseFolder(tempBox, tempPath, tempSystem); BrowseFolder(tempBox, tempPath, tempSystem);
}; };
int infoPadding = 0;
if (tabPage.Name.Contains("Global") && path.Type == "Firmware")
{
infoPadding = 26;
}
var label = new Label var label = new Label
{ {
Text = path.Type, Text = path.Type,
Location = new Point(widgetOffset + buttonWidth + padding, ypos + 4), Location = new Point(widgetOffset + buttonWidth + padding + infoPadding, ypos + 4),
Width = 100, Width = 100,
Name = path.Type, Name = path.Type,
Anchor = AnchorStyles.Top | AnchorStyles.Right, Anchor = AnchorStyles.Top | AnchorStyles.Right,
@ -174,17 +180,18 @@ namespace BizHawk.Client.EmuHawk
sys = "PCECD"; sys = "PCECD";
} }
var hasFirmwares = FirmwaresConfig.SystemGroupNames.Any(x => x.Key == sys); if (tabPage.Name.Contains("Global"))
if (hasFirmwares)
{ {
var firmwareButton = new Button var firmwareButton = new Button
{ {
Name = sys, Name = sys,
Text = "&Firmware", Text = String.Empty,
Location = new Point(xpos, ypos), Image = Properties.Resources.Help,
Width = 75, Location = new Point(499, 253),
Width = 26,
Anchor = AnchorStyles.Top | AnchorStyles.Right
}; };
firmwareButton.Click += delegate firmwareButton.Click += delegate
{ {
var f = new FirmwaresConfig { TargetSystem = sys }; var f = new FirmwaresConfig { TargetSystem = sys };
@ -304,6 +311,7 @@ namespace BizHawk.Client.EmuHawk
t.Controls.Add(firmwareButton); t.Controls.Add(firmwareButton);
} }
tabPages.Add(t); tabPages.Add(t);
} }