Page MenuHomeWildfire Games

Go back to previous gui page hotkey or exit ingame or exit game (or continue)
Needs ReviewPublic

Authored by ffffffff on Aug 20 2017, 4:52 PM.

Details

Reviewers
bb
Trac Tickets
#4976
Summary

Hotkey for go back to previous gui page "Shift+Escape" as default.

So we get a continues way of cycling backward from the gui pages by hotkey to at least the quit ask dialog on mainmenu.

Also asking exit game in-game and continuing on summary screen.

Please discuss, test.

Test Plan

test

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

ffffffff created this revision.Aug 20 2017, 4:52 PM
ffffffff edited the summary of this revision. (Show Details)
ffffffff retitled this revision from Having some more cancel keys to go back (general) to Having some more cancel keys to going back in general.Aug 20 2017, 5:36 PM
ffffffff edited the summary of this revision. (Show Details)
elexis edited edge metadata.Aug 20 2017, 6:24 PM

Ok for adding them to dialog boxes, but not sure about the switched pages.
confirm hotkeys also missing #4411

binaries/data/mods/public/gui/options/options.xml
102 ↗(On Diff #3212)

this one is good

elexis requested changes to this revision.EditedAug 25 2017, 12:49 AM

I will commit the options dialog one. I had added it to one of my option page branches as well.
It's ok for the options, because the user can open that at every time. If he closes the window by accident, no informaiton is lost.

BUT the other GUI pages are actual pages and not dialogs. If the user unintentionally hits escape, or thinks some other GUI object has focus that should receive the escape press,
then information is lost.

Lobby gamesetup sessions with many undecided players can often take up more than half an hour to setup and a rehost hurts.

BUT I also agree with the idea that the user shouldn't have to use the mouse to navigate.

So, new plan:
I propose to add a new hotkey in default.cfg that closes the curent page. You can set it to esape in your config, but the default should be shift+escape, so that people don't close it by accident unless they take full responsability for it.

into.txt and https://trac.wildfiregames.com/wiki/HotKeys also need an update then.

This revision now requires changes to proceed.Aug 25 2017, 12:49 AM
ffffffff added a comment.EditedNov 18 2017, 8:47 AM
In D813#32779, @elexis wrote:

I will commit the options dialog one. I had added it to one of my option page branches as well.
It's ok for the options, because the user can open that at every time. If he closes the window by accident, no informaiton is lost.
BUT the other GUI pages are actual pages and not dialogs. If the user unintentionally hits escape, or thinks some other GUI object has focus that should receive the escape press,
then information is lost.
Lobby gamesetup sessions with many undecided players can often take up more than half an hour to setup and a rehost hurts.
BUT I also agree with the idea that the user shouldn't have to use the mouse to navigate.
So, new plan:
I propose to add a new hotkey in default.cfg that closes the curent page. You can set it to esape in your config, but the default should be shift+escape, so that people don't close it by accident unless they take full responsability for it. even ther is coming summary keys now..
into.txt and https://trac.wildfiregames.com/wiki/HotKeys also need an update then.

as i see now (specialy ingame) most dialog windows are esc keyable but not summary :( can we add hotkey="cancel" to continueButton Object?

even is gui but this is no lost information its just "info" gui so maybe its ok ther.

ffffffff updated this revision to Diff 4530.Dec 4 2017, 5:08 PM

Go back to previous gui page "Shift+Escape" default

ffffffff retitled this revision from Having some more cancel keys to going back in general to Go back to previous gui page hotkey.Dec 4 2017, 5:09 PM
ffffffff edited the summary of this revision. (Show Details)
ffffffff added inline comments.
binaries/data/config/default.cfg
143

name it guiback? or backgui? or keep back

binaries/data/mods/public/gui/gamesetup/gamesetup.js
1103 ↗(On Diff #4530)

this is easier to back hotkey offline and online gamesetup

elexis resigned from this revision.Dec 12 2017, 8:36 PM
ffffffff edited reviewers, added: bb; removed: elexis.Dec 24 2017, 12:52 AM
ffffffff added subscribers: elexis, mapkoc.
ffffffff updated this revision to Diff 4923.Dec 24 2017, 1:02 AM
ffffffff retitled this revision from Go back to previous gui page hotkey to Go back to previous gui page hotkey or exit ingame or exit game (or continue).

hotkey for exit ingame or exit game (or continue in summary)

ffffffff edited the summary of this revision. (Show Details)Dec 24 2017, 1:04 AM
ffffffff updated this revision to Diff 5030.Jan 2 2018, 12:32 PM

Fullfill game with back hotkey and make intro.txt.

ffffffff added inline comments.Jan 2 2018, 12:34 PM
binaries/data/config/default.cfg
143

This was not used before in-game or to exit game, as far as i can find.

elexis added a comment.Jan 2 2018, 1:14 PM

seems ok.

shift+escape is also a combination which isn't pressed unintentionally.

binaries/data/config/default.cfg
143
143

close ; Close the current page and ask for confirmation when exiting the game?

binaries/data/mods/public/gui/gamesetup/gamesetup.js
1103 ↗(On Diff #4530)

Joining to play (and chatting in order to play) seems more common than joining to leave.

binaries/data/mods/public/gui/session/hotkeys/misc.xml
129 ↗(On Diff #5030)

probably ok here, but probably possible in the menu.xml too

mapkoc added a comment.Jan 2 2018, 7:47 PM
  1. I changed key bind to Escape, now ESC quits host window and lobby but it doesn't quit main window like Shift ESC did.
  2. Is it possible to make the quit confirmation dialog respond yes with Enter and no with Esc?
  3. First time i joined lobby i got a notification window from system saying 'test'. Don't know if related to this of one of Dunedan's tests.
  1. Esc interferes with already binded to close dialogs that can pop up on page. You can try urself setting it in default.cfg to escape to see effect in all gui pages. Also was considered to be to easy to leave a whole gui page. f.e. when accidently hitting escape in host multiplayer host window f.e. when in chat input or on normal gui page and all game settings are lost and everyone kicked out.
  2. D1046.
  3. unrelated.
ffffffff added inline comments.Jan 2 2018, 8:13 PM
binaries/data/mods/public/gui/gamesetup/gamesetup.js
1103 ↗(On Diff #4530)

normaly u want to chat u click chat input anyhow no? in lobby to.

mapkoc added a comment.Jan 2 2018, 8:16 PM

I did change default.cfg so instead of shift-esc the hotkey be Esc.
All gui pages now exit with esc, except the main window.
Now you can get exit dialog with keys only mouse.

ffffffff added a comment.EditedJan 2 2018, 9:06 PM

Try host game click more options hit esc. more options dialog AND host game end. Its all double binded then. Main menu open structure tree hit escape it close structure tree directly ask u to quit game.

mapkoc added a comment.Jan 3 2018, 4:48 AM

If I change "back" to "Escape"

cancel = Escape ; Close or cancel the current dialog box/popup
back = "Escape" ; Go back to previous gui page (or ask quit 0 A. D. or in-game)
...
cancel = Esc ; Un-select all units and cancel building placement
(Notice how that file uses or not quotes and abbreviation. Also the comments are not aligned with monospace font)

then I see what you mean with that Esc backs up 2 layers with host/more options
but still doesn't work to quit game.
I was just too lazy to use shift esc.
I guess one shouldn't use same key for different things.

ffffffff updated the Trac tickets for this revision.Jan 18 2018, 7:12 AM
ffffffff updated this revision to Diff 5431.Jan 22 2018, 8:18 PM

rebase to r20964.