public static void RepaintWindow() { if (s_GradientPicker != null) { s_GradientPicker.Repaint(); } }
public static void RepaintWindow() { if (s_GradientPicker == null) { return; } s_GradientPicker.Repaint(); }
static void PrepareShow(bool hdr) { if (s_GradientPicker == null) { string title = hdr ? "HDR Gradient Editor" : "Gradient Editor"; s_GradientPicker = (GradientPicker)GetWindow(typeof(GradientPicker), true, title, false); Vector2 minSize = new Vector2(360, 224); Vector2 maxSize = new Vector2(1900, 3000); s_GradientPicker.minSize = minSize; s_GradientPicker.maxSize = maxSize; s_GradientPicker.wantsMouseMove = true; s_GradientPicker.ShowAuxWindow(); // Use this if auto close on lost focus is wanted. } else { s_GradientPicker.Repaint(); // Ensure we get a OnGUI so we refresh if new gradient } }