// Draws the GUI (Some processing done)
    void OnGUI()
    {
        // Wizard
        GUI.DrawTexture(UnityGUIExt.CreateRect(350.0f, -100.0f, 870.0f, 870.0f,
                                               UnityGUIExt.GUI_ALLIGN.TOP_CENTRE,
                                               UnityGUIExt.GUI_ALLIGN.CENTRE), m_Wizard);

        // Title (Background)
        GUI.DrawTexture(UnityGUIExt.CreateRect(0.0f, 10.0f, 815.0f, 753.0f,
                                               UnityGUIExt.GUI_ALLIGN.TOP_CENTRE,
                                               UnityGUIExt.GUI_ALLIGN.CENTRE), m_TitleTexture);

        // Name field
        ProcessNameFieldGUI();

        m_rectNameField = UnityGUIExt.CreateRect(293.0f, 398.0f, 175.0f, 23.0f,
                                                 UnityGUIExt.GUI_ALLIGN.TOP_CENTRE,
                                                 UnityGUIExt.GUI_ALLIGN.CENTRE);

        if (m_bNameBoxSelected)
        {
            GUI.DrawTexture(m_rectNameField, m_tSelected);
        }
        GUI.Label(m_rectNameField, m_strPlayerName);

        ProcessServerListGUI();

        m_oJoinButton.DoGUI();
        m_oHostButton.DoGUI();
        m_oQuitButton.DoGUI();
        m_oScroller.DoGUI();
    }
Exemple #2
0
    public void DoGUI()
    {
        UpdateBox(m_fX, m_fY, m_fWidth, m_fHeight, m_eScreenAllignment, m_eAllignment);

        if (m_bSelected)
        {
            GUI.DrawTexture(UnityGUIExt.CreateRect(0, 0, 512, 512, UnityGUIExt.GUI_ALLIGN.BOT_LEFT, UnityGUIExt.GUI_ALLIGN.BOT_LEFT), m_tBackground);

            if (m_bDrawScroll)
            {
                m_oScrollbar.DoGUI();
            }

            DrawTextBox();
        }
        else
        {
            GUI.DrawTexture(UnityGUIExt.CreateRect(0, 0, 512, 512, UnityGUIExt.GUI_ALLIGN.BOT_LEFT, UnityGUIExt.GUI_ALLIGN.BOT_LEFT), m_tBackground2);
        }
        DrawChatBox();
    }