Esempio n. 1
0
 /// <summary>
 /// Hide a specific UI Element
 /// </summary>
 /// <param name="UIElement">UIELEMENTS: Enum representing the desired element</param>
 /// <remarks>
 /// Remove the element from the queue, then hide it. 
 /// </remarks>
 private void HideUIElement(UIELEMENTS UIElement)
 {
     switch (UIElement)
     {
         case UIELEMENTS.MainMenu:
             RemoveElementFromQueue(mainMenu);
             mainMenu.SetActive(false);
             break;
         case UIELEMENTS.MainUI:
             break;
         case UIELEMENTS.NewGameUI:
             RemoveElementFromQueue(newGameUI);
             newGameUI.SetActive(false);
             break;
         case UIELEMENTS.LoadGameUI:
             RemoveElementFromQueue(loadGameUI);
             loadGameUI.SetActive(false);
             break;
         case UIELEMENTS.DockingPrompt:
             RemoveElementFromQueue(dockingPrompt);
             dockingPrompt.SetActive(false);
             break;
         case UIELEMENTS.StationMenu:
             RemoveElementFromQueue(stationMenu);
             stationMenu.SetActive(false);
             break;
         case UIELEMENTS.ShopMenu:
             RemoveElementFromQueue(shopMenu);
             shopMenu.SetActive(false);
             break;
         case UIELEMENTS.ShipyardMenu:
             RemoveElementFromQueue(shipyardMenu);
             shipyardMenu.SetActive(false);
             break;
         case UIELEMENTS.BarMenu:
             RemoveElementFromQueue(barMenu);
             barMenu.SetActive(false);
             break;
         case UIELEMENTS.JumpgateTollMenu:
             RemoveElementFromQueue(jumpgateTollMenu);
             jumpgateTollMenu.SetActive(false);
             break;
         case UIELEMENTS.ConversationUI:
             RemoveElementFromQueue(conversationUI);
             conversationUI.SetActive(false);
             break;
         case UIELEMENTS.LoadingUI:
             RemoveElementFromQueue(loadingUI);
             loadingUI.SetActive(false);
             break;
         default:
             break;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Hide a specific UI element
 /// </summary>
 /// <param name="UIElement">UIELEMENTS: Enum representing the desired element</param>
 public void HideUI(UIELEMENTS UIElement)
 {
     HideUIElement(UIElement);
 }
Esempio n. 3
0
 /// <summary>
 /// Display a specific UI element
 /// </summary>
 /// <param name="UIElement">UIELEMENTS: Enum representing the desired element</param>
 /// <remarks>
 /// Check the queue for the element, and if it's not there, add it. Then set the panel's 
 /// visibility to TRUE.
 /// </remarks>
 private void ShowUIIndividual(UIELEMENTS UIElement)
 {
     switch (UIElement)
     {
         case UIELEMENTS.MainMenu:
             if (!CheckQueueForElement(mainMenu)) { AddElementToQueue(mainMenu); }
             mainMenu.SetActive(true);
             break;
         case UIELEMENTS.MainUI:
             //if (!CheckQueueForElement(mainUI)) { AddElementToQueue(mainUI); }
             mainUI.SetActive(true);
             break;
         case UIELEMENTS.NewGameUI:
             if (!CheckQueueForElement(newGameUI)) { AddElementToQueue(newGameUI); }
             newGameUI.SetActive(true);
             break;
         case UIELEMENTS.LoadGameUI:
             if (!CheckQueueForElement(loadGameUI)) { AddElementToQueue(loadGameUI); }
             loadGameUI.SetActive(true);
             break;
         case UIELEMENTS.DockingPrompt:
             if (!CheckQueueForElement(dockingPrompt)) { AddElementToQueue(dockingPrompt); }
             dockingPrompt.SetActive(true);
             break;
         case UIELEMENTS.StationMenu:
             if (!CheckQueueForElement(stationMenu)) { AddElementToQueue(stationMenu); }
             stationMenu.SetActive(true);
             break;
         case UIELEMENTS.ShopMenu:
             if (!CheckQueueForElement(shopMenu)) { AddElementToQueue(shopMenu); }
             shopMenu.SetActive(true);
             break;
         case UIELEMENTS.ShipyardMenu:
             if (!CheckQueueForElement(shipyardMenu)) { AddElementToQueue(shipyardMenu); }
             shipyardMenu.SetActive(true);
             break;
         case UIELEMENTS.BarMenu:
             if (!CheckQueueForElement(barMenu)) { AddElementToQueue(barMenu); }
             barMenu.SetActive(true);
             break;
         case UIELEMENTS.JumpgateTollMenu:
             //if (!CheckQueueForElement(jumpgateTollMenu)) { AddElementToQueue(jumpgateTollMenu); }
             jumpgateTollMenu.SetActive(true);
             break;
         case UIELEMENTS.ConversationUI:
             //if (!CheckQueueForElement(conversationUI)) { AddElementToQueue(conversationUI); }
             conversationUI.SetActive(true);
             break;
         case UIELEMENTS.LoadingUI:
             //if (!CheckQueueForElement(conversationUI)) { AddElementToQueue(conversationUI); }
             loadingUI.SetActive(true);
             break;
         default:
             break;
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Display the element identified by the ENUM
 /// </summary>
 /// <param name="UIElement">UIELEMENTS: An enum value</param>
 public void ShowUI(UIELEMENTS UIElement)
 {
     ShowUIIndividual(UIElement);
 }
Esempio n. 5
0
    /// <summary>
    /// Hide a specific UI Element
    /// </summary>
    /// <param name="UIElement">UIELEMENTS: Enum representing the desired element</param>
    /// <remarks>
    /// Remove the element from the queue, then hide it.
    /// </remarks>
    private void HideUIElement(UIELEMENTS UIElement)
    {
        switch (UIElement)
        {
        case UIELEMENTS.MainMenu:
            RemoveElementFromQueue(mainMenu);
            mainMenu.SetActive(false);
            break;

        case UIELEMENTS.MainUI:
            break;

        case UIELEMENTS.NewGameUI:
            RemoveElementFromQueue(newGameUI);
            newGameUI.SetActive(false);
            break;

        case UIELEMENTS.LoadGameUI:
            RemoveElementFromQueue(loadGameUI);
            loadGameUI.SetActive(false);
            break;

        case UIELEMENTS.DockingPrompt:
            RemoveElementFromQueue(dockingPrompt);
            dockingPrompt.SetActive(false);
            break;

        case UIELEMENTS.StationMenu:
            RemoveElementFromQueue(stationMenu);
            stationMenu.SetActive(false);
            break;

        case UIELEMENTS.ShopMenu:
            RemoveElementFromQueue(shopMenu);
            shopMenu.SetActive(false);
            break;

        case UIELEMENTS.ShipyardMenu:
            RemoveElementFromQueue(shipyardMenu);
            shipyardMenu.SetActive(false);
            break;

        case UIELEMENTS.BarMenu:
            RemoveElementFromQueue(barMenu);
            barMenu.SetActive(false);
            break;

        case UIELEMENTS.JumpgateTollMenu:
            RemoveElementFromQueue(jumpgateTollMenu);
            jumpgateTollMenu.SetActive(false);
            break;

        case UIELEMENTS.ConversationUI:
            RemoveElementFromQueue(conversationUI);
            conversationUI.SetActive(false);
            break;

        case UIELEMENTS.LoadingUI:
            RemoveElementFromQueue(loadingUI);
            loadingUI.SetActive(false);
            break;

        default:
            break;
        }
    }
Esempio n. 6
0
    /// <summary>
    /// Display a specific UI element
    /// </summary>
    /// <param name="UIElement">UIELEMENTS: Enum representing the desired element</param>
    /// <remarks>
    /// Check the queue for the element, and if it's not there, add it. Then set the panel's
    /// visibility to TRUE.
    /// </remarks>
    private void ShowUIIndividual(UIELEMENTS UIElement)
    {
        switch (UIElement)
        {
        case UIELEMENTS.MainMenu:
            if (!CheckQueueForElement(mainMenu))
            {
                AddElementToQueue(mainMenu);
            }
            mainMenu.SetActive(true);
            break;

        case UIELEMENTS.MainUI:
            //if (!CheckQueueForElement(mainUI)) { AddElementToQueue(mainUI); }
            mainUI.SetActive(true);
            break;

        case UIELEMENTS.NewGameUI:
            if (!CheckQueueForElement(newGameUI))
            {
                AddElementToQueue(newGameUI);
            }
            newGameUI.SetActive(true);
            break;

        case UIELEMENTS.LoadGameUI:
            if (!CheckQueueForElement(loadGameUI))
            {
                AddElementToQueue(loadGameUI);
            }
            loadGameUI.SetActive(true);
            break;

        case UIELEMENTS.DockingPrompt:
            if (!CheckQueueForElement(dockingPrompt))
            {
                AddElementToQueue(dockingPrompt);
            }
            dockingPrompt.SetActive(true);
            break;

        case UIELEMENTS.StationMenu:
            if (!CheckQueueForElement(stationMenu))
            {
                AddElementToQueue(stationMenu);
            }
            stationMenu.SetActive(true);
            break;

        case UIELEMENTS.ShopMenu:
            if (!CheckQueueForElement(shopMenu))
            {
                AddElementToQueue(shopMenu);
            }
            shopMenu.SetActive(true);
            break;

        case UIELEMENTS.ShipyardMenu:
            if (!CheckQueueForElement(shipyardMenu))
            {
                AddElementToQueue(shipyardMenu);
            }
            shipyardMenu.SetActive(true);
            break;

        case UIELEMENTS.BarMenu:
            if (!CheckQueueForElement(barMenu))
            {
                AddElementToQueue(barMenu);
            }
            barMenu.SetActive(true);
            break;

        case UIELEMENTS.JumpgateTollMenu:
            //if (!CheckQueueForElement(jumpgateTollMenu)) { AddElementToQueue(jumpgateTollMenu); }
            jumpgateTollMenu.SetActive(true);
            break;

        case UIELEMENTS.ConversationUI:
            //if (!CheckQueueForElement(conversationUI)) { AddElementToQueue(conversationUI); }
            conversationUI.SetActive(true);
            break;

        case UIELEMENTS.LoadingUI:
            //if (!CheckQueueForElement(conversationUI)) { AddElementToQueue(conversationUI); }
            loadingUI.SetActive(true);
            break;

        default:
            break;
        }
    }
Esempio n. 7
0
 /// <summary>
 /// Hide a specific UI element
 /// </summary>
 /// <param name="UIElement">UIELEMENTS: Enum representing the desired element</param>
 public void HideUI(UIELEMENTS UIElement)
 {
     HideUIElement(UIElement);
 }
Esempio n. 8
0
 /// <summary>
 /// Display the element identified by the ENUM
 /// </summary>
 /// <param name="UIElement">UIELEMENTS: An enum value</param>
 public void ShowUI(UIELEMENTS UIElement)
 {
     ShowUIIndividual(UIElement);
 }