Example #1
0
        void WindowProcedure(Window wi)
        {
            if (NetworkStatus.IsClientDisconnected())
            {
                WindowManager.CloseWindow(wi);
                return;
            }

            GUILayout.Space(Screen.height / 20);

            foreach (string s in wi.displayStrings)
            {
                if (GameManager.DrawButtonWithCalculatedSize(s))
                {
                    // team choosed
                    Player.local.GetComponent <PlayerTeamChooser>().TeamChoosed(s);

                    WindowManager.CloseWindow(wi);
                }

                GUILayout.Space(Screen.height / 60);
            }

            GUILayout.FlexibleSpace();

            if (GameManager.DrawButtonWithCalculatedSize("Cancel"))
            {
                WindowManager.CloseWindow(wi);
            }
        }