guiElement::TextArea - can't display with spaces in string
Posted: Mon Jan 24, 2005 5:35 pm
Ogre Version 0.15.2 on MSC++ 7.1;
I am having a problem getting an Overlay to display a string with spaces in it. From .overlay file (note the CAPTION parameter):
EXAMPLE 1: WILL NOT WORK
This will only display Sample.
EXAMPLE 2: WILL WORK
This will display SampleGameMessageText.
Even in my C++ code I can not set the caption to contain text with spaces..
This will only display Update.
The Text containers (from the .overlay file) are not included in a BorderPanel. Do they need to be? What am I doing wrong?
I am having a problem getting an Overlay to display a string with spaces in it. From .overlay file (note the CAPTION parameter):
EXAMPLE 1: WILL NOT WORK
This will only display Sample.
Code: Select all
// MessageNotifcation (speed)
container TextArea(Hud/2D/MessageNotification)
{
metrics_mode relative
horz_align left
vert_align top
top 0.02
left 0.02
width 2
height 0.15
font_name TrebuchetMSBold
char_height 0.020
caption Sample Game Message Text
colour 1 1 1
}
This will display SampleGameMessageText.
Code: Select all
// MessageNotifcation (speed)
container TextArea(Hud/2D/MessageNotification)
{
metrics_mode relative
horz_align left
vert_align top
top 0.02
left 0.02
width 2
height 0.15
font_name TrebuchetMSBold
char_height 0.020
caption SampleGameMessageText
colour 1 1 1
}
Code: Select all
Ogre::GuiElement* GuiHudTMessageNotification;
.......
GuiHudTMessageNotification = GuiManager::getSingleton().getGuiElement("Hud/2D/MessageNotification");
......
GuiHudThrottleText->setCaption("Update Game Message Text");
The Text containers (from the .overlay file) are not included in a BorderPanel. Do they need to be? What am I doing wrong?