Text or Icon on a G3D::GuiControl.
More...
|
| | GuiText (const std::string &text="", const GFont::Ref &font=GFont::Ref(), float size=-1.0f, const Color4 &color=Color4(-1,-1,-1,-1), const Color4 &outlineColor=Color4(-1,-1,-1,-1), const Vector2 &offset=Vector2::zero()) |
| | Negative alpha values on color, outlineColor, and size mean "use
default". NULL font means "use default".
|
| |
| | GuiText (const char *text) |
| |
| | GuiText (const shared_ptr< Texture > &texture, const Rect2D &srcRect) |
| | Create an icon.
|
| |
| | GuiText (const Icon &icon) |
| |
| void | append (const std::string &text, const GFont::Ref &font=GFont::Ref(), float size=-1.0f, const Color4 &color=Color4(-1,-1,-1,-1), const Color4 &outlineColor=Color4(-1,-1,-1,-1), const Vector2 &offset=Vector2::zero()) |
| | Adds this text to the end of the GuiText.
|
| |
| const Element & | element (int e) const |
| | Returns element e within this GuiText.
|
| |
| bool | empty () const |
| | True if this is an empty caption.
|
| |
| const Rect2D & | iconSourceRect () const |
| |
| const shared_ptr< Texture > & | iconTexture () const |
| |
| bool | isIcon () const |
| | True if this is an icon.
|
| |
| int | numElements () const |
| | Returns the number of elements within this GuiText.
|
| |
| | operator std::string () const |
| | Concatenates all of the text within the elements.
|
| |
| void | setDefault (const GFont::Ref &dfont, float dsize, const Color4 &dcolor, const Color4 &doutline) |
| | Provides the value of default values for current elements.
|
| |
| std::string | text () const |
| | Concatenates all of the text within the elements.
|
| |
Text or Icon on a G3D::GuiControl.
These are normally created implicitly by a cast from std::string or by G3D::IconSet, but can be created explicitly when more information needs to be specified.
- See Also
- G3D::GuiLabel, G3D::GuiTextBox, G3D::IconSet, G3D::Icon, G3D::Texture
| G3D::GuiText::GuiText |
( |
const std::string & |
text = "", |
|
|
const GFont::Ref & |
font = GFont::Ref(), |
|
|
float |
size = -1.0f, |
|
|
const Color4 & |
color = Color4(-1,-1,-1,-1), |
|
|
const Color4 & |
outlineColor = Color4(-1,-1,-1,-1), |
|
|
const Vector2 & |
offset = Vector2::zero() |
|
) |
| |
Negative alpha values on color, outlineColor, and size mean "use
default". NULL font means "use default".
Defaults are set on the GuiTheme.
| G3D::GuiText::GuiText |
( |
const char * |
text | ) |
|
| G3D::GuiText::GuiText |
( |
const shared_ptr< Texture > & |
texture, |
|
|
const Rect2D & |
srcRect |
|
) |
| |
Create an icon.
- Parameters
-
| texture | The source texture. |
| srcRect | The source rectangle, in pixels of texture |
- See Also
- G3D::IconSet.
| G3D::GuiText::GuiText |
( |
const Icon & |
icon | ) |
|
| void G3D::GuiText::append |
( |
const std::string & |
text, |
|
|
const GFont::Ref & |
font = GFont::Ref(), |
|
|
float |
size = -1.0f, |
|
|
const Color4 & |
color = Color4(-1,-1,-1,-1), |
|
|
const Color4 & |
outlineColor = Color4(-1,-1,-1,-1), |
|
|
const Vector2 & |
offset = Vector2::zero() |
|
) |
| |
Adds this text to the end of the GuiText.
It is an error to append to an icon.
| const Element& G3D::GuiText::element |
( |
int |
e | ) |
const |
|
inline |
Returns element e within this GuiText.
| bool G3D::GuiText::empty |
( |
| ) |
const |
|
inline |
True if this is an empty caption.
| const Rect2D& G3D::GuiText::iconSourceRect |
( |
| ) |
const |
|
inline |
| const shared_ptr<Texture>& G3D::GuiText::iconTexture |
( |
| ) |
const |
|
inline |
| bool G3D::GuiText::isIcon |
( |
| ) |
const |
|
inline |
True if this is an icon.
Referenced by empty().
| int G3D::GuiText::numElements |
( |
| ) |
const |
|
inline |
Returns the number of elements within this GuiText.
Concatenates all of the text within the elements.
Provides the value of default values for current elements.