CreditSection Class Reference

Holds the data for one section of the credits. More...

#include <Game/Credits.h>

List of all members.

Classes

class  Element
 Represents a single element in a CreditSection. More...

Public Member Functions

 CreditSection ()
 Constructor.
 CreditSection (const char *name)
 Constructor.
void SetTitle (const char *title)
 Sets the title of the section.
void SetTitleFont (FontRef font)
 Sets the fonts to use for rendering the title.
void SetTitleColor (const Color4f &color)
 Sets the color to use for rendering the title.
void SetTitlePadding (float top, float bottom)
 Sets the padding to use for rendering the title.
void AddElement (const char *text, FontRef f, const Color4f &c)
 Adds the given text to the section.
void AddElement (const char *text, FontRef f, const Color4f &c, float t, float b)
 Adds the given text to the section.
void AddImageElement (const Sprite &image, const char *text, FontRef f, const Color4f &c, float t, float b)
 Adds text with an associated image.
void AddImageElement (const Sprite &image, const char *text, FontRef f, const Color4f &c, float t, float b, float spacing)
 Adds text with an associated image.
void GetDimensions (float &w, float &h) const
 Gets the size of the section.
void Draw (const Point2f &p) const
 Draws the section at the given location.

Detailed Description

Holds the data for one section of the credits.


Constructor & Destructor Documentation

CreditSection::CreditSection ( const char *  name  ) 

Constructor.

Parameters:
[in] name the name of the section.

Member Function Documentation

void CreditSection::AddElement ( const char *  text,
FontRef  f,
const Color4f c,
float  t,
float  b 
)

Adds the given text to the section.

Parameters:
[in] text the text to add.
[in] f the font.
[in] c the color.
[in] t top padding.
[in] b bottom padding.
void CreditSection::AddElement ( const char *  text,
FontRef  f,
const Color4f c 
)

Adds the given text to the section.

Parameters:
[in] text the text to add.
[in] f the font.
[in] c the color.
void CreditSection::AddImageElement ( const Sprite image,
const char *  text,
FontRef  f,
const Color4f c,
float  t,
float  b,
float  spacing 
)

Adds text with an associated image.

Parameters:
[in] image the image to display with the text.
[in] text the text to add.
[in] f the font.
[in] c the color.
[in] t top padding.
[in] b bottom padding.
[in] spacing the spacing between the image and the text.
void CreditSection::AddImageElement ( const Sprite image,
const char *  text,
FontRef  f,
const Color4f c,
float  t,
float  b 
)

Adds text with an associated image.

Parameters:
[in] image the image to display with the text.
[in] text the text to add.
[in] f the font.
[in] c the color.
[in] t top padding.
[in] b bottom padding.
void CreditSection::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::GetDimensions ( float &  w,
float &  h 
) const

Gets the size of the section.

Parameters:
[out] w the width.
[out] h the height.
void CreditSection::SetTitle ( const char *  title  )  [inline]

Sets the title of the section.

Parameters:
[in] title the section title.
void CreditSection::SetTitleColor ( const Color4f color  )  [inline]

Sets the color to use for rendering the title.

Parameters:
[in] color the color to use for the header text.
void CreditSection::SetTitleFont ( FontRef  font  )  [inline]

Sets the fonts to use for rendering the title.

Parameters:
[in] font the font to use for the header text.
void CreditSection::SetTitlePadding ( float  top,
float  bottom 
) [inline]

Sets the padding to use for rendering the title.

Parameters:
[in] top the top padding.
[in] bottom the bottom padding.

The documentation for this class was generated from the following files:
Generated on Mon Apr 5 19:08:05 2010 for BrickOut |ReDuX| by  doxygen 1.6.3