ironbane / IronbaneServerLegacy

A 3D MMO written using pure javascript.
http://www.ironbane.com/
GNU General Public License v3.0
175 stars 41 forks source link

[chat] get out of chat by hitting "escape" key #390

Open msouth opened 10 years ago

msouth commented 10 years ago

It would be nice if hitting "escape" in the chat would close the chat.

On more than one occasion I've accidentally opened the chat in a battle, or opened it to say something quick. It would be nice to have a quick way to undo that.

eric-ycw commented 10 years ago

The esc key is already used for "Back to the main menu"

msouth commented 10 years ago

Yes, but that function is not active when the chat is active. If you hit esc when you are in chat, nothing happens.

In the Android UI, there is a sort of "contextual back" (which is mapped, on my phone, to a button at the bottom of the phone) that can mean "back to the last part of the interface" or "back to the home screen" or "back to the app that opened this app". You don't lose anything (I would argue) by allowing esc in chat to take you back to the last part of the app, and esc in normal mode to give you the "back to main" prompt.

Even a user who didn't understand this would probably think it just didn't take and hit esc again, and it would then do what they would expect, so it would be sort of self-teaching.

While we're on the topic, it would be nice if hitting esc when the 'back to main' dialog is up would close the 'back to main' dialog. I'll put that as a separate issue. [edit: done #393 ]

LunaSolVT commented 10 years ago

Again not trying to steal other game ideas buuuuut: function on.key(escape) if (focus.chat == true) focus.chat = false; else open(menu);

This is how most other MMOs handle escape keys. If focus is on any part of the GUI, stop focusing there. Otherwise, just bring up the menu.

Might lead to some shenanigans, but other games don't seem to gave an issue.

Sent with AquaMail for Android http://www.aqua-mail.com

On December 15, 2013 6:54:53 AM Eric512 notifications@github.com wrote:

The esc key is already used for "Back to the main menu"


Reply to this email directly or view it on GitHub: https://github.com/ironbane/IronbaneServer/issues/390#issuecomment-30604659

LunaSolVT commented 10 years ago

@msouth that was just some quick psuedocode to get my point across. Obviously there are flags and all sorts of other such ways this can be accomplished, and since it's a popular mechanic used in other MMOs, it shouldn't confuse anyone. May need to be part of the "help" dialogs but should not make for any major player issues.