Core Features form - show icons based on completeness
This commit is contained in:
parent
c21b3a8a34
commit
56d425d49f
|
@ -23,6 +23,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private void CoreFeatureAnalysis_Load(object sender, EventArgs e)
|
private void CoreFeatureAnalysis_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
CoreTree.ImageList = new ImageList();
|
||||||
|
CoreTree.ImageList.Images.Add("Good", Properties.Resources.GreenCheck);
|
||||||
|
CoreTree.ImageList.Images.Add("Bad", Properties.Resources.ExclamationRed);
|
||||||
|
|
||||||
|
|
||||||
var services = Assembly
|
var services = Assembly
|
||||||
.GetAssembly(typeof(IEmulator))
|
.GetAssembly(typeof(IEmulator))
|
||||||
.GetTypes()
|
.GetTypes()
|
||||||
|
@ -57,9 +62,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
var coreNode = new TreeNode
|
var coreNode = new TreeNode
|
||||||
{
|
{
|
||||||
Text = core.CoreAttributes.CoreName + (core.CoreAttributes.Released ? string.Empty : " (UNRELEASED)"),
|
Text = core.CoreAttributes.CoreName + (core.CoreAttributes.Released ? string.Empty : " (UNRELEASED)"),
|
||||||
ForeColor = core.CoreAttributes.Released ? Color.Black : Color.DarkGray
|
ForeColor = core.CoreAttributes.Released ? Color.Black : Color.DarkGray,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool missingImplementation = false;
|
||||||
|
|
||||||
foreach (var service in services)
|
foreach (var service in services)
|
||||||
{
|
{
|
||||||
bool isImplemented = false;
|
bool isImplemented = false;
|
||||||
|
@ -101,10 +108,15 @@ namespace BizHawk.Client.EmuHawk
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
missingImplementation = true;
|
||||||
|
}
|
||||||
|
|
||||||
coreNode.Nodes.Add(serviceNode);
|
coreNode.Nodes.Add(serviceNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
coreNode.ImageKey = missingImplementation ? "Bad" : "Good";
|
||||||
|
|
||||||
CoreTree.Nodes.Add(coreNode);
|
CoreTree.Nodes.Add(coreNode);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue