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);
};
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);
}