#include <CreditsGump.h>
Inheritance diagram for CreditsGump:
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 |
RenderedText * | title |
RenderedText * | nexttitle |
int | nexttitlesurf |
RenderSurface * | scroll [4] |
int | scrollheight [4] |
int | currentsurface |
int | currenty |
std::string | configkey |
Definition at line 26 of file CreditsGump.h.
enum CreditsGump::CreditsState [protected] |
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] |
void CreditsGump::Close | ( | bool | no_del = false |
) | [virtual] |
Close the gump
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] |
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().
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] |
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
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().
std::string CreditsGump::configkey [protected] |
int CreditsGump::currentsurface [protected] |
int CreditsGump::currenty [protected] |
RenderedText* CreditsGump::nexttitle [protected] |
Definition at line 67 of file CreditsGump.h.
Referenced by CreditsGump(), Run(), and ~CreditsGump().
int CreditsGump::nexttitlesurf [protected] |
int CreditsGump::parskip [protected] |
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] |
enum CreditsGump::CreditsState CreditsGump::state [protected] |
Referenced by CreditsGump(), and Run().
std::string CreditsGump::text [protected] |
int CreditsGump::timer [protected] |
RenderedText* CreditsGump::title [protected] |
Definition at line 66 of file CreditsGump.h.
Referenced by CreditsGump(), PaintThis(), Run(), and ~CreditsGump().