コード例 #1
0
 public static KSP_ColorPicker CreateColorPicker(Color initialColor, string texturePath = null, bool activePingsNeeded = true, bool destroyOnClose = true)
 {
     if (colorPickerAvailable == true)
     {
         return(KSP_ColorPicker._CreateColorPicker(initialColor, false, texturePath, 0, 0, activePingsNeeded, destroyOnClose));
     }
     return(null);
 }
コード例 #2
0
 public static KSP_ColorPicker CreateColorPicker(Color initialColor, bool useDefinedPosition = false, string texturePath = null,
                                                 int pLeft = 0, int pTop = 0, bool activePingsNeeded = true, bool destroyOnClose = true)
 {
     if (colorPickerAvailable == true)
     {
         return(KSP_ColorPicker._CreateColorPicker(initialColor, useDefinedPosition, texturePath, pLeft, pTop, activePingsNeeded, destroyOnClose));
     }
     return(null);
 }
コード例 #3
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);
        }
コード例 #4
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);
        }