First I make a pointer to the GUIEnvironment using:
Code: Select all
GUIEnvironment guienv = device.GUIEnvironmentl
Code: Select all
guienv.AddButton(myRect, guienv.RootElement, 1001, "testButton");
Code: Select all
if (device.WindowActive)
{
driver.BeginScene(true, true, new Color(0, 100, 100, 100));
guienv.DrawAll();
smgr.DrawAll();
driver.EndScene();
}