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

Add accelerator keys for enum options #49

Open
tung opened this issue Dec 13, 2012 · 3 comments
Open

Add accelerator keys for enum options #49

tung opened this issue Dec 13, 2012 · 3 comments
Assignees

Comments

@tung
Copy link
Owner

tung commented Dec 13, 2012

This depends on how much needs to be modified to add a new char accel field to nh_listitem.

@ghost ghost assigned tung Dec 13, 2012
@tung
Copy link
Owner Author

tung commented Dec 14, 2012

nh_listitem is used in a lot of things, including a couple of structs used by options, which would involve changing a lot of network code. Moving enum options off of nh_listitem to something new, or even to something like nh_menuitem to support a new accelerator field would involve a fair amount of network code changes.

Putting this off for now.

@tung
Copy link
Owner Author

tung commented Dec 16, 2012

New idea: The accelerator for each enum option's entries could live in the first character of the caption string by convention. Not the prettiest design, but it'd require no protocol changes, and no code changes outside of handling of enum options. I might go ahead on this after all.

@tung
Copy link
Owner Author

tung commented Dec 17, 2012

I just tried doing this... the changes required were awful, since the choice descriptions for enum options are stored as-is in the game's config files. Also, generating unique accelerator keys for the dynamically-created 'race' and 'role' options was non-trivial, so I had to special-case them out in 3 different places across the front-end and back-end.

Putting this off again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant