is possible to associate ESC button with a menu?

7 replies [Last post]
Fabioamd87
Fabioamd87's picture
User offline. Last seen 14 years 39 weeks ago. Offline
Joined: 2007-04-29
Posts: 121
before i'm playng and I wanted to pause the game, then i press ESC and the game is closed Sad Smiley is possible to add a menu like continue game options surrender close game ? tanks
Displacer
User offline. Last seen 14 years 8 weeks ago. Offline
Joined: 2006-11-27
Posts: 29
Look add setup page for your team in frontend. This page contains key bindings for some actions. Maybe you should assign Esc key to pause game. It is 'p' by default.
unC0Rr
unC0Rr's picture
User offline. Last seen 1 year 1 week ago. Offline
Joined: 2006-11-27
Posts: 576
[quote=Displacer]Look add setup page for your team in frontend. This page contains key bindings for some actions. Maybe you should assign Esc key to pause game. It is 'p' by default.[/quote] This is a solution for current team. But there are some keys working even when no team can receive keyboard event. They are: [list][*]'Esc' for quit[*]'p' for pause[*]'f' for toggling fullscreen mode[*]'9' and '0' for sound volume ajusting[*]'h' for finding current hedgehog[*]'c' for capturing screenshot[*]'del' to switch set of info placed on top of hedgehogs (team name, hedgehog name and health)[/list] These keys expected to work at any time the game is running. So I see two ways to prevent loosing round by pressing Esc: [listo][*]Ask smth. like 'Are you sure to close the game?'[*]Allow to use saves. When you accidentaly press 'Esc' button, you may load the round from save file, and continue your game![/listo]
Displacer
User offline. Last seen 14 years 8 weeks ago. Offline
Joined: 2006-11-27
Posts: 29
Both ways are good and maybe should be implemented, but second way is more important and should be implemented first.
unC0Rr
unC0Rr's picture
User offline. Last seen 1 year 1 week ago. Offline
Joined: 2006-11-27
Posts: 576
[quote=Displacer]Both ways are good and maybe should be implemented, but second way is more important and should be implemented first.[/quote] Well, it is already mostly implemented. You can find save file in ~/.hedgewars/Saves/ directory. Only loading interface is missing in frontend.
Displacer
User offline. Last seen 14 years 8 weeks ago. Offline
Joined: 2006-11-27
Posts: 29
[quote=unC0Rr][quote=Displacer]Both ways are good and maybe should be implemented, but second way is more important and should be implemented first.[/quote] Well, it is already mostly implemented. You can find save file in ~/.hedgewars/Saves/ directory. Only loading interface is missing in frontend.[/quote] (: So, it is the time question only Smile Loading interface is itself not a large problem i think.
unC0Rr
unC0Rr's picture
User offline. Last seen 1 year 1 week ago. Offline
Joined: 2006-11-27
Posts: 576
[quote=Displacer]Loading interface is itself not a large problem i think.[/quote] Yeah, it could be similar to demo viewing interface. Moreover, saves loading code is same as demos code Smile
OldNESJunkie
User offline. Last seen 9 years 25 weeks ago. Offline
Joined: 2007-09-10
Posts: 39
I agree with Fabioamd87 on this one, I think the ESC key should bring up a menu of some sort with maybe volume controls, quit, etc.
"If you want to play a game that's exactly the same as worms. Play worms." - Tiyuri Wizard Hat!
Copyright © 2004-2023 Hedgewars Project. All rights reserved. [ contact ]