Public Member Functions |
| dialog (character_base *npc) |
| Default constructor.
|
| ~dialog () |
| Destructor.
|
bool | init (string fpath, string name, PyObject *args) |
| Load and instanciate the dialog object.
|
bool | reload (string fpath, string name, PyObject *args) |
| This method is similar to init.
|
void | run (u_int32 index) |
| Run the dialogue.
|
PyObject * | get_instance () |
| Returns the Python dialog instance.
|
u_int32 | npc_color () |
| Returns the color to be used for displaying the NPC's speech.
|
const string & | npc_portrait () |
| Returns the image to be displayed next to the NPC's speech.
|
const string & | npc_name () |
| Returns the name to be displayed under the NPC's portrait.
|
u_int32 | text_size () |
| Returns the number of text lines available at this point of the dialoge.
|
string | text () |
| Iterates over the dialogue's text.
|
The lowlevel dialog class.
It is the link between Python dialogue scripts and the dialogue GUI . As such it is responsible for loading dialogue scripts and for stepping through the dialogue according to the player's input and the current state of the game. After each step, the resulting dialogue text is available for display through the GUI.
Definition at line 44 of file dialog.h.
bool dialog::reload |
( |
string |
fpath, |
|
|
string |
name, |
|
|
PyObject * |
args |
|
) |
| |
This method is similar to init.
But unlike init, it will correctly handle dialogues that have changed on disk since they were first imported. This function can safely be called several times, although the dialogue will be reset each time.
- Parameters
-
fpath | full path to the dialogue. |
name | name of the dialogue class. |
args | arguments to pass to the dialogue class |
- Returns
- true in case of success, false otherwise.
- See Also
- init()
Definition at line 107 of file dialog.cc.