Exemple #1
0
        public Lobby(ContentManager content)
        {
            background = new LobbyBackground(content);

            // Buttons
            nameBtn                  = new TextButton(content, new Vector2(50, 50), "UserName", TextButtonType.UserName, "Player");
            ipBtn                    = new TextButton(content, new Vector2(50, 110), "IP", TextButtonType.IP, "127.0.0.1");
            colorBtn                 = new ColorButton(content, new Vector2(50, 170), "Tank Color", ColorChange);
            colorBtn.Enabled         = false;
            readyBtn                 = new BoolButton(content, new Vector2(50, 230), "Ready?", false, ReadyChanged);
            readyBtn.Enabled         = false;
            connectBtn               = new NormalButton(content, new Vector2(50, 290), "Connect", Connect, true);
            connectBtn.TitleColor    = Color.Lime;
            disconnectBtn            = new NormalButton(content, new Vector2(255 + 50, 290), "Disconnect", Disconnect, true);
            disconnectBtn.TitleColor = Color.Orange;
            disconnectBtn.Enabled    = false;
            exitBtn                  = new NormalButton(content, new Vector2(50, 350), "Exit", Exit);
            exitBtn.TitleColor       = Color.Red;

            muteMusicBtn             = new NormalButton(content, new Vector2(50, Game1.ScreenRec.Height - 100), "Mute Music", MuteMusic, true);
            muteMusicBtn.TitleColor  = Color.LightGray;
            fullScreenBtn            = new NormalButton(content, new Vector2(255 + 50, Game1.ScreenRec.Height - 100), "Fullscreen", Fullscreen, true);
            fullScreenBtn.TitleColor = Color.LightGray;

            this.content = content;
        }
Exemple #2
0
        public ScoreBoard(ContentManager content)
        {
            this.content         = content;
            scoreBoardItems      = new List <ScoreBoardItem>();
            background           = new LobbyBackground(content);
            background.LeftGlowX = 800 - background.LeftGlowWidth;

            toLobbyBtn = new NormalButton(content, new Vector2(50, Game1.ScreenRec.Height - 100), "Return to lobby", ReturnToLobby, true);
        }