CreditSection::Element Class Reference
Represents a single element in a CreditSection.
More...
#include <Game/Credits.h>
List of all members.
Public Member Functions |
|
| Element () |
| | Constructor.
|
| void | SetText (const char *str) |
| | Sets the text of the element.
|
| void | SetColor (const Color4f &c) |
| | Sets the color of the text.
|
| void | SetFont (FontRef f) |
| | Sets the fonts to use for rendering.
|
| void | SetImage (const Sprite &im) |
| | Sets the image to draw with the text.
|
| void | SetPadding (float top, float bottom) |
| | Sets the top and bottom padding for the section.
|
| void | SetImageTextPadding (float p) |
| | Sets padding between the image and the text.
|
| void | GetDimensions (float &w, float &h) const |
| | Gets the size of the element.
|
| float | GetWidth () const |
| | Gets the width of the element.
|
| float | GetHeight () const |
| | Gets the height of the element.
|
| void | Draw (const Point2f &p) const |
| | Draws the section at the given location.
|
| bool | IsEmpty () const |
| | Determines if the element contains any data that can be drawn.
|
Detailed Description
Represents a single element in a CreditSection.
Member Function Documentation
| void CreditSection::Element::Draw |
( |
const Point2f & |
p |
) |
const |
Draws the section at the given location.
- Parameters:
-
| [in] | p | the top left position of the area to draw to. |
| void CreditSection::Element::GetDimensions |
( |
float & |
w, |
|
|
float & |
h | |
|
) |
| | const |
Gets the size of the element.
- Parameters:
-
| [out] | w | the width. |
| [out] | h | the height. |
| float CreditSection::Element::GetHeight |
( |
|
) |
const [inline] |
Gets the height of the element.
- Returns:
- the height.
| float CreditSection::Element::GetWidth |
( |
|
) |
const [inline] |
Gets the width of the element.
- Returns:
- the width.
| bool CreditSection::Element::IsEmpty |
( |
|
) |
const [inline] |
Determines if the element contains any data that can be drawn.
- Returns:
- true if the element contains no drawable data, false otherwise.
| void CreditSection::Element::SetColor |
( |
const Color4f & |
c |
) |
|
Sets the color of the text.
- Parameters:
-
| void CreditSection::Element::SetFont |
( |
FontRef |
f |
) |
|
Sets the fonts to use for rendering.
- Parameters:
-
| void CreditSection::Element::SetImage |
( |
const Sprite & |
im |
) |
|
Sets the image to draw with the text.
- Parameters:
-
| void CreditSection::Element::SetImageTextPadding |
( |
float |
p |
) |
|
Sets padding between the image and the text.
- Parameters:
-
| void CreditSection::Element::SetPadding |
( |
float |
top, |
|
|
float |
bottom | |
|
) |
| | |
Sets the top and bottom padding for the section.
- Parameters:
-
| [in] | top | the top padding. |
| [in] | bottom | the bottom padding. |
| void CreditSection::Element::SetText |
( |
const char * |
str |
) |
|
Sets the text of the element.
- Parameters:
-
The documentation for this class was generated from the following files: