mirror of
https://github.com/glest/glest-source.git
synced 2025-02-24 19:52:25 +01:00
- don't close open messagebox on alt-enter
This commit is contained in:
parent
af3c25850a
commit
737c577099
@ -204,9 +204,13 @@ Program::~Program(){
|
||||
void Program::keyDown(char key){
|
||||
|
||||
if(msgBox.getEnabled()) {
|
||||
SDL_keysym keystate = Window::getKeystate();
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
if(key == vkEscape || key == SDLK_ESCAPE || key == vkReturn || key == SDLK_RETURN || key == SDLK_KP_ENTER) {
|
||||
if(key == vkEscape || key == SDLK_ESCAPE ||
|
||||
((key == vkReturn || key == SDLK_RETURN || key == SDLK_KP_ENTER) && !(keystate.mod & (KMOD_LALT | KMOD_RALT)))) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
//printf("---> keystate [%d]\n",keystate);
|
||||
msgBox.setEnabled(false);
|
||||
|
||||
}
|
||||
|
@ -222,8 +222,16 @@ void MenuStateRoot::keyDown(char key) {
|
||||
showMessageBox(lang.get("ExitGame?"), "", true);
|
||||
}
|
||||
else if(mainMessageBox.getEnabled() == true && key == vkReturn) {
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
program->exit();
|
||||
SDL_keysym keystate = Window::getKeystate();
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] keystate.mod [%d]\n",__FILE__,__FUNCTION__,__LINE__,keystate.mod);
|
||||
|
||||
//printf("---> keystate.mod [%d]\n",keystate.mod);
|
||||
if(keystate.mod & (KMOD_LALT | KMOD_RALT)) {
|
||||
}
|
||||
else {
|
||||
//printf("EXITING ---> keystate.mod [%d]\n",keystate.mod);
|
||||
program->exit();
|
||||
}
|
||||
}
|
||||
else if(key == configKeys.getCharKey("SaveGUILayout")) {
|
||||
bool saved = GraphicComponent::saveAllCustomProperties(containerName);
|
||||
|
Loading…
x
Reference in New Issue
Block a user