MenuGump Class Reference

#include <MenuGump.h>

Inheritance diagram for MenuGump:

ModalGump Gump Object List of all members.

Public Member Functions

 ENABLE_RUNTIME_CLASSTYPE ()
 MenuGump (bool nameEntryMode=false)
virtual ~MenuGump (void)
virtual void InitGump (Gump *newparent, bool take_focus=true)
virtual void Close (bool no_del=false)
virtual void PaintThis (RenderSurface *, sint32 lerp_factor, bool scaled)
virtual bool OnKeyDown (int key, int mod)
virtual bool OnTextInput (int unicode)
virtual void ChildNotify (Gump *child, uint32 message)

Static Public Member Functions

static void showMenu ()
static void ConCmd_showMenu (const Console::ArgvType &argv)
static void inputName ()

Protected Member Functions

virtual void selectEntry (int entry)

Protected Attributes

bool nameEntryMode
int oldMusicTrack

Detailed Description

Definition at line 26 of file MenuGump.h.


Constructor & Destructor Documentation

MenuGump::MenuGump ( bool  nameEntryMode = false  ) 

Definition at line 50 of file MenuGump.cpp.

References MusicProcess::get_instance(), GUIApp::get_instance(), MusicProcess::getTrack(), GUIApp::MOUSE_HAND, GUIApp::MOUSE_NONE, nameEntryMode, oldMusicTrack, GUIApp::pushMouseCursor(), and GUIApp::setMouseCursor().

Referenced by inputName(), and showMenu().

MenuGump::~MenuGump ( void   )  [virtual]

Definition at line 68 of file MenuGump.cpp.


Member Function Documentation

void MenuGump::ChildNotify ( Gump child,
uint32  message 
) [virtual]

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 186 of file MenuGump.cpp.

References ButtonWidget::BUTTON_CLICK, Close(), EditWidget::EDIT_ENTER, Gump::GetIndex(), getMainActor(), EditWidget::getText(), selectEntry(), and MainActor::setName().

void MenuGump::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 72 of file MenuGump.cpp.

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

Referenced by ChildNotify(), and OnKeyDown().

void MenuGump::ConCmd_showMenu ( const Console::ArgvType argv  )  [static]

Definition at line 283 of file MenuGump.cpp.

References showMenu().

Referenced by GUIApp::GUIApp(), and GUIApp::~GUIApp().

MenuGump::ENABLE_RUNTIME_CLASSTYPE (  ) 

Reimplemented from ModalGump.

void MenuGump::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 88 of file MenuGump.cpp.

References Gump::dims, SettingManager::get(), SettingManager::get_instance(), GameData::get_instance(), Gump::GetDims(), Shape::getFrame(), GameData::getGumps(), getMainActor(), MainActor::getName(), ShapeArchive::getShape(), Gump::Gump(), GameData::GUMPS, gumpShape, Pentagram::Rect::h, ShapeFrame::height, Gump::InitGump(), ModalGump::InitGump(), Gump::MakeFocus(), menuEntryShape, Gump::Move(), nameEntryMode, paganShape, Gump::SetIndex(), Gump::SetShape(), Gump::shape, Pentagram::Rect::w, ShapeFrame::width, Gump::x, and Gump::y.

void MenuGump::inputName (  )  [static]

Definition at line 289 of file MenuGump.cpp.

References Gump::CENTER, ModalGump::InitGump(), MenuGump(), and Gump::setRelativePosition().

Referenced by StartU8Process::run().

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

Reimplemented from Gump.

Definition at line 166 of file MenuGump.cpp.

References Actor::ACT_DEAD, Close(), Actor::getActorFlags(), getMainActor(), nameEntryMode, Gump::OnKeyDown(), and selectEntry().

bool MenuGump::OnTextInput ( int  unicode  )  [virtual]

Reimplemented from Gump.

Definition at line 267 of file MenuGump.cpp.

References Gump::OnTextInput().

void MenuGump::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 161 of file MenuGump.cpp.

References Gump::PaintThis().

void MenuGump::selectEntry ( int  entry  )  [protected, virtual]

Definition at line 206 of file MenuGump.cpp.

References Actor::ACT_DEAD, PagedGump::addPage(), Gump::CENTER, SettingManager::get(), Game::get_instance(), SettingManager::get_instance(), Actor::getActorFlags(), getMainActor(), gumpShape, OptionsGump::InitGump(), PagedGump::InitGump(), Game::playCredits(), Game::playEndgameMovie(), Game::playIntroMovie(), Game::playQuotes(), Object::save(), Gump::setRelativePosition(), and QuitGump::verifyQuit().

Referenced by ChildNotify(), and OnKeyDown().

void MenuGump::showMenu (  )  [static]

Definition at line 275 of file MenuGump.cpp.

References Gump::CENTER, ModalGump::InitGump(), MenuGump(), and Gump::setRelativePosition().

Referenced by ConCmd_showMenu(), and MainMenuProcess::run().


Member Data Documentation

bool MenuGump::nameEntryMode [protected]

Definition at line 51 of file MenuGump.h.

Referenced by InitGump(), MenuGump(), and OnKeyDown().

int MenuGump::oldMusicTrack [protected]

Definition at line 52 of file MenuGump.h.

Referenced by Close(), and MenuGump().


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