06-17-2022 04:14 AM
Hi everyone,
I've created a custom button control from the 'Silver' Blank Button and I've placed a png image on the button (see attached).
Unfortunately the button will only operate if the mouse is placed at certain positions on the button and this is also affected by moving the image forward or backwards on the button.
No matter what I try I cannot get the mouse to work on the lower darker half of the button when clicking on the image.
Any suggestion would be very much appreciated.
Solved! Go to Solution.
06-17-2022 07:35 AM
Use a mouse down / up filter event and compare the position to the bounds of the control.
Control bounds is readable from a control property node. Mouse position can be read from the event case left node ( you may need to select it but I think it's available by default on mouse filter events)
06-17-2022 07:59 AM
You usually want to add Boolean images as either a decal, or as replacement of one of the button's images.
Then they won't block the mouse.
06-17-2022 08:10 AM
Thanks JÞB.
I will use the mouse event as a 'work around' although I'm still baffled why some images stop buttons from operating and some don't. For example the attached button works just fine whereas my Pause button (attached earlier) does not.
I would really like to understand the root cause and fix it.
06-17-2022 08:28 AM