Example #1
0
    private void Select()
    {
        MenuListItem selectedItem = currentMenu.CurrentItem();

        Debug.Log("Select " + selectedItem.itemText);
        if (selectedItem is SubMenuListItem)
        {
            currentMenu.DisplayMenu(false);
            currentMenu = (SubMenuListItem)selectedItem;
            currentMenu.DisplayMenu(true);
        }
        else
        {
            selectedItem.Select();
        }
    }
Example #2
0
    private void Back()
    {
        SubMenuListItem parentMenu = currentMenu.ParentItem();

        if (parentMenu == null)
        {
            SetPauseState(false);
            return;
        }

        currentMenu.DisplayMenu(false);
        currentMenu = parentMenu;
        currentMenu.DisplayMenu(true);
    }
Example #3
0
    public void SetPauseState(bool _paused)
    {
        paused = _paused;
        TimeController.Pause(paused);

        if (rootMenu == null)
        {
            return;
        }

        if (paused)
        {
            currentMenu = rootMenu;
            currentMenu.DisplayMenu(true);
        }
        else
        {
            currentMenu.DisplayMenu(false);
        }
    }