Beispiel #1
0
        /// <summary>
        /// Updates IMGUI of the multiplayer.
        /// </summary>
        void OnGUI()
        {
            if (netManager.IsOnline)
            {
                netManager.DrawNameTags();
            }

            GUI.color = Color.white;
            GUI.Label(new Rect(2, Screen.height - 18, 500, 20), "MSCMP " + Client.GetMODDisplayVersion());

            GUI.color = new Color(1.0f, 1.0f, 1.0f, 0.25f);
            GUI.DrawTexture(new Rect(2, Screen.height - 80, 76, 66), modLogo);

            // Draw online state.

            if (netManager.IsOnline)
            {
                GUI.color = Color.green;
                GUI.Label(new Rect(2, 2, 500, 20), "ONLINE " + (netManager.IsHost ? "HOST" : "PLAYER"));
            }
            else
            {
                GUI.color = Color.red;
                GUI.Label(new Rect(2, 2, 500, 20), "OFFLINE");
            }

            MessagesList.Draw();

            // Friends widget.

            if (ShouldSeeInvitePanel())
            {
                UpdateInvitePanel();
            }

#if !PUBLIC_RELEASE
            DevTools.OnGUI();

            if (DevTools.netStats)
            {
                netManager.DrawDebugGUI();
            }

            gameWorld.UpdateIMGUI();
#endif

            console.Draw();
        }
Beispiel #2
0
        /// <summary>
        /// Updates IMGUI of the multiplayer.
        /// </summary>
        void OnGUI()
        {
            if (netManager.IsOnline)
            {
                netManager.DrawNameTags();
            }
            // Draw online state.

            if (netManager.IsOnline)
            {
                GUI.color = Color.green;
                GUI.skin.label.alignment = TextAnchor.UpperRight;
                GUI.Label(new Rect(Screen.width - 210, 2, 200, 20),
                          "ONLINE " + (netManager.IsHost ? "HOST" : "PLAYER"));
            }
            else
            {
                GUI.color = Color.red;
                GUI.skin.label.alignment = TextAnchor.UpperRight;
                GUI.Label(new Rect(Screen.width - 210, 2, 200, 20), "OFFLINE");
            }

            MessagesList.Draw();

            // Friends widget.

            if (ShouldSeeInvitePanel())
            {
                UpdateInvitePanel();
            }

#if !PUBLIC_RELEASE
            DevTools.OnGUI();

            if (DevTools.netStats)
            {
                netManager.DrawDebugGUI();
            }

            gameWorld.UpdateIMGUI();
#endif

            console.Draw();
        }