chat with utf8 works ingame too

This commit is contained in:
titiger
2015-10-25 02:10:14 +01:00
parent b5acf03122
commit 3dedf9e8b9
4 changed files with 17 additions and 0 deletions

View File

@@ -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;

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);