本文整理汇总了C#中IControl.DrawPostStateSelectGUI方法的典型用法代码示例。如果您正苦于以下问题:C# IControl.DrawPostStateSelectGUI方法的具体用法?C# IControl.DrawPostStateSelectGUI怎么用?C# IControl.DrawPostStateSelectGUI使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IControl
的用法示例。
在下文中一共展示了IControl.DrawPostStateSelectGUI方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnInspectorGUI
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
isDirty = false;
control = (IControl)target;
// Have the specific control class's implementation
// draw any control-specific settings:
DrawPrestateSettings();
GUILayout.BeginVertical();
//-------------------------------
// Draw a nice separator:
//-------------------------------
GUILayout.Space(5.0f);
GUILayout.BeginVertical("Toolbar");
GUILayout.BeginHorizontal();
GUILayout.Space(10.0f);
GUILayout.Label("State/Element: ");
GUILayout.FlexibleSpace();
// Start keeping track of any changed values:
BeginMonitorChanges();
// Do the pre-state selection GUI, if any:
control.DrawPreStateSelectGUI(curState, true);
EndMonitorChanges();
// Get the control's state names:
stateNames = control.EnumStateElements();
if (stateNames == null)
return;
// Cap our state to the number of states available:
curState = Mathf.Min(curState, stateNames.Length - 1);
// Choose the state we want to edit:
curState = EditorGUILayout.Popup(curState, stateNames);
GUILayout.FlexibleSpace();
GUILayout.EndHorizontal();
GUILayout.EndVertical();
//-------------------------------
// End separator
//-------------------------------
// Keep track of any changed values:
BeginMonitorChanges();
// Do the post-state selection GUI, if any:
control.DrawPostStateSelectGUI(curState);
EndMonitorChanges();
if (control is IPackableControl)
ShowSpriteSettings();
else
stateInfo = control.GetStateElementInfo(curState);
transitions = stateInfo.transitions;
//-----------------------------------------
// Draw our state label stuff:
//-----------------------------------------
if (stateInfo.stateLabel != null)
{
BeginMonitorChanges();
DoStateLabel();
EndMonitorChanges();
}
//-----------------------------------------
// Draw our transition stuff:
//-----------------------------------------
if (transitions != null)
if (transitions.list != null)
if (transitions.list.Length > 0)
DoTransitionStuff();
GUILayout.Space(10f);
GUILayout.EndVertical();
//.........这里部分代码省略.........