|
xoreos
0.0.5
|
#include <dialog.h>


Public Member Functions | |
| Dialog (const Common::UString &conv, Creature &pc, Object &obj, Module &module, bool playHello=true) | |
| ~Dialog () | |
| bool | hasEnded () const |
| Has the conversation ended? More... | |
| void | show () |
| Show the dialog. More... | |
| void | hide () |
| Hide the dialog. More... | |
| void | abort () |
| Abort the current conversation. More... | |
| void | addEvent (const Events::Event &event) |
| Add a single event for consideration into the event queue. More... | |
| int | processEventQueue () |
| Process the current event queue. More... | |
Public Member Functions inherited from Events::Notifyable | |
| Notifyable () | |
| virtual | ~Notifyable () |
Protected Member Functions | |
| void | notifyResized (int oldWidth, int oldHeight, int newWidth, int newHeight) |
Private Member Functions | |
| void | updateBox () |
| Update the box's contents. More... | |
| Object * | getSpeaker () |
| Get the current speaker. More... | |
| void | playSound (bool greeting) |
| Play a conversation sound. More... | |
| void | playAnimation () |
| Play a conversation animation. More... | |
| void | stopAnimation () |
| Stop a conversation animation. More... | |
| void | mouseMove () |
| The mouse was moved. More... | |
| void | mouseClick (const Events::Event &event) |
| The mouse was clicked. More... | |
| void | keyPressed (const Events::Event &event) |
| A keyboard key was pressed. More... | |
| void | checkPicked () |
Private Attributes | |
| Common::UString | _conv |
| The conversation file. More... | |
| Creature * | _pc |
| The conversation's PC. More... | |
| Object * | _object |
| The conversation's NPC. More... | |
| Module * | _module |
| The module this dialog is in. More... | |
| Common::ScopedPtr< DialogBox > | _dlgBox |
| The actual dialog box. More... | |
| Common::ScopedPtr< Aurora::DLGFile > | _dlg |
| The conversation file. More... | |
| std::list< Events::Event > | _eventQueue |
| The event queue. More... | |
| Engines::NWN::Dialog::Dialog | ( | const Common::UString & | conv, |
| Creature & | pc, | ||
| Object & | obj, | ||
| Module & | module, | ||
| bool | playHello = true |
||
| ) |
Definition at line 543 of file dialog.cpp.
References _dlg, _dlgBox, _object, kDialogHeight, kDialogWidth, notifyResized(), playAnimation(), playSound(), Common::ScopedPtrBase< T, Deallocator >::reset(), Engines::NWN::Object::setPCSpeaker(), updateBox(), and WindowMan.

| Engines::NWN::Dialog::~Dialog | ( | ) |
Definition at line 561 of file dialog.cpp.
References abort().

| void Engines::NWN::Dialog::abort | ( | ) |
Abort the current conversation.
Definition at line 577 of file dialog.cpp.
References _dlg, _object, hide(), Engines::NWN::Object::setPCSpeaker(), stopAnimation(), and Engines::NWN::Object::stopSound().
Referenced by keyPressed(), and ~Dialog().


| void Engines::NWN::Dialog::addEvent | ( | const Events::Event & | event | ) |
Add a single event for consideration into the event queue.
Definition at line 588 of file dialog.cpp.
References _eventQueue.
|
private |
Definition at line 659 of file dialog.cpp.
References _dlg, _dlgBox, Aurora::DLGFile::kInvalidLine, mouseMove(), playAnimation(), playSound(), stopAnimation(), and updateBox().
Referenced by keyPressed(), and mouseClick().


|
private |
Get the current speaker.
Definition at line 732 of file dialog.cpp.
References _dlg, _module, _object, Common::UString::empty(), Aurora::NWScript::ObjectContainer::getFirstObjectByTag(), and Aurora::DLGFile::Line::speaker.
Referenced by playAnimation(), stopAnimation(), and updateBox().


| bool Engines::NWN::Dialog::hasEnded | ( | ) | const |
Has the conversation ended?
Definition at line 565 of file dialog.cpp.
References _dlg.
Referenced by processEventQueue().

| void Engines::NWN::Dialog::hide | ( | ) |
Hide the dialog.
Definition at line 573 of file dialog.cpp.
References _dlgBox.
Referenced by abort().

|
private |
A keyboard key was pressed.
Definition at line 629 of file dialog.cpp.
References _dlgBox, abort(), and checkPicked().
Referenced by processEventQueue().


|
private |
The mouse was clicked.
Definition at line 621 of file dialog.cpp.
References _dlgBox, and checkPicked().
Referenced by processEventQueue().


|
private |
The mouse was moved.
Definition at line 614 of file dialog.cpp.
References _dlgBox, and CursorMan.
Referenced by checkPicked(), and processEventQueue().

|
protectedvirtual |
Reimplemented from Events::Notifyable.
Definition at line 678 of file dialog.cpp.
References _dlgBox.
Referenced by Dialog().

|
private |
Play a conversation animation.
Definition at line 769 of file dialog.cpp.
References _dlg, Aurora::DLGFile::Line::animation, Engines::NWN::getCreatureTalkAnimationName(), getSpeaker(), Engines::NWN::Object::playAnimation(), and stopAnimation().
Referenced by checkPicked(), and Dialog().


|
private |
Play a conversation sound.
Definition at line 743 of file dialog.cpp.
References _dlg, _object, Common::UString::empty(), Aurora::SSFFile::getSoundFile(), Engines::NWN::Object::getSSF(), Engines::NWN::kSSFHello, Engines::NWN::Object::playSound(), and Aurora::DLGFile::Line::sound.
Referenced by checkPicked(), and Dialog().


| int Engines::NWN::Dialog::processEventQueue | ( | ) |
Process the current event queue.
Definition at line 592 of file dialog.cpp.
References _eventQueue, hasEnded(), Events::kEventKeyDown, Events::kEventMouseDown, Events::kEventMouseMove, keyPressed(), mouseClick(), and mouseMove().

| void Engines::NWN::Dialog::show | ( | ) |
|
private |
Stop a conversation animation.
Definition at line 783 of file dialog.cpp.
References getSpeaker(), and Engines::NWN::Object::playAnimation().
Referenced by abort(), checkPicked(), and playAnimation().


|
private |
Update the box's contents.
Definition at line 687 of file dialog.cpp.
References _dlg, _dlgBox, Common::UString::empty(), Engines::NWN::Object::getName(), Engines::NWN::Object::getPortrait(), getSpeaker(), Aurora::LocString::getString(), GfxMan, kContinue, kEndDialog, Aurora::DLGFile::kEndLine, TalkMan, and Aurora::DLGFile::Line::text.
Referenced by checkPicked(), and Dialog().


|
private |
|
private |
The conversation file.
Definition at line 221 of file dialog.h.
Referenced by abort(), checkPicked(), Dialog(), getSpeaker(), hasEnded(), playAnimation(), playSound(), and updateBox().
|
private |
The actual dialog box.
Definition at line 219 of file dialog.h.
Referenced by checkPicked(), Dialog(), hide(), keyPressed(), mouseClick(), mouseMove(), notifyResized(), show(), and updateBox().
|
private |
The event queue.
Definition at line 223 of file dialog.h.
Referenced by addEvent(), and processEventQueue().
|
private |
|
private |
The conversation's NPC.
Definition at line 215 of file dialog.h.
Referenced by abort(), Dialog(), getSpeaker(), and playSound().
|
private |
1.8.14