- bugfix for disabling hotkeys when in menu's and editing text in a field

This commit is contained in:
Mark Vejvoda 2011-04-20 16:25:16 +00:00
parent 92039ac053
commit b180581bf8
6 changed files with 20 additions and 7 deletions

View File

@ -2387,6 +2387,11 @@ void MenuStateConnectedGame::cleanupMapPreviewTexture() {
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
}
bool MenuStateConnectedGame::isInSpecialKeyCaptureEvent() {
bool result = (chatManager.getEditEnabled() || activeInputLabel != NULL);
return result;
}
void MenuStateConnectedGame::FTPClient_CallbackEvent(string itemName,
FTP_Client_CallbackType type, pair<FTP_Client_ResultType,string> result, void *userdata) {
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__);

View File

@ -183,7 +183,7 @@ public:
virtual void keyPress(char c);
virtual void keyUp(char key);
virtual bool isInSpecialKeyCaptureEvent() { return chatManager.getEditEnabled(); }
virtual bool isInSpecialKeyCaptureEvent();
private:

View File

@ -3108,4 +3108,9 @@ int32 MenuStateCustomGame::getNetworkPlayerStatus() {
return result;
}
bool MenuStateCustomGame::isInSpecialKeyCaptureEvent() {
bool result = (chatManager.getEditEnabled() || activeInputLabel != NULL);
return result;
}
}}//end namespace

View File

@ -173,7 +173,7 @@ public:
virtual void simpleTask(BaseThread *callingThread);
virtual bool isInSpecialKeyCaptureEvent() { return chatManager.getEditEnabled(); }
virtual bool isInSpecialKeyCaptureEvent();
private:

View File

@ -663,12 +663,15 @@ void MenuStateOptions::mouseMove(int x, int y, const MouseState *ms){
checkBoxDisableScreenshotConsoleText.mouseMove(x, y);
}
bool MenuStateOptions::isInSpecialKeyCaptureEvent() {
return (activeInputLabel != NULL);
}
void MenuStateOptions::keyDown(char key){
if(activeInputLabel!=NULL)
{
if(key==vkBack){
if(activeInputLabel != NULL) {
if(key == vkBack) {
string text= activeInputLabel->getText();
if(text.size()>1){
if(text.size() > 1) {
text.erase(text.end()-2);
}
activeInputLabel->setText(text);

View File

@ -123,7 +123,7 @@ public:
void render();
virtual void keyDown(char key);
virtual void keyPress(char c);
virtual bool isInSpecialKeyCaptureEvent();
private:
void saveConfig();