-
Notifications
You must be signed in to change notification settings - Fork 213
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 gesture communicator #3802
base: master
Are you sure you want to change the base?
Add gesture communicator #3802
Conversation
Replace |
Related #3104 |
|
||
local spEcho = Spring.Echo | ||
|
||
options_path = 'Settings/Interface/Gesture Menus/Comms Menu' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: comms
could be interpreted as commanders
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, and I don't think Gesture Menus needs to be part of the path.
I agree with Sprunk. Another benefit of SendLuaUIMsg is that it would slot easily into the localisation system. I don't know where the menu should go in hotkeys. Do you have any good suggestions that don't conflict? The gesture menu worked because Licho was personally fine with not having access to custom formations when constructors are selected. I think the texts are generally too long. |
Sounds like the moonshots are more achievable than I initially thought! That's still probably going to be shelved for the immediate future, though that should make for a really nice extension.
Personally, I've been using BACKQUOTE, since I tend to use \ as the drawing key. It might be possible to use BACKQUOTE for both, with a short keypress opening the menu, and a held key used for drawing. That might fit with the existing "quickly communicate" semantics. I'm not sure if there's an easy way to accomplish this with the current framework.
I agree. Do you have a more palatable set of options in mind? |
|
Does it PR work entirely except that it sends engine markers instead of as-yet unimplemented lua markers? |
I pulled the first 5 commits that just apply some bugfixes. |
@GoogleFrog The PR is in a fairly stable state and is something that I've been using for a while. |
Is the behaviour of gesture build menu unchanged? |
There should be two user facing changes:
|
Can there be a bad interaction with gesture build menu? |
Part of this PR is that it makes a generic gesture system that is then used by the communicator and the gesture menu. As far as I know there is no control overlap because the communicator is opened with a hotkey. |
That was among the other fixes and is already in master. |
All potentially common code is split out into api_gesture_menu_factory, allowing code reuse between widgets. An example use is provided in the build gesture menu, now moved to gui_gesture_build. Also changed: - Some variable shadowing removed. - Random tripling of segments in path flashing removed. - Dead code removed.
If the item selected was not a menu hub, the flash would be off-center.
Communication? In a competitive strategy game? With polite defaults? This necessarily permits use of the real MarkerAddPoint.
672d97c
to
0af6317
Compare
There is a standalone ping menu by a high mana BAR guy. |
The standalone ping menu seems to be fairly crap though, it's still GL3 and only has one layer. |
Yes, just worth noting. |
This is a menu that can be bound to a key, such as BACKQUOTE. When opened, the user is presented with a series of radial menus which select predefined text for a marker to be added at the initial point. Inspired by DotA's hot chat wheel, but as Zero-K has much more we want to say, why not take inspiration from the existing and rather impressive gesture build widget?
The exact predefined text is open for discussion and/or total bikeshedding. I'm of two minds about some, especially those in the six-o-clock submenu. Ultimately, I left them in, as I feel having markers more descriptive than "omg" or "lobster", which now also take less effort to send, might help to nudge people into being slightly more helpful in very common situations. Maybe. One can hope.
This necessarily involves exposing the real
MarkerAddPoint
to widgets, which is also something to consider.Since there would have been extremely high overlap with the gesture build widget, the gesture build widget has been refactored into an API widget that provides the overwhelming majority of common code and takes callbacks. This also means a better functional separation of concerns -
gui_gesture_build
andgui_gesture_comms
are absolutely tiny compared to the previousgui_chili_gesture_menu
, andapi_gesture_menu
is slightly more readable too.Included are a few bug fixes and cleanups for the gesture build menu, which can be turned into a separate PR if desired.
Wishlist: