コード例 #1
0
        public override bool Enabled(MemberInfo member, GameParameters parameters)
        {
            if (member.Name == "highlightRed" || member.Name == "highlightGreen" || member.Name == "highlightBlue")
            {
                return(false);
            }

            if (showColorPicker)
            {
                showColorPicker = false;
                Color c = new Color(1, 1, 1, 1);
                c.b = highlightBlue;
                c.g = highlightGreen;
                c.r = highlightRed;
                KSP_ColorPicker.CreateColorPicker(c, false, "ColorCircle");
            }
            return(true);
        }
コード例 #2
0
        public override bool Enabled(MemberInfo member, GameParameters parameters)
        {
            if (member.Name.StartsWith("highlight"))
            {
                return(false);
            }

            if (showColorPickerA)
            {
                activeColorPicker = "A";
                showColorPickerA  = false;
                Color c = new Color(1, 1, 1, 1);
                c.b = highlightBlueA;
                c.g = highlightGreenA;
                c.r = highlightRedA;
                KSP_ColorPicker.CreateColorPicker(c, false, "ColorCircle");
            }
#if false
            if (showColorPickerB)
            {
                activeColorPicker = "B";
                showColorPickerB  = false;
                Color c = new Color(1, 1, 1, 1);
                c.b = highlightBlueB;
                c.g = highlightGreenB;
                c.r = highlightRedB;
                KSP_ColorPicker.CreateColorPicker(c, false, "ColorCircle");
            }
            if (showColorPickerC)
            {
                activeColorPicker = "C";
                showColorPickerC  = false;
                Color c = new Color(1, 1, 1, 1);
                c.b = highlightBlueC;
                c.g = highlightGreenC;
                c.r = highlightRedC;
                KSP_ColorPicker.CreateColorPicker(c, false, "ColorCircle");
            }
#endif
            return(true);
        }