So I've managed to get CEGUI compiled and running, and I even see a window -- but fonts and widgets aren't being drawn (see attachment for screenshot). The scheme, imageset, and font all get found and loaded, so I'm not sure what I'm forgetting here? (I know the files are found OK because no exceptions occur, whereas it'd crash in the loaders when they weren't in place before.) This is pretty much copied from <a href="http://www.cegui.org.uk/modules/newbb/viewtopic.php?topic_id=470&forum=2">this thread</a>. I'm using an OpenGLRenderer, and I change dir to the data folder right before this snippet:
<code>
CEGUI::SchemeManager::getSingleton().loadScheme("WindowsLook.scheme");
CEGUI::System::getSingleton().setDefaultMouseCursor("WindowsLook", "MouseArrow");
CEGUI::Font *font = CEGUI::FontManager::getSingleton().createFont("Commonwealth-10.font");
CEGUI::System::getSingleton().setDefaultFont(font);
// Create the windows
wm = CEGUI::WindowManager::getSingletonPtr();
sheet = wm->createWindow("DefaultGUISheet", "root");
CEGUI::System::getSingleton().setGUISheet(sheet);
fw = (CEGUI::FrameWindow *)wm->createWindow("WindowsLook/FrameWindow", "mainWindow");
fw->setText("Test Window");
fw->setMinimumSize(CEGUI::Size(.25f, .25f));
fw->setMaximumSize(CEGUI::Size(.75f, .75f));
fw->setSize(CEGUI::Size(.5f, .5f));
fw->setPosition(CEGUI::Point(.2f, .2f));
fw->setCloseButtonEnabled(false);
sheet->addChildWindow(fw);
</code>
And then I just call renderGUI() on the System singleton. Happens with both WindowsLook and Taharez. I'm using VC++ 7.1 on Xp. Looked through the forum but can't find a similar problem -- anyone seen this before or have any ideas?
<b>Update</b>: It works now. I have no idea why, I was poking at non-CEGUI code and suddenly it looked alright. Nevermind ;)
Broken/missing fonts and widgets on windows
Moderators: CEGUI MVP, CEGUI Team
Re: Broken/missing fonts and widgets on windows
i use:
So it is quite the same.
The only i can think about is your Commonwealth.font or commonwealth.ttf being corrupt.
Try with the Tahoma-12 which is probably already in your CEGUI Medias.
Don't know, but it's worth trying.
PS: is there not any problem in your CEGUI.log?
Code: Select all
CEGUI::Imageset* taharezImages = CEGUI::ImagesetManager::getSingleton().createImageset("TaharezLook.imageset");
mGUISystem->setDefaultMouseCursor(&taharezImages->getImage("MouseArrow"));
CEGUI::FontManager::getSingleton().createFont("Tahoma-12.font");
CEGUI::SchemeManager::getSingleton().loadScheme("TaharezLook.scheme");
mGUISystem->setDefaultFont("Tahoma-12");
mGUISystem->setGUISheet(mRoot);
So it is quite the same.
The only i can think about is your Commonwealth.font or commonwealth.ttf being corrupt.
Try with the Tahoma-12 which is probably already in your CEGUI Medias.
Don't know, but it's worth trying.
PS: is there not any problem in your CEGUI.log?
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 5 guests