.NET gui help needed

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
Baroc

.NET gui help needed

Post by Baroc »

What do I have to do to get this text box to display? I've tried setting enabled and visible to true and also having an explict text1.Draw() in the main loop. What am I doing wrong. It would be super cool if someone remade the original tutrials in c#, cause I'm having trouble doing easy things.

before run loop

Code: Select all

Irrlicht.GUI.IGUIStaticText text1 = device.GUIEnvironment.AddStaticText("TEST", new Irrlicht.Core.Rect(100,100,200,200), true, true, null, 10);
in run loop

Code: Select all

device.VideoDriver.BeginScene(true, true, new Irrlicht.Video.Color(0,100,100,100));
device.GUIEnvironment.DrawAll();
device.SceneManager.DrawAll();
device.VideoDriver.EndScene();

[/code]
pfo
Posts: 370
Joined: Mon Aug 29, 2005 10:54 pm
Location: http://web.utk.edu/~pfox1

Post by pfo »

The only thing I can suggest is switching these two lines around:

Code: Select all

device.GUIEnvironment.DrawAll();
device.SceneManager.DrawAll(); 
Your scene is being drawn on top of your GUI (order counts). It makes sense to draw your GUI on top of your scene (actually, always draw it last, because if you draw lines or render HUD elements for example, they will occlude the GUI).
Baroc

Post by Baroc »

good grief, I'm such a moron

thanks
Locked