Exemplo n.º 1
0
        public OutOfGameMenu(GameConnectionManager connectionManager, ConnectScreen connectScreen)
        {
            _connectionManager = connectionManager;
            _connectScreen = connectScreen;

            _startGameButton = new Button
            {
                Top = Property.Get(20f),
                Left = Property.Get(20f),
                Text = Property.Get("Start Game"),
            };
            _startGameButton.Click += OnStartGameButtonClick;

            _connectButton = new Button
            {
                Top = Property.Get(20f),
                Left = Property.Get(2 * 20f + Button.Width),
                Text = Property.Get("Connect"),
            };
            _connectButton.Click += () => _activeScreen = connectScreen;
        }
Exemplo n.º 2
0
        public OutOfGameMenu(GameConnectionManager connectionManager, ConnectScreen connectScreen)
        {
            _connectionManager = connectionManager;
            _connectScreen     = connectScreen;

            _startGameButton = new Button
            {
                Top  = Property.Get(20f),
                Left = Property.Get(20f),
                Text = Property.Get("Start Game"),
            };
            _startGameButton.Click += OnStartGameButtonClick;

            _connectButton = new Button
            {
                Top  = Property.Get(20f),
                Left = Property.Get(2 * 20f + Button.Width),
                Text = Property.Get("Connect"),
            };
            _connectButton.Click += () => _activeScreen = connectScreen;
        }