public static GUIBoolAsPopup ( |
||
label | ||
boolProp | UnityEditor.SerializedProperty | |
options | string | |
리턴 | bool |
public static bool GUIBoolAsPopup(GUIContent label, SerializedProperty boolProp, string[] options, params GUILayoutOption[] layoutOptions)
{
Rect position = PrefixLabel(GetControlRect(13, layoutOptions), label);
int selectedIndex = !boolProp.boolValue ? 0 : 1;
int num2 = EditorGUI.Popup(position, selectedIndex, options, ParticleSystemStyles.Get().popup);
if (num2 != selectedIndex)
{
boolProp.boolValue = num2 > 0;
}
return (num2 > 0);
}
public override void OnInspectorGUI(ParticleSystem s) { if (VelocityModuleUI.s_Texts == null) { VelocityModuleUI.s_Texts = new VelocityModuleUI.Texts(); } base.GUITripleMinMaxCurve(GUIContent.none, VelocityModuleUI.s_Texts.x, this.m_X, VelocityModuleUI.s_Texts.y, this.m_Y, VelocityModuleUI.s_Texts.z, this.m_Z, null); ModuleUI.GUIBoolAsPopup(VelocityModuleUI.s_Texts.space, this.m_InWorldSpace, VelocityModuleUI.s_Texts.spaces); }