I saw some function within Irrlicht yesterday that checked if a given position2d was within either a rect or a IGUIImage... today I can't for the life of me find it... does anyone know where it is? i could make it myself, but i'd rather not clutter up my code with either a long if statement or an unneeded utility function.
Thanks in advance.
Checking whether a position2d<s32> is within an IGUIIm
-
ImNoHelp
-
Conquistador
- Posts: 340
- Joined: Wed Sep 28, 2005 4:38 pm
- Location: Canada, Eh!
If you want to find which GUI element your mouse is over, use getElementFromPoint(), http://irrlicht.sourceforge.net/docu/cl ... nt.html#a6
It'll work for anything derrived from IGUIElement.
It'll work for anything derrived from IGUIElement.
Royal Hamilton Light Infantry - http://www.rhli.ca
Paris/Port Dover Pipes'n Drums - http://www.parisdover.ca
Paris/Port Dover Pipes'n Drums - http://www.parisdover.ca
Code: Select all
rect.isPointInside(point); // will return true if point is in rect
-
Guest