You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I'm working with the addon to use buttons inside a little application. When I use ofScale(0.5, 0.5) the app draws the buttons correctly inside the scaled layout, however I can't get the isMousePressed event in the new coordinates.
For example if I draw a button in the layout unscaled at (500,500) and then I do ofScale(0.5, 0.5), the new button will be drawn at (250,250) however the button will not catch clicks on that point but on the original unscaled position (500,500).
How can I fix this?
Thank you.
The text was updated successfully, but these errors were encountered:
Hi, unfortunately the events in MSAInteractiveObject don't check for any transformations. The way to solve this would be to transform the coordinates of the rect before checking against mouse coordinates, however when I wrote this addon many years ago there wasn't a way of getting the current transformation. I know now there is a ofGetCurrentMatrix function, but I'm not sure if it works as desired. Sorry I can't be more helpful. There are many other widget based gui addons now for OF that might be more useful too?
Hi. I'm working with the addon to use buttons inside a little application. When I use ofScale(0.5, 0.5) the app draws the buttons correctly inside the scaled layout, however I can't get the isMousePressed event in the new coordinates.
For example if I draw a button in the layout unscaled at (500,500) and then I do ofScale(0.5, 0.5), the new button will be drawn at (250,250) however the button will not catch clicks on that point but on the original unscaled position (500,500).
How can I fix this?
Thank you.
The text was updated successfully, but these errors were encountered: