Problem when making 'Hello World' @_@
Posted: Wed Jan 30, 2008 19:07
Dear all,
I am still a noob here and still try to use CEGUI. But, I have a problem to make just a text 'Hello World' with a window. The text doesn't appear after I compile it with VS 2005 SP1.
Because i am still noob, i am still using samples in Ogre 1.4.0(using the code in basic tutorial 6) and makes changes to procedure createScene.
Here is the code
Why the text 'Hello World' doesn't appear?
I am still a noob here and still try to use CEGUI. But, I have a problem to make just a text 'Hello World' with a window. The text doesn't appear after I compile it with VS 2005 SP1.
Because i am still noob, i am still using samples in Ogre 1.4.0(using the code in basic tutorial 6) and makes changes to procedure createScene.
Here is the code
Code: Select all
void createScene(void)
{
// Set ambient light
mSceneMgr->setAmbientLight(ColourValue(0.5, 0.5, 0.5));
// Set up GUI system
mGUIRenderer = new CEGUI::OgreCEGUIRenderer(mWindow, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, mSceneMgr);
mGUISystem = new CEGUI::System(mGUIRenderer);
CEGUI::Logger::getSingleton().setLoggingLevel(CEGUI::Informative);
CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"TaharezLookSkin.scheme");
CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton();
CEGUI::Window * mWndw = wmgr.createWindow("DefaultWindow","root");
CEGUI::Window* fWnd = (CEGUI::Window*)wmgr.createWindow("TaharezLook/FrameWindow", (CEGUI::utf8*)"testWindow");
fWnd->setProperty("UnifiedXPosition", "0.1f" );
fWnd->setProperty("UnifiedYPosition", "0.2f" );
fWnd->setProperty("UnifiedWidth", "0.5f" );
fWnd->setProperty("UnifiedHeight", "0.5f" );
fWnd->setProperty("Visible", "true" );
fWnd->setProperty("Text", "Hello World");
mWndw->addChildWindow(fWnd);
mGUISystem->setGUISheet(mWndw);
}
Why the text 'Hello World' doesn't appear?