Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upYou can't override the "escape" key firing a quit event #97
Comments
icefoxen
added
bug
Type-CODE
labels
Jul 9, 2017
This comment has been minimized.
This comment has been minimized.
|
We... can't actually make So far it seems the only sensible thing is to remove this feature entirely and make sure the tutorials have a |
This comment has been minimized.
This comment has been minimized.
|
IT'S EVEN WORSE because When I wrote So it seems like the Right Thing might be to update the |
This comment has been minimized.
This comment has been minimized.
|
I agree that this is the right change to make; otherwise, you are left setting flags from the event handling methods to then act upon in In a similar vein, what about arguments passed to |
This comment has been minimized.
This comment has been minimized.
|
Eeeeeeh. I'm wary of passing dt to event handlers because the Right Way is almost always to do as little as possible in event handlers besides register that events happened. Getting a Duration from the context isn't a terrible idea though... |
This comment has been minimized.
This comment has been minimized.
|
@obsoke Small tidbit: the way I avoided this was to set a flag which would detect if a key was already pressed. For a small menu system which has an option to exit the game, I had to manually call |
This comment has been minimized.
This comment has been minimized.
rofrol
commented
Jul 22, 2017
|
@icefoxen Maybe add to 0.4 milestone? |
icefoxen
added this to the 0.4 milestone
Jul 22, 2017
This comment has been minimized.
This comment has been minimized.
|
Oops, thought I had already. |
This comment has been minimized.
This comment has been minimized.
|
@icefoxen You mentioned that you could ignore the How exactly would this be done? |
This comment has been minimized.
This comment has been minimized.
|
Override the |
This comment has been minimized.
This comment has been minimized.
|
|
icefoxen
added a commit
that referenced
this issue
Sep 25, 2017
This comment has been minimized.
This comment has been minimized.
|
DONE! \o/ |
icefoxen commentedJul 9, 2017
I thought you could but it turns out not. This should be fixed; you can ignore or handle the quit event, but there's no way to make pressing "escape" not fire it.