コード例 #1
0
        /// <inheritdoc />
        public override void Startup()
        {
            _mainMenuControl = new MainMenuControl(_resourceCache, _configurationManager);
            userInterfaceManager.StateRoot.AddChild(_mainMenuControl);

            _mainMenuControl.QuitButton.OnPressed             += QuitButtonPressed;
            _mainMenuControl.OptionsButton.OnPressed          += OptionsButtonPressed;
            _mainMenuControl.DirectConnectButton.OnPressed    += DirectConnectButtonPressed;
            _mainMenuControl.JoinPublicServerButton.OnPressed += JoinPublicServerButtonPressed;
            _mainMenuControl.AddressBox.OnTextEntered         += AddressBoxEntered;

            _client.RunLevelChanged += RunLevelChanged;

            OptionsMenu = new OptionsMenu(_configurationManager)
            {
                Visible = false,
            };
            OptionsMenu.AddToScreen();
        }