#include <GameWidget.h>
Inheritance diagram for GameWidget:
Public Types | |
GAME_PLAY = 1 | |
GAME_LOAD = 2 | |
GAME_SETTINGS = 3 | |
GAME_REMOVE = 4 | |
enum | Message { GAME_PLAY = 1, GAME_LOAD = 2, GAME_SETTINGS = 3, GAME_REMOVE = 4 } |
Public Member Functions | |
ENABLE_RUNTIME_CLASSTYPE () | |
GameWidget (int X, int Y, Pentagram::istring &game) | |
virtual | ~GameWidget () |
Pentagram::istring | getGameName () |
virtual void | InitGump (Gump *newparent, bool take_focus=true) |
virtual uint16 | TraceObjId (int mx, int my) |
virtual void | PaintThis (RenderSurface *, sint32 lerp_factor, bool scaled) |
virtual Gump * | OnMouseDown (int button, int mx, int my) |
virtual void | OnMouseOver () |
virtual void | OnMouseLeft () |
virtual void | ChildNotify (Gump *child, uint32 message) |
Protected Attributes | |
GameInfo * | info |
bool | highlight |
Definition at line 26 of file GameWidget.h.
enum GameWidget::Message |
Definition at line 49 of file GameWidget.h.
GameWidget::GameWidget | ( | int | X, | |
int | Y, | |||
Pentagram::istring & | game | |||
) |
Definition at line 32 of file GameWidget.cpp.
References GUIApp::get_instance(), CoreApp::getGameInfo(), and info.
GameWidget::~GameWidget | ( | ) | [virtual] |
Definition at line 39 of file GameWidget.cpp.
This function is used by our children to notifty us of 'something' Think of it as a generic call back function
Reimplemented from Gump.
Definition at line 90 of file GameWidget.cpp.
References ButtonWidget::BUTTON_CLICK, Gump::ChildNotify(), Gump::GetIndex(), Gump::index, and Gump::parent.
GameWidget::ENABLE_RUNTIME_CLASSTYPE | ( | ) |
Reimplemented from Gump.
Pentagram::istring GameWidget::getGameName | ( | ) |
Definition at line 44 of file GameWidget.cpp.
References info, and GameInfo::name.
Referenced by PentagramMenuGump::ChildNotify().
void GameWidget::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 Gump.
Definition at line 48 of file GameWidget.cpp.
References GAME_LOAD, GAME_PLAY, GAME_REMOVE, GAME_SETTINGS, GameInfo::getGameTitle(), GameInfo::getPrintableVersion(), info, Gump::InitGump(), GameInfo::name, Gump::SetIndex(), and PentagramVersion::version.
Referenced by PentagramMenuGump::InitGump().
Gump * GameWidget::OnMouseDown | ( | int | button, | |
int | mx, | |||
int | my | |||
) | [virtual] |
Reimplemented from Gump.
Definition at line 109 of file GameWidget.cpp.
References Gump::OnMouseDown().
void GameWidget::OnMouseLeft | ( | ) | [virtual] |
void GameWidget::OnMouseOver | ( | ) | [virtual] |
void GameWidget::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 127 of file GameWidget.cpp.
References RenderSurface::Blit(), RenderedText::draw(), RenderSurface::Fill32(), font, FontManager::get_instance(), PentagramMenuGump::getCovers(), PentagramMenuGump::getFlags(), Gump::GetParent(), FontManager::getTTFont(), highlight, info, GameInfo::language, and GameInfo::type.
uint16 GameWidget::TraceObjId | ( | int | mx, | |
int | my | |||
) | [virtual] |
Trace a click, and return ObjId.
Reimplemented from Gump.
Definition at line 102 of file GameWidget.cpp.
References Object::getObjId(), Object::objid, and Gump::TraceObjId().
bool GameWidget::highlight [protected] |
Definition at line 60 of file GameWidget.h.
Referenced by OnMouseLeft(), OnMouseOver(), and PaintThis().
GameInfo* GameWidget::info [protected] |
Definition at line 58 of file GameWidget.h.
Referenced by GameWidget(), getGameName(), InitGump(), and PaintThis().