Page 1 of 1

.NET gui help needed

Posted: Tue Dec 06, 2005 8:27 pm
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]

Posted: Tue Dec 06, 2005 9:00 pm
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).

Posted: Tue Dec 06, 2005 9:13 pm
by Baroc
good grief, I'm such a moron

thanks