private void _joinGame(MsgTickerJoinGame message) { if (_tickerState == TickerState.InGame) { return; } _tickerState = TickerState.InGame; if (_lobby != null) { _lobby.Dispose(); _lobby = null; } _gameChat = new ChatBox(); _userInterfaceManager.StateRoot.AddChild(_gameChat); _userInterfaceManager.StateRoot.AddChild(_gameHud.RootControl); _chatManager.SetChatBox(_gameChat); _gameChat.DefaultChatFormat = "say \"{0}\""; _gameChat.Input.PlaceHolder = _localization.GetString("Say something! [ for OOC"); _inputManager.SetInputCommand(ContentKeyFunctions.FocusChat, InputCmdHandler.FromDelegate(s => _focusChat(_gameChat))); }
private void _joinGame(MsgTickerJoinGame message) { if (_tickerState == TickerState.InGame) { return; } _tickerState = TickerState.InGame; if (_lobby != null) { _lobby.Dispose(); _lobby = null; } _inputManager.SetInputCommand(ContentKeyFunctions.FocusChat, InputCmdHandler.FromDelegate(session => { _gameChat.Input.IgnoreNext = true; _gameChat.Input.GrabKeyboardFocus(); })); _gameChat = new ChatBox(); _userInterfaceManager.StateRoot.AddChild(_gameChat); _chatManager.SetChatBox(_gameChat); _gameChat.DefaultChatFormat = "say \"{0}\""; }
private void _joinGame(MsgTickerJoinGame message) { if (_tickerState == TickerState.InGame) { return; } _tickerState = TickerState.InGame; if (_lobby != null) { _lobby.Chat.TextSubmitted -= _chatConsole.ParseChatMessage; _chatConsole.AddString -= _lobby.Chat.AddLine; _lobby.Dispose(); _lobby = null; } _inputManager.SetInputCommand(EngineKeyFunctions.FocusChat, InputCmdHandler.FromDelegate(session => { _gameChat.Input.GrabKeyboardFocus(); })); _gameChat = new Chatbox(); _userInterfaceManager.StateRoot.AddChild(_gameChat); _gameChat.TextSubmitted += _chatConsole.ParseChatMessage; _chatConsole.AddString += _gameChat.AddLine; _gameChat.DefaultChatFormat = "say \"{0}\""; }
private void _joinGame(MsgTickerJoinGame message) { if (_tickerState == TickerState.InGame) { return; } _tickerState = TickerState.InGame; if (_lobby != null) { _lobby.Dispose(); _lobby = null; } _inputManager.SetInputCommand(ContentKeyFunctions.FocusChat, InputCmdHandler.FromDelegate(session => { _gameChat.Input.IgnoreNext = true; _gameChat.Input.GrabKeyboardFocus(); })); _gameChat = new ChatBox(); _userInterfaceManager.StateRoot.AddChild(_gameChat); _chatManager.SetChatBox(_gameChat); _tutorialButton = new TutorialButton(); _userInterfaceManager.StateRoot.AddChild(_tutorialButton); _tutorialButton.SetAnchorAndMarginPreset(Control.LayoutPreset.BottomLeft, Control.LayoutPresetMode.MinSize, 50); _gameChat.DefaultChatFormat = "say \"{0}\""; }
private void JoinGame(MsgTickerJoinGame message) { _stateManager.RequestStateChange <GameScreen>(); }