private void SelectStadiumIndex(int i_Index)
    {
        if (m_StadiumSelector == null)
        {
            return;
        }

        m_StadiumSelector.SelectItemByIndex(i_Index);
    }
Example #2
0
 public void SelectResolutionByIndex(int i_Index)
 {
     if (m_ResolutionSelector != null)
     {
         m_ResolutionSelector.SelectItemByIndex(i_Index);
     }
 }
    private void SelectBallIndex(int i_Index)
    {
        if (m_BallSelector == null)
        {
            return;
        }

        m_BallSelector.SelectItemByIndex(i_Index);
    }
    private void SelectGameModeIndex(int i_Index)
    {
        if (m_GameModeSelector == null)
        {
            return;
        }

        m_GameModeSelector.SelectItemByIndex(i_Index);
    }
Example #5
0
    public void RefreshMaxPlayers()
    {
        if (m_MaxPlayersSelector == null)
        {
            return;
        }

        if (m_MaxPlayersSelector.itemsCount > 0)
        {
            m_MaxPlayersSelector.SelectItemByIndex(m_MaxPlayersSelector.itemsCount - 1);
        }
        else
        {
            m_MaxPlayersSelector.Clear();
        }
    }
    private void RefreshResolutionSelector()
    {
        if (m_ResolutionSelector == null)
        {
            return;
        }

        int currentResolutionIndex = -1;

        Resolution currentResolution = Screen.currentResolution;

        int screenWidth  = currentResolution.width;
        int screenHeight = currentResolution.height;

        if (!Screen.fullScreen)
        {
            screenWidth  = Screen.width;
            screenHeight = Screen.height;
        }

        int screenRefreshRate = currentResolution.refreshRate;

        for (int resolutionIndex = 0; resolutionIndex < Screen.resolutions.Length; ++resolutionIndex)
        {
            Resolution resolution = Screen.resolutions[resolutionIndex];

            if (resolution.width == screenWidth && resolution.height == screenHeight && resolution.refreshRate == screenRefreshRate)
            {
                currentResolutionIndex = resolutionIndex;
                break;
            }
        }

        if (currentResolutionIndex >= 0)
        {
            m_ResolutionSelector.SelectItemByIndex(currentResolutionIndex);
        }
    }