Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hello everyone,
I would like to be able to track whether a button was released in a mashup. So far I can only see the onClicked event.
I am designing a controller with 4 arrows (up, down, left, right) and I want my remote thing to move accordingly as long as these buttons are pressed. So far I have services for each direction which let the object move in this direction until it is stopped. Thats why I hoped to be able to recognize whether the button has been release, so I can call the stop service.
Please feel free to suggest different approaches for this use case if the release button event is somehow not possible to track.
Best Regards,
Dominik
Solved! Go to Solution.
Hello Dominik,
So, I didn't find any property or event that do what you want. But, there is an active class in the widget files. You can use this documentation to create your own event:
https://www.ptc.com/support/-/media/358363C347B6425BA74531EAE94BCB5D.pdf?sc_lang=en
Also, there is a widget folder where you can find the files of the button widget to create your new custom extension with little changes.
One suggest is to make the controls a little different. Move when clicked and stop moving when clicked again. It is an easier approach(you will not need to create a new extension), but not so intuitive for the end user.
Hello Dominik,
So, I didn't find any property or event that do what you want. But, there is an active class in the widget files. You can use this documentation to create your own event:
https://www.ptc.com/support/-/media/358363C347B6425BA74531EAE94BCB5D.pdf?sc_lang=en
Also, there is a widget folder where you can find the files of the button widget to create your new custom extension with little changes.
One suggest is to make the controls a little different. Move when clicked and stop moving when clicked again. It is an easier approach(you will not need to create a new extension), but not so intuitive for the end user.
Thank you for your reply. I hoped I could avoid creating a new widget since it seems quite difficult. Probably I will change the controls as you suggested.
But when you already here, do you maybe know how to set images for buttons? Currently I can only set the text right? I would like to have the buttons look like arrows, but I saw the image widgets are missing click events.
Regards,
Dominik
In the button widget you can put images in the style property, if you want to show just the arrows let everything else transparent and without labor:
Awesome, Thank you very much!