示例#1
0
        public static Color GetFontColour(ButtonEffect effect, bool ignoreUserSettings)
        {
            if (ignoreUserSettings == false)
            {
                UserColourSetting setting = UserColourSettingManager.GetColourSettings(effect);
                if (setting != null)
                {
                    return(setting.FontColour);
                }
            }

            return(Color.Black);
        }
示例#2
0
        public static ColorMatrix GetMatrix(ButtonEffect effect, bool ignoreUserSettings = false)
        {
            if (ignoreUserSettings == false)
            {
                UserColourSetting setting = UserColourSettingManager.GetColourSettings(effect);
                if (setting != null)
                {
                    return(setting.Matrix);
                }
            }

            ColorMatrix cm = null;

            switch (effect)
            {
            case ButtonEffect.None:
                cm = new ColorMatrix();
                break;

            case ButtonEffect.Mapped:
                cm = Blue();
                break;

            case ButtonEffect.Disabled:
                cm = Darken(-0.3F);
                break;

            case ButtonEffect.MappedPending:
                cm = GreenyBlue();
                break;

            case ButtonEffect.UnmappedPending:
                cm = Golden();
                break;

            case ButtonEffect.DisabledPending:
                cm = DarkGold();
                break;

            case ButtonEffect.EnabledPending:
                cm = GoldenDarken();
                break;
            }

            return(cm);
        }