Opened 9 years ago

Closed 9 years ago

#3200 closed defect (fixed)

[PATCH] Pressing escape shouldn't quit the server after defeat / victory

Reported by: elexis Owned by: ben
Priority: Should Have Milestone: Alpha 19
Component: Core engine Keywords: patch
Cc: Patch:

Description

If a player was defeated (or won the game) a message box appears asking "Do you want to quit?". If one presses escape, the player will leave. It shoudln't leave but only close the popup box.

This is bad in particular if only the host was defeated and unintentionally closes the game while everybody else was still playing.

In the current implementation, hitting the escape button is equivalent to pushing the last button in the message box. Thats why changing the order of buttons helps with this particular issue.

It would be great to add more hotkeys, so all message boxes can be handled with the keyboard only (for example deleting units).

Attachments (1)

t3200_fix_message_box_button_order.patch (2.4 KB ) - added by elexis 9 years ago.
Corrects the order of the buttons in all message boxes that had it wrong.

Download all attachments as: .zip

Change History (6)

by elexis, 9 years ago

Corrects the order of the buttons in all message boxes that had it wrong.

comment:1 by Itms, 9 years ago

We had a discussion around A17, I think, about the Yes/No button placement and we switched some without a real general agreement. So we should discuss this before committing this patch.

I personally think this is a good way to go. Quitting on "Escape" is really bad for usability.

comment:2 by historic_bruno, 9 years ago

IIRC the decision was to use Windows' conventional button order (which I agree with), but the change was only partially implemented, and the UI work in general stalled.

in reply to:  2 comment:3 by historic_bruno, 9 years ago

Keywords: review removed

Replying to historic_bruno:

IIRC the decision was to use Windows' conventional button order (which I agree with), but the change was only partially implemented, and the UI work in general stalled.

I was remembering an earlier iteration, apparently the most recent change was the opposite of Windows (OK/Yes on the right, Cancel/No on the left).

Last edited 9 years ago by historic_bruno (previous) (diff)

in reply to:  description comment:4 by historic_bruno, 9 years ago

Keywords: simple removed

Replying to elexis:

In the current implementation, hitting the escape button is equivalent to pushing the last button in the message box. Thats why changing the order of buttons helps with this particular issue.

That behavior would make sense if the cancel button was on the right (it may have been when the code was written), but most of our dialogs have it on the left now, it's easier to change the "cancel" handling to use the leftmost button and fix the ~3 inconsistent dialogs.

comment:5 by ben, 9 years ago

Owner: set to ben
Resolution: fixed
Status: newclosed

In 16736:

Fixes button order consistency in a few places: resign confirmation, manual, splashscreen, fixes #2837. NOTE: the convention is Cancel/Back button on the left, other action buttons are to the right. Please report any you find that don't match that!
Adds hotkey.cancel mapped to the Escape key, which is now used for closing/canceling in-game dialogs, fixes #2636, #3200. Please report any dialogs where Esc doesn't work!

Note: See TracTickets for help on using tickets.