Page 1 of 1

Moving a IGUIImage

Posted: Thu Jun 15, 2006 9:45 am
by mR.haHN
Hi,
I´ve got a problem with moving a picture. I want to replace the cursor with an image. For that, I disabled the visibility of the cursor and added a IGUIImage.
But now, I have no idea how to move it with the cursor. Move() does an absolute moving, so I cant just say getCursorControl()->getPosition() and put that value in the move-brackets, because he will move it out of the screen. (You know what I mean :wink: ).
Well, there is also that setRelativePosition() thing for IGUIImages. But that works only with a rectangle value, and the position of the cursor is position2d....

Posted: Thu Jun 15, 2006 11:12 am
by Acki
I think you should not use a IGUIImage...
Use draw2DImage instead:

Code: Select all

irr::video::IVideoDriver::draw2DImage(video::ITexture* texture, const core::position2d<s32>&  destPos)