Text not displaying

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

DarkHorizon
Just popping in
Just popping in
Posts: 6
Joined: Thu Jan 03, 2008 09:28

Text not displaying

Postby DarkHorizon » Tue Jan 15, 2008 02:39

Hello all,

I have been successful in getting CEGUI to load inside my Ogre3D-based game, however I am having some problems getting text to display correctly. Furthermore, there seems to be a problem with the way the titlebar-area is rendered.

For example, this is a screenshot of the in-game engine:
Image

This is a screenshot of the same GUI elements drawn inside CELayoutEditor (where they were designed):
Image

I am using the layout found in the CEGUI SDK (e.g. ${CEGUI_PATH}/datafiles), loaded by the Ogre3D renderer. Ogre3D is version 1.4.5, and CEGUI is the version which comes in the SDK, 0.5.

CEGUI is loaded using the following code:

Code: Select all

m_GUIRenderer = new CEGUI::OgreCEGUIRenderer(window, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, sceneMgr);
m_GUISystem = new CEGUI::System(m_GUIRenderer);
CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"TaharezLook.scheme");
m_GUISystem->setDefaultMouseCursor((CEGUI::utf8*)"TaharezLook", (CEGUI::utf8*)"MouseArrow");
CEGUI::Window* sheet = CEGUI::WindowManager::getSingleton().loadWindowLayout((CEGUI::utf8*)"my.layout");
m_GUISystem->setGUISheet(sheet);


I haven't come across any forum posts related to missing text, so any help is appreciated.

Cheers :P

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Tue Jan 15, 2008 08:19

Hi and welcome :)

The reason could be that something is off with the text colours or alpha settings which cause the texts to look invisible, while they are there. I assume you don't get exceptions or font errors in the log, do you?

The titlebars look weird indeed! Can you post your layout here?

Thanks.
Check out my released snake game using Cegui!

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Tue Jan 15, 2008 09:36

Hi,

Due to the strangeness of the titlebars, I believe I may know what the issue is.

I'd like to suggest that maybe the scheme you've loaded does not bring in a font, and since you've not loaded one explicitly, there is no font loaded nor a default set and hence no text?

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Tue Jan 15, 2008 10:22

Yeah that could be the case indeed. Because the editor loads fonts by itself, so there is a small difference between tools and cegui itself.
Check out my released snake game using Cegui!

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Tue Jan 15, 2008 13:14

WidgetGalore shows a concrete example loading a font: FontManager::getSingleton().createFont("Commonwealth-10.font");

DarkHorizon
Just popping in
Just popping in
Posts: 6
Joined: Thu Jan 03, 2008 09:28

Postby DarkHorizon » Tue Jan 15, 2008 23:16

Thank you, dank u wel, et merci! That indeed was the problem.

I added the following line:

Code: Select all

CEGUI::FontManager::getSingleton().createFont("DejaVuSans-10.font");

And the font I had used in the GUI elements now renders correctly.

Image

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Tue Jan 15, 2008 23:20

DarkHorizon wrote:Thank you, dank u wel, et merci! That indeed was the problem.

you are from belgium ? :)

DarkHorizon
Just popping in
Just popping in
Posts: 6
Joined: Thu Jan 03, 2008 09:28

Postby DarkHorizon » Wed Jan 16, 2008 00:52

Nah, I grew up in Quebec :)

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Wed Jan 16, 2008 06:29

Beaucoup de québécois sont multilingues. Note the lower-case Q.

Many Quebecers are multilingual.

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Wed Jan 16, 2008 16:20

Ye, i know, but he also knew how to say it in dutch, and in belgium you learn dutch, french and english, that's why i asked :)


Return to “Help”

Who is online

Users browsing this forum: No registered users and 16 guests