本文整理汇总了C#中UIPanelBase类的典型用法代码示例。如果您正苦于以下问题:C# UIPanelBase类的具体用法?C# UIPanelBase怎么用?C# UIPanelBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UIPanelBase类属于命名空间,在下文中一共展示了UIPanelBase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnInspectorGUI
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
isDirty = false;
panel = (UIPanelBase)target;
GUILayout.BeginVertical();
//-----------------------------------------
// Draw our transition stuff:
//-----------------------------------------
if (panel.Transitions != null)
if (panel.Transitions.list != null)
if (panel.Transitions.list.Length > 0)
DoTransitionStuff();
GUILayout.Space(10f);
GUILayout.EndVertical();
// Set dirty if anything changed:
if (isDirty)
EditorUtility.SetDirty(panel);
}
开发者ID:juliancruz87,项目名称:transpp,代码行数:32,代码来源:UIPanelBaseInspector.cs
示例2: DecrementTransitioningPanels
protected void DecrementTransitioningPanels(UIPanelBase p, EZTransition t)
{
--transitioningPanelCount;
}
开发者ID:amutnick,项目名称:CrackTheCode_Repo,代码行数:4,代码来源:UIPanelManager.cs
示例3: LoadSceneDelegate
// Called when the loading panel's transition ends.
public void LoadSceneDelegate(UIPanelBase panel, EZTransition trans)
{
LoadScene();
}
开发者ID:robert-irribarren,项目名称:TraumaOR,代码行数:5,代码来源:UIBtnLoadScene.cs
示例4: OnGUI
public void OnGUI()
{
bool needRepaint = false;
isDirty = false;
if (restarted)
{
selGO = null;
panel = null;
OnSelectionChange();
restarted = false;
}
// See if we need to update our selection:
if (Selection.activeGameObject != selGO)
OnSelectionChange();
//#if UNITY_IPHONE && !(UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9 || UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9)
if(Selection.activeGameObject != null)
panel = (UIPanelBase)Selection.activeGameObject.GetComponent(typeof(UIPanelBase));
//#endif
// Bailout if we don't have valid values:
if (panel == null)
{
PrintNoSelectMsg();
return;
}
//-----------------------------------------
// Draw our transition stuff:
//-----------------------------------------
if (panel.Transitions != null)
if (panel.Transitions.list != null)
if (panel.Transitions.list.Length > 0)
DoTransitionStuff();
GUILayout.Space(10f);
// Set dirty if anything changed:
if (isDirty)
{
EditorUtility.SetDirty(panel);
}
if (needRepaint)
Repaint();
}
开发者ID:juliancruz87,项目名称:Ataraxia,代码行数:51,代码来源:UIPanelEditor.cs
示例5: BringInImmediate
/// <summary>
/// Same as BringIn(...), but skips the panel's transition, fast-forwarding
/// it instantly to its end state. See the corresponding BringIn() entry for more details.
/// </summary>
/// <param name="panel">Reference to the panel to bring up.</param>
public void BringInImmediate(UIPanelBase panel)
{
BringInImmediate(panel, MENU_DIRECTION.Auto);
}
开发者ID:amutnick,项目名称:CrackTheCode_Repo,代码行数:9,代码来源:UIPanelManager.cs
示例6: PastePanel
static void PastePanel(UIPanelBase panel)
{
transList[0].CopyTo(panel.Transitions, true);
transList[0].MarkAllInitialized();
EditorUtility.SetDirty(panel.gameObject);
Debug.Log("Transitions Pasted");
}
开发者ID:jordan1818,项目名称:JumpsterProject,代码行数:9,代码来源:CopyTransitions.cs
示例7: CopyPanel
static void CopyPanel(UIPanelBase panel)
{
transList = new EZTransitionList[1];
transList[0] = new EZTransitionList();
panel.Transitions.CopyToNew(transList[0], true);
transList[0].MarkAllInitialized();
Debug.Log("Transitions Copied");
}
开发者ID:jordan1818,项目名称:JumpsterProject,代码行数:9,代码来源:CopyTransitions.cs
示例8: StartAndTrack
// Starts a panel transitioning and tracks it
protected void StartAndTrack(UIPanelBase p, SHOW_MODE mode)
{
p.StartTransition(mode);
// See if it didn't quit immediately:
if (p.IsTransitioning)
{
p.AddTempTransitionDelegate(DecrementTransitioningPanels);
++transitioningPanelCount;
}
}
开发者ID:amutnick,项目名称:CrackTheCode_Repo,代码行数:12,代码来源:UIPanelManager.cs
示例9: BringIn
/// <summary>
/// Brings in the specified panel in a manner
/// that portrays the menu moving in the
/// specified direction. If "Auto" is specified
/// for the direction, forward/backward is
/// determined by comparing the index of the
/// current panel to the one being brought up.
/// </summary>
/// <param name="panel">Reference to the panel to bring up.</param>
/// <param name="dir">Direction the menu should appear to be moving.
/// If "Auto" is specified, the direction is determined by comparing
/// the index of the current panel to the one being brought up.</param>
public void BringIn(UIPanelBase panel, MENU_DIRECTION dir)
{
SHOW_MODE dismissMode;
SHOW_MODE bringInMode;
if (curPanel == panel)
return; // Nothing to do!
if(dir == MENU_DIRECTION.Auto)
{
// See if we can determine the direction:
if (curPanel != null)
{
// Forward
if (curPanel.index <= panel.index)
dir = MENU_DIRECTION.Forwards;
else // Backward
dir = MENU_DIRECTION.Backwards;
}
else // Assume forward:
dir = MENU_DIRECTION.Forwards;
}
dismissMode = ( (dir == MENU_DIRECTION.Forwards) ? (SHOW_MODE.DismissForward) : (SHOW_MODE.DismissBack) );
bringInMode = ( (dir == MENU_DIRECTION.Forwards) ? (SHOW_MODE.BringInForward) : (SHOW_MODE.BringInBack) );
// Dismiss the current panel:
if (curPanel != null)
curPanel.StartTransition(dismissMode);
// Bring in the next panel:
curPanel = panel;
breadcrumbs.Add(curPanel);
if (deactivateAllButInitialAtStart && !curPanel.gameObject.active)
{
curPanel.Start();
curPanel.gameObject.SetActiveRecursively(true);
}
curPanel.StartTransition(bringInMode);
}
开发者ID:AlexanderUrbano,项目名称:shapewars,代码行数:52,代码来源:UIPanelManager.cs
示例10: BringIn
/// <summary>
/// Brings in the specified panel in a manner
/// that portrays the menu moving in the
/// specified direction. If "Auto" is specified
/// for the direction, forward/backward is
/// determined by comparing the index of the
/// current panel to the one being brought up.
/// </summary>
/// <param name="panel">Reference to the panel to bring up.</param>
/// <param name="dir">Direction the menu should appear to be moving.
/// If "Auto" is specified, the direction is determined by comparing
/// the index of the current panel to the one being brought up.</param>
public void BringIn(UIPanelBase panel, MENU_DIRECTION dir)
{
StartCoroutine("Start");
SHOW_MODE dismissMode;
SHOW_MODE bringInMode;
if (curPanel == panel)
return; // Nothing to do!
if (dir == MENU_DIRECTION.Auto)
{
// See if we can determine the direction:
if (curPanel != null)
{
// Forward
if (curPanel.index <= panel.index)
dir = MENU_DIRECTION.Forwards;
else // Backward
dir = MENU_DIRECTION.Backwards;
}
else // Assume forward:
dir = MENU_DIRECTION.Forwards;
}
dismissMode = ((dir == MENU_DIRECTION.Forwards) ? (SHOW_MODE.DismissForward) : (SHOW_MODE.DismissBack));
bringInMode = ((dir == MENU_DIRECTION.Forwards) ? (SHOW_MODE.BringInForward) : (SHOW_MODE.BringInBack));
// Dismiss the current panel:
if (curPanel != null)
StartAndTrack(curPanel, dismissMode);
// Bring in the next panel:
curPanel = panel;
breadcrumbs.Add(curPanel);
#if UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9
if (deactivateAllButInitialAtStart && !curPanel.gameObject.activeInHierarchy)
{
curPanel.Start();
curPanel.gameObject.SetActive(true);
}
#else
if (deactivateAllButInitialAtStart && !curPanel.gameObject.active)
{
curPanel.Start();
curPanel.gameObject.SetActiveRecursively(true);
}
#endif
StartAndTrack(curPanel, bringInMode);
}
开发者ID:amutnick,项目名称:CrackTheCode_Repo,代码行数:62,代码来源:UIPanelManager.cs
示例11: CompareIndices
// Compares panel indices so they can be sorted this way.
public static int CompareIndices(UIPanelBase a, UIPanelBase b)
{
return a.index - b.index;
}
开发者ID:juliancruz87,项目名称:transpp,代码行数:5,代码来源:UIPanelBase.cs
示例12: CopyPanel
static void CopyPanel(UIPanelBase panel)
{
transList = new EZTransitionList[1];
transList[0] = new EZTransitionList();
panel.Transitions.CopyToNew(transList[0], true);
transList[0].MarkAllInitialized();
PatStuff.ScreenLog.AddMessage("Transitions Copied");
}
开发者ID:adahera222,项目名称:properme,代码行数:9,代码来源:CopyTransitions.cs
示例13: PastePanel
static void PastePanel(UIPanelBase panel)
{
transList[0].CopyTo(panel.Transitions, true);
transList[0].MarkAllInitialized();
EditorUtility.SetDirty(panel.gameObject);
PatStuff.ScreenLog.AddMessage("Transitions Pasted");
}
开发者ID:adahera222,项目名称:properme,代码行数:9,代码来源:CopyTransitions.cs
示例14: OnSelectionChange
public void OnSelectionChange()
{
bool somethingChanged = false;
if (panel != null)
{
if (panel.gameObject != Selection.activeGameObject)
{
somethingChanged = true;
}
}
else
somethingChanged = true;
if (somethingChanged)
{
if (Selection.activeGameObject != null)
{
panel = (UIPanelBase)Selection.activeGameObject.GetComponent(typeof(UIPanelBase));
selGO = Selection.activeGameObject;
curTrans = 0;
curTransElement = 0;
}
else
{
selGO = null;
panel = null;
}
}
Repaint();
}
开发者ID:juliancruz87,项目名称:Ataraxia,代码行数:32,代码来源:UIPanelEditor.cs
示例15: LoadSceneDelegate
// Called when the loading panel's transition ends.
public void LoadSceneDelegate(UIPanelBase panel, EZTransition trans)
{
StartCoroutine(LoadScene());
}
开发者ID:jordan1818,项目名称:JumpsterProject,代码行数:5,代码来源:UIBtnLoadScene.cs
示例16: StopLoading
void StopLoading(UIPanelBase panel, EZTransition transition)
{
Flow.game_native.stopLoading();
}
开发者ID:uptopgames,项目名称:Minesweeper,代码行数:4,代码来源:Invite.cs
示例17: Copy
public override void Copy(SpriteRoot s, ControlCopyFlags flags)
{
base.Copy(s, flags);
if (!(s is UIBtnLoadScene))
return;
UIBtnLoadScene b = (UIBtnLoadScene)s;
if ((flags & ControlCopyFlags.Settings) == ControlCopyFlags.Settings)
{
scene = b.scene;
loadingPanel = b.loadingPanel;
}
}
开发者ID:robert-irribarren,项目名称:TraumaOR,代码行数:15,代码来源:UIBtnLoadScene.cs
示例18: MoveBack
/// <summary>
/// Moves the menu back to the previous panel
/// in the sequence (determined by panel
/// index). Automatically dismisses the
/// currently displaying panel using the
/// "back" mode.
/// </summary>
/// <returns>True if the there are more panels
/// before this one. False if this is the first
/// panel, or if the menu was already at the
/// beginning.</returns>
public bool MoveBack()
{
// If this isn't a linear menu, use our history
// to go backward:
if (!linearNavigation)
{
// See if we're at the beginning:
if (breadcrumbs.Count <= 1)
{
if (advancePastEnd)
{
// Send away the current panel:
if (curPanel != null)
StartAndTrack(curPanel, SHOW_MODE.DismissBack);
curPanel = null;
// Don't add more than one null on the stack:
if (breadcrumbs.Count > 0)
{
if (breadcrumbs[breadcrumbs.Count - 1] != null)
breadcrumbs.Add(null);
}
else
breadcrumbs.Add(null);
}
return false; // We're at the beginning
}
// Go back in our history:
if (breadcrumbs.Count != 0)
breadcrumbs.RemoveAt(breadcrumbs.Count - 1);
// Send away the current panel:
if (curPanel != null)
StartAndTrack(curPanel, SHOW_MODE.DismissBack);
// Bring in the previous panel:
if (breadcrumbs.Count > 0)
curPanel = breadcrumbs[breadcrumbs.Count - 1];
if (curPanel != null)
{
#if UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_4_8 || UNITY_4_9
if (deactivateAllButInitialAtStart && !curPanel.gameObject.activeInHierarchy)
{
curPanel.Start();
curPanel.gameObject.SetActive(true);
}
#else
if (deactivateAllButInitialAtStart && !curPanel.gameObject.active)
{
curPanel.Start();
curPanel.gameObject.SetActiveRecursively(true);
}
#endif
StartAndTrack(curPanel, SHOW_MODE.BringInBack);
}
// Return false if we've reached the beginning:
if (breadcrumbs.Count <= 1)
return false;
else
return true;
}
else // Else this is a linear menu, so just go back to the previous panel in our array
{
int index = panels.IndexOf(curPanel);
// If we're at the first index:
if (index <= 0)
{
if (!circular)
{
if (advancePastEnd)
{
// Send away the current panel:
if (curPanel != null)
StartAndTrack(curPanel, SHOW_MODE.DismissBack);
curPanel = null;
}
return false; // We're already at the beginning
}
else
{
// Wrap back to the end:
index = panels.Count;
//.........这里部分代码省略.........
开发者ID:amutnick,项目名称:CrackTheCode_Repo,代码行数:101,代码来源:UIPanelManager.cs
示例19: MoveForward
/// <summary>
/// Moves the menu forward to the next panel
/// in the sequence (determined by panel
/// index). Automatically dismisses the
/// currently displaying panel using the
/// forward mode.
/// </summary>
/// <returns>True if the there are more panels
/// after this one. False if this is the last
/// panel, or if the menu was already at the end.</returns>
public bool MoveForward()
{
int index = panels.IndexOf(curPanel);
if (index >= panels.Count - 1)
{
// See if we should wrap to the beginning:
if (!circular)
{
// See if we should advance past the end:
if (advancePastEnd)
{
// Send away the current panel:
if (curPanel != null)
curPanel.StartTransition(SHOW_MODE.DismissForward);
curPanel = null;
// Don't add more than one null on the stack:
if(breadcrumbs.Count > 0)
{
if (breadcrumbs[breadcrumbs.Count - 1] != null)
breadcrumbs.Add(null);
}
else
breadcrumbs.Add(null);
}
return false; // We're already at the end
}
else
index = -1; // Wrap back to the beginning
}
// Send away the current panel:
if (curPanel != null)
curPanel.StartTransition(SHOW_MODE.DismissForward);
// Bring in the next panel:
++index;
curPanel = panels[index];
breadcrumbs.Add(curPanel);
if (deactivateAllButInitialAtStart && !curPanel.gameObject.active)
{
curPanel.Start();
curPanel.gameObject.SetActiveRecursively(true);
}
curPanel.StartTransition(SHOW_MODE.BringInForward);
if (index >= panels.Count - 1 && !circular)
return false;
else
return true;
}
开发者ID:AlexanderUrbano,项目名称:shapewars,代码行数:65,代码来源:UIPanelManager.cs
示例20: Start
IEnumerator Start()
{
ScanChildren();
if (initialPanel != null)
{
curPanel = initialPanel;
breadcrumbs.Add(curPanel);
}
if (circular)
linearNavigation = true;
if(deactivateAllButInitialAtStart)
{
// Wait a frame so the contents of the panels
// are done Start()'ing, or else we'll get
// unhidden stuff:
yield return null;
for (int i = 0; i<panels.Count; ++i)
if (panels[i] != initialPanel && panels[i] != curPanel)
panels[i].gameObject.SetActiveRecursively(false);
}
}
开发者ID:exdev,项目名称:urban-survivors,代码行数:25,代码来源:UIPanelManager.cs
注:本文中的UIPanelBase类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论