Make addWindow() resizeable and render into it?

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
max6666north
Posts: 15
Joined: Fri Jun 03, 2011 9:35 am

Make addWindow() resizeable and render into it?

Post 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
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

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

Post 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).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
max6666north
Posts: 15
Joined: Fri Jun 03, 2011 9:35 am

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

Post 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
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

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

Post 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.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
max6666north
Posts: 15
Joined: Fri Jun 03, 2011 9:35 am

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

Post 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?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

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

Post 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).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply