diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-12-06 13:01:16 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-12-06 13:01:16 -0700 |
commit | fc48c24c6d366e165cbcfbd022d9421790089890 (patch) | |
tree | ed264bca67ac2380f787765980ba1897ab43a93a /src/main.cpp | |
parent | c0e6ef1dd4941d689ea723542c4218179d688c7f (diff) | |
download | mana-fc48c24c6d366e165cbcfbd022d9421790089890.tar.gz mana-fc48c24c6d366e165cbcfbd022d9421790089890.tar.bz2 mana-fc48c24c6d366e165cbcfbd022d9421790089890.tar.xz mana-fc48c24c6d366e165cbcfbd022d9421790089890.zip |
Improve keyboard accessibility of login sequence
Enter and Escape now move forward and backwards for all dialogs except ServerSelectDialog (Escape quits) and CharSelectDialog (Enter doesn't do anything special).
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main.cpp b/src/main.cpp index 5308304f..73752c9e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -835,13 +835,6 @@ int main(int argc, char *argv[]) break; case SDL_KEYDOWN: - if (event.key.keysym.sym == SDLK_ESCAPE) - { - if (!quitDialog) - quitDialog = new QuitDialog(&quitDialog); - else - quitDialog->requestMoveToTop(); - } break; } @@ -881,6 +874,13 @@ int main(int argc, char *argv[]) Net::getCharHandler()->setCharInfo(&charInfo); state = STATE_LOGIN; } + else if (state == STATE_WORLD_SELECT && oldstate == STATE_UPDATE) + { + if (Net::getLoginHandler()->getWorlds().size() < 2) + { + state = STATE_LOGIN; + } + } else if (oldstate == STATE_START || oldstate == STATE_GAME) { desktop = new Desktop; |