Dismiss() public method

Dismisses the panel by playing its "Dismiss Forward" transition.
public Dismiss ( ) : void
return void
Esempio n. 1
0
    protected void DoPanelStuff()
    {
        if (toggle)
        {
            if (panelManager != null)
            {
                if (panelManager.CurrentPanel == panel)
                {
                    panelManager.Dismiss(UIPanelManager.MENU_DIRECTION.Forwards);
                    panelIsShowing = false;
                }
                else
                {
                    panelManager.BringIn(panel);
                    panelIsShowing = true;
                }
            }
            else
            {
                if (panelIsShowing)
                {
                    panel.Dismiss();
                }
                else
                {
                    panel.BringIn();
                }

                panelIsShowing = !panelIsShowing;
            }

            base.Value = panelIsShowing;
        }
        else
        {
            if (panelManager != null)
            {
                panelManager.BringIn(panel, UIPanelManager.MENU_DIRECTION.Forwards);
            }
            else
            {
                panel.BringIn();
            }
        }
    }