-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat: SimpleRadial menu support for sprite-view and extensibility #39223
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
feat: SimpleRadial menu support for sprite-view and extensibility #39223
Conversation
…riteSpecifier to specify icon to be used
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
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.
Looks good, just some minor stuff from me
Content.Client/Changeling/Transform/ChangelingTransformBoundUserInterface.cs
Show resolved
Hide resolved
Content.Client/Changeling/Transform/ChangelingTransformBoundUserInterface.cs
Show resolved
Hide resolved
Content.Client/Changeling/Transform/ChangelingTransformBoundUserInterface.cs
Outdated
Show resolved
Hide resolved
Content.Client/Changeling/Transform/ChangelingTransformBoundUserInterface.cs
Outdated
Show resolved
Hide resolved
Content.Client/Changeling/Transform/ChangelingTransformBoundUserInterface.cs
Outdated
Show resolved
Hide resolved
Content.Client/Changeling/Transform/ChangelingTransformBoundUserInterface.cs
Outdated
Show resolved
Hide resolved
Content.Client/UserInterface/Systems/Emotes/EmotesUIController.cs
Outdated
Show resolved
Hide resolved
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
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.
Sorry, I forgot about this. Changes have my approval. It can be merged once that conflict is resolved
space-wizards/space-station-14#32653 space-wizards/space-station-14#34639 space-wizards/space-station-14#36486 space-wizards/space-station-14#39223 tested emotes :cl: Fildrance, SaphireLattice, eoineoineoin, sleepyyapril - tweak: The RCD, RPD, card hand selection, modsuit clothing picker, hardlight bow ammo selector, and emotes radial menus have a new look! - fix: The RPD will no longer show RCD popups when selecting things or with charge updates.
About the PR
Refactored RadialMenuOption and related SimpleRadialMenu code to accept not just sprite for texture as icon for radial menu, but also entity or entity prototype id for SpriteView. That greatly extends scenarios where SimpleRadialMenu can be used, while leaving convinent API.
GhostRoleRadioBoundUserInterface and related xaml is a victim that got into crossfire.
Changeling menu also was replaced with SimpleRadialMenu and now selected character is highlighted in menu.
Why / Balance
Changeling transformation required SpriteView and did custom view for that, then pAI emotes demanded some, so thats basically planned refactor.
Technical details
RadialMenuEntityIconSpecifier type can be used to further extend controls which can be placed as icons inside radial menu button. Even tho usage of empty abstract class is iffy, current implementation and overloads on RadialMenuEntityIconSpecifier provide best UX for developers i think.
As side effect of refactor - RadialMenuTextureButtonBase no longer is derived from TextureButton so all tree of controls derived from it got renamed too.
Replaced changeling transform menu with SimpleRadial.
Media
lol-emotes.webm
Requirements
Breaking changes
renamings:
RadialMenuOption -> RadialMenuOptionBase (RadialMenuOption.Sprite was replaced by RadialMenuOptionBase.IconSpecifier, use RadialMenuIconSpecifier.With static methods to replace old code)
RadialMenuActionOption -> RadialMenuActionOptionBase
RadialMenuTextureButtonBase -> RadialMenuButtonBase (!IMPORTANT! now is derived from BaseButton so texture template properties are removed, please if you are using any derived class manually - put TextureRect control inside to fix it)
RadialMenuTextureButton -> RadialMenuButton
RadialMenuTextureButtonWithSector -> RadialMenuButtonWithSector
Content.Client/Ghost/GhostRoleRadioMenu.xaml / xaml.cs and Content.Client/Changeling/Transform/ChangelingTransformMenu.xaml / xaml.cs were removed
Changelog