input of utf8 characters should work in irc chat now

backspace does not work yet and all other places with textinput 
are still unchanged
This commit is contained in:
titiger 2015-10-24 21:33:41 +02:00
parent 76d41dfc09
commit 964c776dcd
2 changed files with 3 additions and 24 deletions

View File

@ -1195,8 +1195,6 @@ void MenuStateMasterserver::showMessageBox(const string &text, const string &hea
bool MenuStateMasterserver::textInput(std::string text) {
//printf("In [%s::%s Line: %d] text [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,text.c_str());
if (ircClient != NULL && ircClient->isConnected() == true
&& ircClient->getHasJoinedChannel() == true) {
return chatManager.textInput(text);
@ -1220,8 +1218,9 @@ void MenuStateMasterserver::keyDown(SDL_KeyboardEvent key) {
ircClient->SendIRCCmdMessage(IRC_CHANNEL, chatManager.getText());
}
}
chatManager.keyDown(key);
if(isKeyPressed(SDLK_RETURN,key,false) == true){
chatManager.keyDown(key);
}
}
if(chatManager.getEditEnabled() == false) {
//if(key == configKeys.getCharKey("ToggleMusic")) {
@ -1251,22 +1250,4 @@ void MenuStateMasterserver::keyDown(SDL_KeyboardEvent key) {
}
}
void MenuStateMasterserver::keyPress(SDL_KeyboardEvent c) {
if (ircClient != NULL && ircClient->isConnected() == true
&& ircClient->getHasJoinedChannel() == true) {
chatManager.keyPress(c);
}
}
void MenuStateMasterserver::keyUp(SDL_KeyboardEvent key) {
if (ircClient != NULL && ircClient->isConnected() == true
&& ircClient->getHasJoinedChannel() == true) {
chatManager.keyUp(key);
if (chatManager.getEditEnabled()) {
//send key to the chat manager
chatManager.keyUp(key);
}
}
}
}}//end namespace

View File

@ -124,8 +124,6 @@ public:
virtual bool textInput(std::string text);
virtual void keyDown(SDL_KeyboardEvent key);
virtual void keyPress(SDL_KeyboardEvent c);
virtual void keyUp(SDL_KeyboardEvent key);
virtual void simpleTask(BaseThread *callingThread,void *userdata);
virtual bool isInSpecialKeyCaptureEvent() { return chatManager.getEditEnabled(); }