I have a widget which consists of a canvas panel (which takes the whole screen and set to visible) and on top of that lies and a TextBox and a Button for example.
I am trying to make use of the ondrop function for this widget.
What I am trying to do is do some sort of validation before the rest of the code inside the ondrop to check which uwidget (i think it’s called) was hovered over when the ondrop was triggered.
I.E
MyWidget (Ondrop fires)
CanvasPanel
TextBox
Button
If Mouse hovers Textbox, dont do anything.
If mouse hovers Button, do X.
I’ve been trying to work out the mouse position, get the position of the textbox relative to the viewport, create an fbox2d and then somehow check if the mouse pointer is within that fbox, if so… do nothing in this example.
Part of me thinks though that there might be something much more simple and I’m overcomplicating (to figure out widget branches where)
Any help would be MASSIVELY appreciated