-
-
Notifications
You must be signed in to change notification settings - Fork 958
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: Added IsPressed, IsDown, & IsReleased for virtual buttons to Inputmanager #2258
Conversation
@dotnet-policy-service agree |
Might want to keep a method stub with an obsolete attribute that just calls into the new one, no reason to break users code with this PR. |
Does any manual page need to be updated with these new features? |
Yes, at the very least the example should be updated on the Virtual Buttons page to use |
Ohh, I see. Well, once it is merged here, it would be nice to do a PR also to docs and add some content at later stage? Could you do that as well? I can assist with formating but I wouldn't be able to create a content in this case. |
Yeah that shouldn't be a issue, I can do that |
Forgot to mention, can you add a summary above each one of those methods, particularly for |
Yeah looks like I forgot some. Added. Probably a conversation for else where, but it is probably a good idea for us to consider changing the name |
Yeah, it is kind of a pain, feel free to open an issue about this. |
The feature is great! Thanks for the PR. We'll need to update that https://doc.stride3d.net/latest/en/tutorials/csharpbeginner/virtual-buttons.html as well (and Youtube too I believe) |
PR Details
Added
IsVirtualButtonPressed
/Down
/Released
methods to the InputManager and surrounding classes.Description
Added
IsVirtualButtonPressed
,IsVirtualButtonDown
andIsVirtualButtonReleased
methods to theInputManager
, mirroring theGetVirtualButton
method. AddedIsPressed
.etc methods toVirtualButtonBinding
,VirtualButtonConfig
andVirtualButtonSet
. Again, mirring theGetValue
methods.Renamed
GetVirtualButton
toGetVirtualButtonValue
.Motivation and Context
Allows pressed, down, and release states to be used with VirtualButtons from the InputManager.
Renamed
GetVirtualButton
toGetVirtualButtonValue
since now that there are moreVirtualButton
methods it was confusing as to what it was doing (not actually getting a VirtualButton, but reading a input value from one). And matches the termonoligy in the rest of the API were it is refered to byGetValue
.Types of changes
Checklist