Esempio n. 1
0
    /// <summary>
    /// Toggles whether this menu is on or off
    /// </summary>
    public void Toggle(ButtonData data)
    {
        currButtonData = data;
        int id = currButtonData.GetTransitionWindowID();

        if (id == 0)
        {
            TransitionID.text = "Curr Transition ID: None";
        }
        else
        {
            TransitionID.text = "Curr Transition ID: " + id;
        }

        if (id == 0)
        {
            TransitionButtonText.text = "Create Window";
        }
        else
        {
            TransitionButtonText.text = "GoTo Window " + id;
        }
        IDInput.text = string.Empty;

        running = !running;
        ButtonSettingsCanvas.SetActive(running);
    }
Esempio n. 2
0
    /// <summary>
    /// Called by clicking the TransitionButton from the menu
    /// </summary>
    public void OnClick_TransitionButton()
    {
        int id = currButtonData.GetTransitionWindowID();

        if (id == 0 || !UIWindow.WindowExists(currButtonData.GetTransitionWindowID()))
        {
            currButtonData.SetTransitionWindowID(UIManager._instance.CreateNewWindowID());
            id = currButtonData.GetTransitionWindowID();
            TransitionID.text = "Curr Transition ID: " + id;
            TransitionButton.GetComponentInChildren <Text>().text = "GoTo Window " + id;
        }
        else
        {
            //Todo: ask to save first
            UIManager._instance.TransitionToWindow(id, 0);
        }
    }
    /// <summary>
    /// Toggles whether this menu is on or off
    /// </summary>
    public void Toggle(ButtonData data)
    {
        currButtonData = data;
        int id = currButtonData.GetTransitionWindowID();
        if (id == 0)
            TransitionID.text = "Curr Transition ID: None";
        else TransitionID.text = "Curr Transition ID: " + id;

        if (id == 0) {
            TransitionButtonText.text = "Create Window";
        } else {
            TransitionButtonText.text = "GoTo Window " + id;
        }
        IDInput.text = string.Empty;

        running = !running;
        ButtonSettingsCanvas.SetActive(running);
    }