예제 #1
0
        // Helper function that gets a color from the user's preferences
        public Color GetColor(string path, Color defaultColor)
        {
            // Initialize default values
            int r = (int)defaultColor.r;
            int g = (int)defaultColor.g;
            int b = (int)defaultColor.b;

            // Get the color from the options
            Led.GetConfigOption(path, ref r, ref g, ref b);
            // Return the received color (or default if none)
            return(new Color(r, g, b));
        }