Ejemplo n.º 1
0
    public void goBackInHistory()
    {
        if (panelNavigator == null)
        {
            panelNavigator = PanelNavigator.Instance;
        }

        bool previousPanel = false;

        if (panelNavigator.currentSubPanelNavigator != null)
        {
            //FIXME: Quick fix for list that is not really displayed in a next panel...
            if (panelNavigator.currentSubPanelNavigator.getCurrentIndex() == 0)
            {
                workoutPanel.createWorkout();
            }
            else
            {
                //Is a subpanel assigned and can we go back in history
                previousPanel = panelNavigator.currentSubPanelNavigator.goToPreviousInHistory();
            }
        }
        else
        {
            //If not sub panel history then check top panels
            if (!previousPanel)
            {
                previousPanel = panelNavigator.goToPreviousInHistory();
            }
            else
            {
                Application.Quit();
            }
        }
    }
Ejemplo n.º 2
0
 public void Awake()
 {
     Instance = this;
 }