Drawing to a child window

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
HighBuddha
Posts: 11
Joined: Thu Jun 15, 2006 12:46 am

Drawing to a child window

Post by HighBuddha »

I have a small problem and if someone could quickly answer this, that would be awsome. I have a child window setup, and i want to draw a bmp inside it, but im not sure how to do it exactly. The API doesn't help much, it only lists functions and i have know idea how to actually use them. Any help is very much appreciated.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Hmm, the API should be no problem for a developer....
It's a great help...
But I agree, you have to know how coding works, for this... ;)
And therefor are the examples...


Well, for drawing 2D graphics you should have a look at tutorial #6-2DGraphics and a search on the forum, there are many posts about this

If you then have problems with your code, then post your question again with some code snipets to show where you stuck...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
HighBuddha
Posts: 11
Joined: Thu Jun 15, 2006 12:46 am

Post by HighBuddha »

Sorr if I wasn't descriptive enough with my problem. I'll explain a little further.

I have a window setup and inside it is a smaller window, I will use this to draw all the images in a vector which I am using as a tile list. My problem is I am not sure how to draw to the smaller window. Should I create a IGUIElement and uses IGUIImage, or am I completely wrong? I looked at all the draw2DImage functions and none say anything about setting a parent. Once again all help is much appreciated.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Yes, this is a little problem... ;)
Well, I think you have 2 choices:

1. add IGUIImage(s) and set the window as parent...
2. draw with the draw2D... functions and add the window's position as an offset...

If you use the IGUIImages, you'll have nothing to care of, but you're not as flexible as with the draw functions...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply