diff --git a/source/glest_game/game/game.cpp b/source/glest_game/game/game.cpp index 48799bd82..5d844be9e 100644 --- a/source/glest_game/game/game.cpp +++ b/source/glest_game/game/game.cpp @@ -4596,6 +4596,13 @@ void Game::startCameraFollowUnit() { } } +bool Game::textInput(std::string text) { + if(chatManager.getEditEnabled() == true) { + return chatManager.textInput(text); + } + return false; +} + void Game::keyDown(SDL_KeyboardEvent key) { if(this->masterserverMode == true) { return; diff --git a/source/glest_game/game/game.h b/source/glest_game/game/game.h index 1b5a1c67f..09a1aabbe 100644 --- a/source/glest_game/game/game.h +++ b/source/glest_game/game/game.h @@ -287,6 +287,7 @@ public: virtual void tick(); //event managing + virtual bool textInput(std::string text); virtual void keyDown(SDL_KeyboardEvent key); virtual void keyUp(SDL_KeyboardEvent key); virtual void keyPress(SDL_KeyboardEvent c); diff --git a/source/glest_game/menu/menu_state_join_game.cpp b/source/glest_game/menu/menu_state_join_game.cpp index 89b66f771..bc9105b29 100644 --- a/source/glest_game/menu/menu_state_join_game.cpp +++ b/source/glest_game/menu/menu_state_join_game.cpp @@ -643,6 +643,13 @@ void MenuStateJoinGame::update() if(clientInterface != NULL && clientInterface->getLaunchGame()) if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s] clientInterface->getLaunchGame() - D\n",__FILE__,__FUNCTION__); } +bool MenuStateJoinGame::textInput(std::string text) { + if(chatManager.getEditEnabled() == true) { + return chatManager.textInput(text); + } + return false; +} + void MenuStateJoinGame::keyDown(SDL_KeyboardEvent key) { if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] key = [%c][%d]\n",__FILE__,__FUNCTION__,__LINE__,key.keysym.sym,key.keysym.sym); diff --git a/source/glest_game/menu/menu_state_join_game.h b/source/glest_game/menu/menu_state_join_game.h index dab9ccef9..c4cac3f88 100644 --- a/source/glest_game/menu/menu_state_join_game.h +++ b/source/glest_game/menu/menu_state_join_game.h @@ -79,6 +79,8 @@ public: void mouseMove(int x, int y, const MouseState *mouseState); void render(); void update(); + + virtual bool textInput(std::string text); virtual void keyDown(SDL_KeyboardEvent key); virtual void keyPress(SDL_KeyboardEvent c);