Hi there.
I am using AquaLook skin for my project, and it's working great.
I did a test today, using SleekSpace cuz i found it nice too, but the texts i have in my GUI do not appear.
The font used in AquaLook is loaded inside AquaLookSkin.scheme, and no C++ code is used to load it. But in SleekSpace, the file SleekSpace.scheme does not contain font informations, so i load the font inside my app:
CEGUI::FontManager::getSingleton().createFont("bluehighway-12.font"));
It didn't work. So i copy&paste the font infos from AquaLookSkin.scheme to SleekSpace.scheme:
<Font Name="BlueHighway-12" Filename="bluehighway-12.font" />
<Font Name="BlueHighway-10" Filename="bluehighway-10.font" />
<Font Name="BlueHighway-8" Filename="bluehighway-8.font" />
Does anybody know what's going on, or how can i fix it?
Thanks.
Text is not working with SleekSpace skin
Moderators: CEGUI MVP, CEGUI Team
-
- Just popping in
- Posts: 15
- Joined: Thu Nov 06, 2008 18:44
If you want to load fonts normally via xml .font files, you should look in the Samples/datafiles/fonts folder for an example xml file; update the file as needed, and then in your code do something like this:
If you want to load fonts directly, without needing to use an xml file, you can do something like this:
Note that either way your CEGUI::Font resource group should already be pointing to the directory you are trying to load the files from. I would also recommend placing try/catch blocks around the code where necessary.
Code: Select all
// load in a font. The first font loaded automatically becomes the default font.
if (!CEGUI::FontManager::getSingleton().isFontPresent("default"))
CEGUI::FontManager::getSingleton().createFont("default.font");
If you want to load fonts directly, without needing to use an xml file, you can do something like this:
Code: Select all
// load in a font. The first font loaded automatically becomes the default font.
if (!CEGUI::FontManager::getSingleton().isFontPresent("default"))
{
CEGUI::Font* font = CEGUI::FontManager::getSingleton().createFont(
"FreeType", "default", "Verdana.ttf"
);
font->setProperty("AutoScaled", "False");
font->setProperty("NativeRes", "w:1024 h:768");
font->setProperty("Antialiased", "True");
font->setProperty("PointSize", "14");
font->load();
}
Note that either way your CEGUI::Font resource group should already be pointing to the directory you are trying to load the files from. I would also recommend placing try/catch blocks around the code where necessary.
-
- Just popping in
- Posts: 15
- Joined: Thu Nov 06, 2008 18:44
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Hi,
Do you get any log errors at all?
Also, is the colour of the text an issue; with Aqua using lighter backgrounds and Sleekspace using darker backgrounds, perhaps your text is too dark to see?
CE.
Do you get any log errors at all?
Also, is the colour of the text an issue; with Aqua using lighter backgrounds and Sleekspace using darker backgrounds, perhaps your text is too dark to see?
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Have you tried using the name you specified in the scheme, instead of the file name?
IE, instead of
CEGUI::FontManager::getSingleton().createFont("bluehighway-12.font"));
try
CEGUI::FontManager::getSingleton().createFont("BlueHighway-12"));
I know, for instance, when using CEGUI::System::getSingleton().setDefaultFont you should use the name specified in the scheme, instead of the file name - I would expect or hope that to be consistent with createFont as well. But, you never know - never hurts to try.
edit: On second thought, maybe create font should use the file name - but, if you have the font in your scheme, you can use setDefaultFont with the name (not file name) you specified in the scheme, or use setFont on individual elements also using the name.
edit2: Also, make sure your font is where the scheme expects it. Your log will tell you if it isn't found - if that is the case, the fix is easy - find it
IE, instead of
CEGUI::FontManager::getSingleton().createFont("bluehighway-12.font"));
try
CEGUI::FontManager::getSingleton().createFont("BlueHighway-12"));
I know, for instance, when using CEGUI::System::getSingleton().setDefaultFont you should use the name specified in the scheme, instead of the file name - I would expect or hope that to be consistent with createFont as well. But, you never know - never hurts to try.
edit: On second thought, maybe create font should use the file name - but, if you have the font in your scheme, you can use setDefaultFont with the name (not file name) you specified in the scheme, or use setFont on individual elements also using the name.
edit2: Also, make sure your font is where the scheme expects it. Your log will tell you if it isn't found - if that is the case, the fix is easy - find it
Re: Text is not working with SleekSpace skin
Hi all,
I realise this thread is somewhat old now, but I'm having this same issue with the SleekSpace skin still.
These are the errors I get in the log file:
27/07/2012 11:27:58 (Error) CEGUI::UnknownObjectException in file ..\..\..\cegui\src\CEGUIPropertySet.cpp(109) : There is no Property named 'NormalTextColour' available in the set.
27/07/2012 11:27:59 (Error) CEGUI::UnknownObjectException in file ..\..\..\cegui\src\CEGUIPropertySet.cpp(109) : There is no Property named 'HoverTextColour' available in the set.
27/07/2012 11:28:00 (Error) CEGUI::UnknownObjectException in file ..\..\..\cegui\src\CEGUIPropertySet.cpp(109) : There is no Property named 'PushedTextColour' available in the set.
27/07/2012 11:28:00 (Error) CEGUI::UnknownObjectException in file ..\..\..\cegui\src\CEGUIPropertySet.cpp(109) : There is no Property named 'HoverTextColour' available in the set.
27/07/2012 11:28:00 (Error) CEGUI::UnknownObjectException in file ..\..\..\cegui\src\CEGUIPropertySet.cpp(109) : There is no Property named 'NormalTextColour' available in the set.
Is this easy to fix? If not, I'm happy enough to just move to a different skin...
Thanks muchly for any help, please excuse me if it's a noob question, I truly am a CEGUI noob atm
Cheers,
Anthony
I realise this thread is somewhat old now, but I'm having this same issue with the SleekSpace skin still.
These are the errors I get in the log file:
27/07/2012 11:27:58 (Error) CEGUI::UnknownObjectException in file ..\..\..\cegui\src\CEGUIPropertySet.cpp(109) : There is no Property named 'NormalTextColour' available in the set.
27/07/2012 11:27:59 (Error) CEGUI::UnknownObjectException in file ..\..\..\cegui\src\CEGUIPropertySet.cpp(109) : There is no Property named 'HoverTextColour' available in the set.
27/07/2012 11:28:00 (Error) CEGUI::UnknownObjectException in file ..\..\..\cegui\src\CEGUIPropertySet.cpp(109) : There is no Property named 'PushedTextColour' available in the set.
27/07/2012 11:28:00 (Error) CEGUI::UnknownObjectException in file ..\..\..\cegui\src\CEGUIPropertySet.cpp(109) : There is no Property named 'HoverTextColour' available in the set.
27/07/2012 11:28:00 (Error) CEGUI::UnknownObjectException in file ..\..\..\cegui\src\CEGUIPropertySet.cpp(109) : There is no Property named 'NormalTextColour' available in the set.
Is this easy to fix? If not, I'm happy enough to just move to a different skin...
Thanks muchly for any help, please excuse me if it's a noob question, I truly am a CEGUI noob atm
Cheers,
Anthony
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Text is not working with SleekSpace skin
Hi,
We would prefer people not to necro topics but to create a fresh topic (perhaps with a link to the ancient one), since so much can change in three years
I have to state up front that SleekSpace is a community made skin and as such we offer no direct support for it, though of course we will try to assist where possible (i.e we will treat it as if you made the skin yourself, but will not be fixing or updating the skin at all).
You should have posted the entire log (and used code tags), since right now we have no idea which version of cegui you are using - IIRC sleek space is originally made for 0.5 / 0.6. You're most likely using 0.7, so there will be some other stuff you will need to update to get it working 100% correctly - especially related to window frames and such (note that this has nothing to do with the issue you're having right now... I'm coming to that...)
To fix the issue you're having, you'll need to edit the looknfeel xml for sleek space. I don't have the SleekSpace skin here to look at, but I'm guessing that these properties are mentioned in subelements of StateImagery blocks for the button types, but there are no PropertyDefinition elements for them (because these properties used to exist always, but now have to be defined in the WidgerLook xml). So the solution is likely to be to add a PropertyDefinition for each of those missing properties, as an example the NormalTextColour, might look like this:
This would go right at the top of the WidgetLook which is causing the issue (likely the button type(s)), and you'll need similar entries for the other missing colour properties.
HTH
CE.
We would prefer people not to necro topics but to create a fresh topic (perhaps with a link to the ancient one), since so much can change in three years
I have to state up front that SleekSpace is a community made skin and as such we offer no direct support for it, though of course we will try to assist where possible (i.e we will treat it as if you made the skin yourself, but will not be fixing or updating the skin at all).
You should have posted the entire log (and used code tags), since right now we have no idea which version of cegui you are using - IIRC sleek space is originally made for 0.5 / 0.6. You're most likely using 0.7, so there will be some other stuff you will need to update to get it working 100% correctly - especially related to window frames and such (note that this has nothing to do with the issue you're having right now... I'm coming to that...)
To fix the issue you're having, you'll need to edit the looknfeel xml for sleek space. I don't have the SleekSpace skin here to look at, but I'm guessing that these properties are mentioned in subelements of StateImagery blocks for the button types, but there are no PropertyDefinition elements for them (because these properties used to exist always, but now have to be defined in the WidgerLook xml). So the solution is likely to be to add a PropertyDefinition for each of those missing properties, as an example the NormalTextColour, might look like this:
Code: Select all
<PropertyDefinition name="NormalTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
This would go right at the top of the WidgetLook which is causing the issue (likely the button type(s)), and you'll need similar entries for the other missing colour properties.
HTH
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: Text is not working with SleekSpace skin
Hey,
Sorry for my numerous errors...
But thanks for the fix! worked perfectly
Cheers,
Anthony
Sorry for my numerous errors...
But thanks for the fix! worked perfectly
Cheers,
Anthony
Who is online
Users browsing this forum: No registered users and 8 guests