#include <BarkGump.h>
Inheritance diagram for BarkGump:
Public Member Functions | |
ENABLE_RUNTIME_CLASSTYPE () | |
BarkGump () | |
BarkGump (uint16 owner, std::string msg, uint32 speechshapenum=0) | |
virtual | ~BarkGump (void) |
virtual bool | Run (const uint32 framenum) |
virtual Gump * | OnMouseDown (int button, int mx, int my) |
virtual void | InitGump (Gump *newparent, bool take_focus=true) |
bool | loadData (IDataSource *ids, uint32 version) |
Protected Member Functions | |
bool | NextText () |
virtual void | saveData (ODataSource *ods) |
Protected Attributes | |
std::string | barked |
sint32 | counter |
ObjId | textwidget |
uint32 | speechshapenum |
uint32 | speechlength |
uint32 | totaltextheight |
int | textdelay |
Definition at line 24 of file BarkGump.h.
BarkGump::BarkGump | ( | ) |
Definition at line 34 of file BarkGump.cpp.
Definition at line 40 of file BarkGump.cpp.
References SettingManager::get(), SettingManager::get_instance(), and textdelay.
BarkGump::~BarkGump | ( | void | ) | [virtual] |
Definition at line 49 of file BarkGump.cpp.
BarkGump::ENABLE_RUNTIME_CLASSTYPE | ( | ) |
Reimplemented from ItemRelativeGump.
void BarkGump::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 ItemRelativeGump.
Definition at line 53 of file BarkGump.cpp.
References barked, counter, Gump::dims, AudioProcess::get_instance(), Gump::GetDims(), Object::getObjId(), AudioProcess::getSpeechLength(), Pentagram::Rect::h, TextWidget::InitGump(), ItemRelativeGump::InitGump(), Gump::owner, AudioProcess::playSpeech(), TextWidget::rewind(), TextWidget::setupNextText(), speechlength, speechshapenum, textdelay, textwidget, totaltextheight, and Pentagram::Rect::w.
bool BarkGump::loadData | ( | IDataSource * | ids, | |
uint32 | version | |||
) |
Reimplemented from ItemRelativeGump.
Definition at line 198 of file BarkGump.cpp.
References barked, counter, Gump::dims, SettingManager::get(), SettingManager::get_instance(), Gump::GetDims(), getGump(), Pentagram::Rect::h, ItemRelativeGump::loadData(), speechlength, speechshapenum, textdelay, textwidget, totaltextheight, and Pentagram::Rect::w.
bool BarkGump::NextText | ( | ) | [protected] |
show next text. returns false if no more text available
Definition at line 118 of file BarkGump.cpp.
References counter, Gump::dims, Gump::GetDims(), getGump(), Pentagram::Rect::h, TextWidget::setupNextText(), speechlength, textdelay, textwidget, totaltextheight, and Pentagram::Rect::w.
Referenced by OnMouseDown(), and Run().
Gump * BarkGump::OnMouseDown | ( | int | button, | |
int | mx, | |||
int | my | |||
) | [virtual] |
Reimplemented from Gump.
Definition at line 169 of file BarkGump.cpp.
References barked, Gump::Close(), AudioProcess::get_instance(), NextText(), Gump::OnMouseDown(), Gump::owner, speechlength, speechshapenum, and AudioProcess::stopSpeech().
bool BarkGump::Run | ( | const uint32 | framenum | ) | [virtual] |
Run the gump
Reimplemented from Gump.
Definition at line 139 of file BarkGump.cpp.
References barked, Gump::Close(), counter, AudioProcess::get_instance(), Kernel::get_instance(), AudioProcess::isSpeechPlaying(), NextText(), Gump::Run(), speechlength, speechshapenum, and textdelay.
void BarkGump::saveData | ( | ODataSource * | ods | ) | [protected, virtual] |
save the actual Object data
Reimplemented from ItemRelativeGump.
Definition at line 185 of file BarkGump.cpp.
References barked, counter, ItemRelativeGump::saveData(), speechlength, speechshapenum, textwidget, totaltextheight, ODataSource::write(), ODataSource::write2(), and ODataSource::write4().
std::string BarkGump::barked [protected] |
Definition at line 27 of file BarkGump.h.
Referenced by InitGump(), loadData(), OnMouseDown(), Run(), and saveData().
sint32 BarkGump::counter [protected] |
Definition at line 28 of file BarkGump.h.
Referenced by InitGump(), loadData(), NextText(), Run(), and saveData().
uint32 BarkGump::speechlength [protected] |
Definition at line 31 of file BarkGump.h.
Referenced by InitGump(), loadData(), NextText(), OnMouseDown(), Run(), and saveData().
uint32 BarkGump::speechshapenum [protected] |
Definition at line 30 of file BarkGump.h.
Referenced by InitGump(), loadData(), OnMouseDown(), Run(), and saveData().
int BarkGump::textdelay [protected] |
Definition at line 55 of file BarkGump.h.
Referenced by BarkGump(), InitGump(), loadData(), NextText(), and Run().
ObjId BarkGump::textwidget [protected] |
Definition at line 29 of file BarkGump.h.
Referenced by InitGump(), loadData(), NextText(), and saveData().
uint32 BarkGump::totaltextheight [protected] |
Definition at line 32 of file BarkGump.h.
Referenced by InitGump(), loadData(), NextText(), and saveData().