Page 1 of 1

Make addWindow() resizeable and render into it?

Posted: Thu Jul 28, 2011 7:34 am
by max6666north
Hi

is it possible to make a window added with addWindow() resizeable like 'normal' win32-windows (with controlls etc.)?

and may i render into this windows insteat of the main?

The goal is to create an multi-window-application with the internal gui...

thx for hints/help

max

Re: Make addWindow() resizeable and render into it?

Posted: Thu Jul 28, 2011 8:49 am
by CuteAlien
Sorry no, windows are not yet resizable. I remember last time I did that (I think before Irrlicht 1.0 - I was not in the team yet back then) it also needed several changes in the event-system to allow doing that as a gui-element. So for now you're pretty much on your own there and would probably have to work directly with mouse-events from the event-receiver when coding that (as the gui-element's OnEvent will not receive all mouse-move events which you'll need for that).

Re: Make addWindow() resizeable and render into it?

Posted: Thu Jul 28, 2011 11:14 am
by max6666north
[quote="CuteAlien"]Sorry no, windows are not yet resizable. I remember last time I did that (I think before Irrlicht 1.0 - I was not in the team yet back then) it also needed several changes in the event-system to allow doing that as a gui-element. So for now you're pretty much on your own there and would probably have to work directly with mouse-events from the event-receiver when coding that (as the gui-element's OnEvent will not receive all mouse-move events which you'll need for that).[/quote]

ok and how is it with rendering in gui-windows?

thx
max

Re: Make addWindow() resizeable and render into it?

Posted: Thu Jul 28, 2011 11:25 am
by CuteAlien
You can render into a texture and then use this texture in an IGUIImage element (be careful not to render the IGUIImage itself when doing that). And you can certainly put that into a window.

Re: Make addWindow() resizeable and render into it?

Posted: Thu Jul 28, 2011 11:59 am
by max6666north
[quote="CuteAlien"]You can render into a texture and then use this texture in an IGUIImage element (be careful not to render the IGUIImage itself when doing that). And you can certainly put that into a window.[/quote]
ok, i understand...
but the behavior of clicking and picking an so on are gone for this image i think...right?

Re: Make addWindow() resizeable and render into it?

Posted: Thu Jul 28, 2011 12:39 pm
by CuteAlien
Tricky question. I fixed this week something which would even allow doing picking, but it might not be the best solution. Maybe just working with the viewport and several cameras is better. Check example 18.SplitScreen for how to do that (you can probably set the viewport to the dimensions of a window as well).