From 56d425d49f48cd6856d80e2df78a168ac954151c Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 23 Nov 2014 23:35:00 +0000 Subject: [PATCH] Core Features form - show icons based on completeness --- BizHawk.Client.EmuHawk/CoreFeatureAnalysis.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/BizHawk.Client.EmuHawk/CoreFeatureAnalysis.cs b/BizHawk.Client.EmuHawk/CoreFeatureAnalysis.cs index 33c10ce961..ee162830b3 100644 --- a/BizHawk.Client.EmuHawk/CoreFeatureAnalysis.cs +++ b/BizHawk.Client.EmuHawk/CoreFeatureAnalysis.cs @@ -23,6 +23,11 @@ namespace BizHawk.Client.EmuHawk 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 .GetAssembly(typeof(IEmulator)) .GetTypes() @@ -57,9 +62,11 @@ namespace BizHawk.Client.EmuHawk var coreNode = new TreeNode { 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) { bool isImplemented = false; @@ -101,10 +108,15 @@ namespace BizHawk.Client.EmuHawk }); } } + else + { + missingImplementation = true; + } coreNode.Nodes.Add(serviceNode); } + coreNode.ImageKey = missingImplementation ? "Bad" : "Good"; CoreTree.Nodes.Add(coreNode); }