I am trying to get a program to perform an action without a mouse key.
I have a box that follows the position of the mouse:
core::position2d<s32> m = device->getCursorControl()->getPosition();
driver->draw2DRectangle(video::SColor(100,255,255,255),
core::rect<s32>(m.X-20, m.Y-20, m.X+20, m.Y+20));
And I also have a rectangle placed in the window of my program:
driver->draw2DRectangle(video::SColor(100,100,255,0),
core::rect<s32>(1000,200,1200,400));
What im trying to do is have the program turn the rectangle a vibrant red
(255,255,0,0) when the rectangle that follows the mouse is placed on top of the large rectangle in my window.
How would i write the code for this?
a statement or loop i am guessing, but i'm not too sure how to write it.
Any help or code given would be appreciated!
thanks
only1skingle