I'd like to set the tool tip font, but I can't see how that would be done. The problem is some of the tool tips are quite long - a good sentence or so and the font they are using is too big.
You can set the main font of buttons, etc as a widget property in the layout, but I don't think there is a property for tooltip font?
Perhaps there is a way to specify a default value in the looknfeel for the TaharezLook/Tooltip ?
tooltip font [SOLVED]
Moderators: CEGUI MVP, CEGUI Team
tooltip font [SOLVED]
Last edited by fezztah on Tue Sep 23, 2008 16:22, edited 1 time in total.
Hello,
It seems that Tooltip inherits from Window, and as such, it has all the same Font functionality as all other windows. Specifically, it has both setFont(Font* font) and setFont(const String& name) functions.
You will also notice (on this page) that there is a Font property for Tooltips (in both WindowsLook and TaharezLook).
Hope that helps.
Kevin
It seems that Tooltip inherits from Window, and as such, it has all the same Font functionality as all other windows. Specifically, it has both setFont(Font* font) and setFont(const String& name) functions.
You will also notice (on this page) that there is a Font property for Tooltips (in both WindowsLook and TaharezLook).
Hope that helps.
Kevin
But that would require you to access it at run time and the tooltips are only created "as needed" by the system so how would you do that? Normally to set a font you go:
getWindow("my win name")->setFont("blah")
but you can't do that with a tooltip can you? It doesn't have a name?
The tooltip is only mentioned in the looknfeel file, I don't think you can set a font in that can you? Normally fonts are set in the layout, but tooltips never appear in a layout file.
I suppose I could create a completely new tooltip class that I use instead of the default one that just sets the font to be something else?
getWindow("my win name")->setFont("blah")
but you can't do that with a tooltip can you? It doesn't have a name?
The tooltip is only mentioned in the looknfeel file, I don't think you can set a font in that can you? Normally fonts are set in the layout, but tooltips never appear in a layout file.
I suppose I could create a completely new tooltip class that I use instead of the default one that just sets the font to be something else?
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
A window always has a default tooltip object at least. However it just isn't always visible.
So you can do this:
You might add some Null checks just to be sure...
HTH.
So you can do this:
Code: Select all
getWindow("my win name")->getTooltip()->setFont("blah")
You might add some Null checks just to be sure...
HTH.
Check out my released snake game using Cegui!
fezztah wrote:Ah, of course. Unless you use custom tooltips then every widget is using the same default tooltip object. So if I grab the first button I see as the app starts and set the font there then it's changed on every menu screen in the entire app.
thanks...
Wouldn't it just be easier to do this during initialization:
Code: Select all
CEGUI::System::getSingleton().getDefaultTooltip()->setFont(...);
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Jamarr wrote:Wouldn't it just be easier to do this during initialization:Code: Select all
CEGUI::System::getSingleton().getDefaultTooltip()->setFont(...);
<bows>
Check out my released snake game using Cegui!
Who is online
Users browsing this forum: No registered users and 11 guests