is possible to associate ESC button with a menu?

7 replies [Last post]
Fabioamd87
Fabioamd87's picture
User offline. Last seen 15 years 27 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 48 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 17 weeks 2 days ago. Offline
Joined: 2006-11-27
Posts: 576

Displacer allegedly wrote:
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.

This is a solution for current team. But there are some keys working even when no team can receive keyboard event. They are:
  • '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)
These keys expected to work at any time the game is running. So I see two ways to prevent loosing round by pressing Esc:
[o]
  • 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![/o]

    Displacer
    User offline. Last seen 14 years 48 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 17 weeks 2 days ago. Offline
    Joined: 2006-11-27
    Posts: 576

    Displacer allegedly wrote:
    Both ways are good and maybe should be implemented, but second way is more important and should be implemented first.

    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 48 weeks ago. Offline
    Joined: 2006-11-27
    Posts: 29

    unC0Rr allegedly wrote:
    Displacer allegedly wrote:
    Both ways are good and maybe should be implemented, but second way is more important and should be implemented first.

    Well, it is already mostly implemented. You can find save file in ~/.hedgewars/Saves/ directory. Only loading interface is missing in frontend.

    (: 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 17 weeks 2 days ago. Offline
    Joined: 2006-11-27
    Posts: 576

    Displacer allegedly wrote:
    Loading interface is itself not a large problem i think.

    Yeah, it could be similar to demo viewing interface. Moreover, saves loading code is same as demos code Smile

    OldNESJunkie
    User offline. Last seen 10 years 13 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!

    User login

    Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]