コード例 #1
0
 /// <summary>
 /// Hides every tab open, just the content
 /// </summary>
 private void HideAllTabContent()
 {
     if (GeneralContent.activeSelf)
     {
         GeneralContent.SetActive(false);
     }
     if (ResolutionContent.activeSelf)
     {
         ResolutionContent.SetActive(false);
     }
     if (GraphicsContent.activeSelf)
     {
         GraphicsContent.SetActive(false);
     }
 }
コード例 #2
0
    /// <summary>
    /// Changes the active tab and button
    /// </summary>
    /// <param name="_tab"></param>
    private void SwapTab(Tab _tab)
    {
        HideAllTabContent();
        switch (_tab)
        {
        case Tab.General:
            //Set the button with the active layer

            //Set the content opened
            GeneralContent.SetActive(true);
            break;

        case Tab.Resolution:
            //same as gen
            ResolutionContent.SetActive(true);
            break;
        }
    }