Moving a IGUIImage

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
mR.haHN
Posts: 49
Joined: Wed May 03, 2006 5:37 pm

Moving a IGUIImage

Post 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....
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post 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)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply