CreditsGump Class Reference

#include <CreditsGump.h>

Inheritance diagram for CreditsGump:

ModalGump Gump Object List of all members.

Public Member Functions

 ENABLE_RUNTIME_CLASSTYPE ()
 CreditsGump ()
 CreditsGump (const std::string &text, int parskip=24, uint32 _Flags=0, sint32 layer=LAYER_MODAL)
virtual ~CreditsGump (void)
virtual void InitGump (Gump *newparent, bool take_focus=true)
void SetFlagWhenFinished (std::string configkey_)
virtual void Close (bool no_del=false)
virtual bool Run (const uint32 framenum)
virtual void PaintThis (RenderSurface *, sint32 lerp_factor, bool scaled)
virtual bool OnKeyDown (int key, int mod)

Protected Types

 CS_PLAYING
 CS_FINISHING
 CS_CLOSING
enum  CreditsState { CS_PLAYING, CS_FINISHING, CS_CLOSING }

Protected Member Functions

void extractLine (std::string &text, char &modifier, std::string &line)

Protected Attributes

std::string text
int parskip
enum CreditsGump::CreditsState state
int timer
RenderedTexttitle
RenderedTextnexttitle
int nexttitlesurf
RenderSurfacescroll [4]
int scrollheight [4]
int currentsurface
int currenty
std::string configkey

Detailed Description

Definition at line 26 of file CreditsGump.h.


Member Enumeration Documentation

enum CreditsGump::CreditsState [protected]

Enumerator:
CS_PLAYING 
CS_FINISHING 
CS_CLOSING 

Definition at line 58 of file CreditsGump.h.


Constructor & Destructor Documentation

CreditsGump::CreditsGump (  ) 

Definition at line 33 of file CreditsGump.cpp.

CreditsGump::CreditsGump ( const std::string &  text,
int  parskip = 24,
uint32  _Flags = 0,
sint32  layer = LAYER_MODAL 
)

Definition at line 39 of file CreditsGump.cpp.

References CS_PLAYING, nexttitle, parskip, state, text, timer, and title.

CreditsGump::~CreditsGump ( void   )  [virtual]

Definition at line 52 of file CreditsGump.cpp.

References nexttitle, scroll, and title.


Member Function Documentation

void CreditsGump::Close ( bool  no_del = false  )  [virtual]

Close the gump

Parameters:
no_del If true, do not delete after closing

Reimplemented from ModalGump.

Definition at line 87 of file CreditsGump.cpp.

References ModalGump::Close(), MusicProcess::get_instance(), GUIApp::get_instance(), MusicProcess::playMusic(), and GUIApp::popMouseCursor().

Referenced by OnKeyDown(), and Run().

CreditsGump::ENABLE_RUNTIME_CLASSTYPE (  ) 

Reimplemented from ModalGump.

void CreditsGump::extractLine ( std::string &  text,
char &  modifier,
std::string &  line 
) [protected]

Definition at line 97 of file CreditsGump.cpp.

Referenced by Run().

void CreditsGump::InitGump ( Gump newparent,
bool  take_focus = true 
) [virtual]

Init the gump and add it to parent; call after construction When newparent is 0, this will call GUIApp::addGump().

Parameters:
newparent The Gump's new parent or 0.
takefocus If true, set parent's focus_child to this

Reimplemented from ModalGump.

Definition at line 63 of file CreditsGump.cpp.

References RenderSurface::CreateSecondaryRenderSurface(), currentsurface, currenty, RenderSurface::Fill32(), GUIApp::get_instance(), ModalGump::InitGump(), GUIApp::MOUSE_NONE, GUIApp::pushMouseCursor(), scroll, scrollheight, and GUIApp::setMouseCursor().

Referenced by U8Game::playCredits().

bool CreditsGump::OnKeyDown ( int  key,
int  mod 
) [virtual]

Reimplemented from Gump.

Definition at line 376 of file CreditsGump.cpp.

References Close().

void CreditsGump::PaintThis ( RenderSurface ,
sint32  lerp_factor,
bool  scaled 
) [virtual]

Overloadable method to Paint just this Gump (RenderSurface is relative to this).

Reimplemented from Gump.

Definition at line 348 of file CreditsGump.cpp.

References currentsurface, currenty, RenderedText::draw(), RenderSurface::Fill32(), RenderSurface::GetSurfaceAsTexture(), scroll, scrollheight, title, and Gump::y.

bool CreditsGump::Run ( const uint32  framenum  )  [virtual]

Run the gump

Returns:
true if repaint required

Reimplemented from Gump.

Definition at line 131 of file CreditsGump.cpp.

References Close(), configkey, CS_CLOSING, CS_FINISHING, CS_PLAYING, currentsurface, currenty, RenderedText::draw(), extractLine(), RenderSurface::Fill32(), font, FontManager::get_instance(), SettingManager::get_instance(), FontManager::getGameFont(), RenderedText::getSize(), RenderedText::getVlead(), height, indent(), line, nexttitle, nexttitlesurf, parskip, Pentagram::Font::renderText(), Gump::Run(), scroll, scrollheight, SettingManager::set(), state, text, Pentagram::Font::TEXT_CENTER, Pentagram::Font::TEXT_LEFT, timer, and title.

void CreditsGump::SetFlagWhenFinished ( std::string  configkey_  )  [inline]

Definition at line 40 of file CreditsGump.h.

References configkey.

Referenced by U8Game::playCredits().


Member Data Documentation

std::string CreditsGump::configkey [protected]

Definition at line 75 of file CreditsGump.h.

Referenced by Run(), and SetFlagWhenFinished().

int CreditsGump::currentsurface [protected]

Definition at line 72 of file CreditsGump.h.

Referenced by InitGump(), PaintThis(), and Run().

int CreditsGump::currenty [protected]

Definition at line 73 of file CreditsGump.h.

Referenced by InitGump(), PaintThis(), and Run().

RenderedText* CreditsGump::nexttitle [protected]

Definition at line 67 of file CreditsGump.h.

Referenced by CreditsGump(), Run(), and ~CreditsGump().

int CreditsGump::nexttitlesurf [protected]

Definition at line 68 of file CreditsGump.h.

Referenced by Run().

int CreditsGump::parskip [protected]

Definition at line 56 of file CreditsGump.h.

Referenced by CreditsGump(), and Run().

RenderSurface* CreditsGump::scroll[4] [protected]

Definition at line 70 of file CreditsGump.h.

Referenced by InitGump(), PaintThis(), Run(), and ~CreditsGump().

int CreditsGump::scrollheight[4] [protected]

Definition at line 71 of file CreditsGump.h.

Referenced by InitGump(), PaintThis(), and Run().

enum CreditsGump::CreditsState CreditsGump::state [protected]

Referenced by CreditsGump(), and Run().

std::string CreditsGump::text [protected]

Definition at line 55 of file CreditsGump.h.

Referenced by CreditsGump(), and Run().

int CreditsGump::timer [protected]

Definition at line 64 of file CreditsGump.h.

Referenced by CreditsGump(), and Run().

RenderedText* CreditsGump::title [protected]

Definition at line 66 of file CreditsGump.h.

Referenced by CreditsGump(), PaintThis(), Run(), and ~CreditsGump().


The documentation for this class was generated from the following files:
Generated on Fri Jul 27 22:29:03 2007 for pentagram by  doxygen 1.4.7