SdkTrays setting a caption?
-
- Gremlin
- Posts: 180
- Joined: Fri Jan 07, 2011 8:58 pm
- Location: That way
- x 2
- Contact:
SdkTrays setting a caption?
It says on the SdkTrays that you can get/set a caption of a widget. I cannot find how to do this. Help?
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Re: SdkTrays setting a caption?
Known problem. Please search.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- omniter
- OGRE Contributor
- Posts: 424
- Joined: Thu Mar 19, 2009 8:08 am
- Location: Canada
- x 44
Re: SdkTrays setting a caption?
I'm not sure where it says that you can do this. Not all widgets have a caption anyway. If there is a page that says you can set/get the caption on any widget, please point us to it, and we will correct it.pighead10 wrote:It says on the SdkTrays that you can get/set a caption of a widget. I cannot find how to do this. Help?
-
- Gremlin
- Posts: 180
- Joined: Fri Jan 07, 2011 8:58 pm
- Location: That way
- x 2
- Contact:
Re: SdkTrays setting a caption?
"I cannot find how to do this." I did search for a long time >.>jacmoe wrote:Known problem. Please search.
It doesn't say any caption, but it says you can "get/set the caption" here: http://www.ogre3d.org/tikiwiki/SdkTraysomniter wrote:I'm not sure where it says that you can do this. Not all widgets have a caption anyway. If there is a page that says you can set/get the caption on any widget, please point us to it, and we will correct it.pighead10 wrote:It says on the SdkTrays that you can get/set a caption of a widget. I cannot find how to do this. Help?
- omniter
- OGRE Contributor
- Posts: 424
- Joined: Thu Mar 19, 2009 8:08 am
- Location: Canada
- x 44
Re: SdkTrays setting a caption?
It says that for the Slider widget only... :S
-
- Gremlin
- Posts: 180
- Joined: Fri Jan 07, 2011 8:58 pm
- Location: That way
- x 2
- Contact:
Re: SdkTrays setting a caption?
TextBox
This widget consists of a bold caption bar and a text area that can be scrolled vertically. In addition to a tray location and a name, SdkTrayManager::createTextBox takes a caption, width, and height. You can set/get the caption, the text area contents, text padding, text alignment, manually change the scroll bar position, among other things.
- omniter
- OGRE Contributor
- Posts: 424
- Joined: Thu Mar 19, 2009 8:08 am
- Location: Canada
- x 44
Re: SdkTrays setting a caption?
Ah, missed that one. I was searching for "get/set", not "set/get", haha. In any case, you can only set the caption for widgets that have a caption. e.g., Slider, TextBox, Label, etc. These widget classes should have setCaption / getCaption methods. Also, their constructors allow you to pass in the caption. Have a look through SdkTrays.h. SdkTrays was never meant to be a full GUI system, and not all the methods are fully documented. Technically, we're not even supposed to provide support for SdkTrays, since it was only meant for the team to create samples, and is not part of the OGRE core.
-
- Gremlin
- Posts: 180
- Joined: Fri Jan 07, 2011 8:58 pm
- Location: That way
- x 2
- Contact:
Re: SdkTrays setting a caption?
I only used sdktrays because I entered a ludum dare, and was almost out of time so quickly added sdktrays and remade all the images. It's over now, but I'm trying ot get a health displayed but I can't get the caption to change once it's already been created - I couldn't find the set/getCaption method.