Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

W_EDITBOX: Improve ESC handling behavior #294

Conversation

@past-due
Copy link
Contributor

commented Apr 3, 2019

This enables hitting ESC to:
1.) Clear the current text in the EditBox (if it has text)
2.) End editing mode (if the EditBox is empty)

Thus, to quickly cancel out / close an in-game chat box that contains text, hit escape twice (once to clear, once to end editing mode).

NOTE: There are unrelated issues with how the main menus handle widget & input processing (and the ESC key) that prevent this from working in the main menus (yet). But the in-game edit boxes, such as the in-game chatbox, can take advantage of this immediately.

W_EDITBOX: Improve ESC handling behavior
This enables hitting ESC to:
1.) Clear the current text in the EditBox (if it has text)
2.) End editing mode (if the EditBox is empty)

Thus, to quickly cancel out / close an in-game chat box that contains text, hit escape twice (once to clear, once to end editing mode).

NOTE: There are unrelated issues with how the main menus handle widget & input processing (and the ESC key) that prevent this from working in the main menus (yet). But the in-game edit boxes, such as the in-game chatbox, can take advantage of this immediately.
@Forgon2100

This comment has been minimized.

Copy link
Contributor

commented Apr 3, 2019

This enables hitting ESC to:
1.) Clear the current text in the EditBox (if it has text)
2.) End editing mode (if the EditBox is empty)

Thus, to quickly cancel out / close an in-game chat box that contains text, hit escape twice (once to clear, once to end editing mode).

NOTE: There are unrelated issues with how the main menus handle widget & input processing (and the ESC key) that prevent this from working in the main menus (yet). But the in-game edit boxes, such as the in-game chatbox, can take advantage of this immediately.

I have a patch to fix Escape key processing for the "Challenges" screen.

@past-due past-due added this to the 3.3.0_beta2 milestone Apr 3, 2019

@past-due past-due merged commit 809dd2a into Warzone2100:master Apr 3, 2019

8 checks passed

LGTM analysis: C/C++ No new or fixed alerts
Details
LGTM analysis: JavaScript No code changes detected
Details
LGTM analysis: Python No code changes detected
Details
WIP Ready for review
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
freebsd_build FreeBSD:freebsd-11-2-release-amd64 Task Summary
Details
freebsd_build FreeBSD:freebsd-12-0-release-amd64 Task Summary
Details

@past-due past-due deleted the past-due:2019_04_03_improve_editbox_esc_handling_1 branch Apr 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.