Пример #1
0
    /// <summary>
    ///
    /// </summary>
    public virtual void DeactivateAllSubmenus()
    {
        SelectorMenu.Instance.gameObject.SetActive(true);
        if (RenameDialog.Visible)
        {
            RenameDialog.Cancel();
        }
        TransformMenu.Instance.Hide();
        RobotSteppingMenu.Instance.Hide();

        MainSettingsMenu.Instance.Hide();
        ActionObjectMenu.Instance.Hide();

        FavoritesButtons.SetActive(false);
        HomeButtons.SetActive(false);
        UtilityButtons.SetActive(false);
        AddButtons.SetActive(false);
        RobotButtons.SetActive(false);

        FavoritesButton.GetComponent <Image>().enabled = false;
        RobotButton.GetComponent <Image>().enabled     = false;
        AddButton.GetComponent <Image>().enabled       = false;
        UtilityButton.GetComponent <Image>().enabled   = false;
        HomeButton.GetComponent <Image>().enabled      = false;

        MainSettingsButton.GetComponent <Image>().enabled  = false;
        MoveButton.GetComponent <Image>().enabled          = false;
        MoveButton2.GetComponent <Image>().enabled         = false;
        OpenMenuButton.GetComponent <Image>().enabled      = false;
        RobotSelectorButton.GetComponent <Image>().enabled = false;
        RobotSteppingButton.GetComponent <Image>().enabled = false;
        RobotSelector.Close(false);
    }
Пример #2
0
    public void SetActiveSubmenu(LeftMenuSelection which, bool active = true)
    {
        DeactivateAllSubmenus();
        CurrentSubmenuOpened = which;
        if (!active)
        {
            return;
        }
        switch (which)
        {
        case LeftMenuSelection.None:
            break;

        case LeftMenuSelection.Favorites:
            FavoritesButtons.SetActive(active);
            FavoritesButton.GetComponent <Image>().enabled = active;
            break;

        case LeftMenuSelection.Add:
            AddButtons.SetActive(active);
            AddButton.GetComponent <Image>().enabled = active;
            break;

        case LeftMenuSelection.Utility:
            UtilityButtons.SetActive(active);
            UtilityButton.GetComponent <Image>().enabled = active;
            break;

        case LeftMenuSelection.Home:
            HomeButtons.SetActive(active);
            HomeButton.GetComponent <Image>().enabled = active;
            UpdateBuildAndSaveBtns();
            break;

        case LeftMenuSelection.Robot:
            RobotButtons.SetActive(active);
            RobotButton.GetComponent <Image>().enabled = active;
            break;
        }
    }