On Saturday 09 February 2008 04:09:12 Kyle Lutze wrote:
> currently esc will quit out of the game at any point. I'm of the
> preference that instead it should bring up the game menu (as most
> games have it) and alt+f4 and cmd+q (under OS X) should quit.
>
> Discuss!
>
>
> Also, anyone know where in the code esc causes the game to quit?
>
> in my local copy of glob2 I put
>
> Uint8 *keystate = SDL_GetKeyState(NULL);
> SDLMod modState = SDL_GetModState();
> if ((modState & KMOD_META) && keystate[SDLK_q])
> {
> exitGlobCompletely=true;
> orderQueue.push_back(shared_ptr<Order>(new
> PlayerQuitsGameOrder(localPlayer)));
> }
>
> at around line 1025 in GameGUI.cpp, but it only works while playing
> a game which obviously isn't the desired effect and Bradley doesn't
> know where to put it either.
Indeed, in single player game, the "normal" quit key sequence should display
the save game dialog, and then return to the main menu. In network, it should
only display a confirmation. The only direct quit should be sigterm. Even
there, during a game sigterm should bring up the save game or confirmation
dialog, and only then quit. A second sigterm in the dialog should quit while
discarding the current game. If I remember correctly, SIGTERM generates a
SDL_QUIT event.
Have a nice day.
Steph
--
http://stephane.magnenat.net
_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel