public void Set(Vector2 p, float fWidth, int iFontSize, Color32 c, ColorPickerType type, Action <Color32> f) { rect = new Rect(p.x - fWidth, p.y, fWidth, 0f); fRightPos = p.x + fWidth; fUpPos = p.y; gsLabel = new GUIStyle("label"); gsLabel.fontSize = iFontSize; gsLabel.alignment = TextAnchor.MiddleLeft; gsButton = new GUIStyle("button"); gsButton.fontSize = iFontSize; gsButton.alignment = TextAnchor.MiddleCenter; fMargin = iFontSize * 0.3f; func = f; r = c.r; g = c.g; b = c.b; a = c.a; this.type = type; texture.SetPixel(0, 0, c); texture.Apply(); show = true; }
public static void Set(Vector2 p, float fWidth, int iFontSize, Color32 c, ColorPickerType type, Action <Color32> f) { color.Set(p, fWidth, iFontSize, c, type, f); }
public TControl NormalType(ColorPickerType newValue) { Context.NormalType = newValue; return((TControl)this); }