public static GUIMMColorPopUp ( |
||
rect | ||
boolProp | UnityEditor.SerializedProperty | |
Résultat | void |
public void GUIMinMaxColor(GUIContent label, SerializedMinMaxColor minMaxColor) { Rect rect1 = ModuleUI.PrefixLabel(ModuleUI.GetControlRect(13), label); float width = (float)((double)rect1.width - 13.0 - 5.0); if (!minMaxColor.minMax.boolValue) { ModuleUI.GUIColor(new Rect(rect1.x, rect1.y, width, rect1.height), minMaxColor.maxColor); } else { Rect rect2 = new Rect(rect1.x, rect1.y, (float)((double)width * 0.5 - 2.0), rect1.height); ModuleUI.GUIColor(rect2, minMaxColor.minColor); rect2.x += rect2.width + 4f; ModuleUI.GUIColor(rect2, minMaxColor.maxColor); } ModuleUI.GUIMMColorPopUp(new Rect(rect1.xMax - 13f, rect1.y, 13f, 13f), minMaxColor.minMax); }
public void GUIMinMaxColor(GUIContent label, SerializedMinMaxColor minMaxColor) { Rect totalPosition = ModuleUI.GetControlRect(13); totalPosition = ModuleUI.PrefixLabel(totalPosition, label); float num = totalPosition.width - 13f - 5f; if (!minMaxColor.minMax.boolValue) { Rect rect = new Rect(totalPosition.x, totalPosition.y, num, totalPosition.height); ModuleUI.GUIColor(rect, minMaxColor.maxColor); } else { Rect rect2 = new Rect(totalPosition.x, totalPosition.y, num * 0.5f - 2f, totalPosition.height); ModuleUI.GUIColor(rect2, minMaxColor.minColor); rect2.x += rect2.width + 4f; ModuleUI.GUIColor(rect2, minMaxColor.maxColor); } Rect rect3 = new Rect(totalPosition.xMax - 13f, totalPosition.y, 13f, 13f); ModuleUI.GUIMMColorPopUp(rect3, minMaxColor.minMax); }