Start() public static method

public static Start ( GUIView viewToUpdate ) : void
viewToUpdate GUIView
return void
示例#1
0
        private void DoColorSwatchAndEyedropper()
        {
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            if (GUILayout.Button(ColorPicker.styles.eyeDropper, GUIStyle.none, new GUILayoutOption[]
            {
                GUILayout.Width(40f),
                GUILayout.ExpandWidth(false)
            }))
            {
                EyeDropper.Start(this.m_Parent);
                this.m_ColorBoxMode = ColorPicker.ColorBoxMode.EyeDropper;
                GUIUtility.ExitGUI();
            }
            Color color = new Color(this.m_R, this.m_G, this.m_B, this.m_A);
            Rect  rect  = GUILayoutUtility.GetRect(20f, 20f, 20f, 20f, ColorPicker.styles.colorPickerBox, new GUILayoutOption[]
            {
                GUILayout.ExpandWidth(true)
            });

            EditorGUIUtility.DrawColorSwatch(rect, color, this.m_ShowAlpha);
            if (Event.current.type == EventType.Repaint)
            {
                ColorPicker.styles.pickerBox.Draw(rect, GUIContent.none, false, false, false, false);
            }
            GUILayout.EndHorizontal();
        }
示例#2
0
 public static void Start(Action <Color> colorPickedCallback, bool stealFocus = true)
 {
     EyeDropper.Start(null, colorPickedCallback, stealFocus);
 }
示例#3
0
 public static void Start(GUIView viewToUpdate, bool stealFocus = true)
 {
     EyeDropper.Start(viewToUpdate, null, stealFocus);
 }