dialog_screen Class Reference

Allows the running of dialogues through a nice interface. More...

#include <dialog_screen.h>

Inheritance diagram for dialog_screen:

Inheritance graph
[legend]
Collaboration diagram for dialog_screen:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 dialog_screen (character_base *mynpc, char *dlg_file, u_int8 size=1)
 Constructor.
 ~dialog_screen ()
 Destructor.
void init (character_base *mynpc, char *dlg_file, u_int8 size=1)
 Inits the dialogue engine (similar to a constructor call).
void set_portrait (const string &new_portrait)
 Changes the displayed NPC portrait.
void set_name (const string &new_name)
 Changes the displayed NPC name.
void set_npc (const string &new_npc)
 Changes the whole NPC.
bool update ()
 React to (keyboard) input.
void run ()
 Execute one step of the dialogue.


Detailed Description

Allows the running of dialogues through a nice interface.

Definition at line 44 of file dialog_screen.h.


Constructor & Destructor Documentation

dialog_screen::dialog_screen ( character_base mynpc,
char *  dlg_file,
u_int8  size = 1 
)

Constructor.

Parameters:
mynpc npc the player is talking with.
dlg_file dialogue file to use.
size if 1, use a large window, else a small one.

Definition at line 39 of file dialog_screen.cc.

dialog_screen::~dialog_screen (  ) 

Destructor.

Definition at line 152 of file dialog_screen.cc.


Member Function Documentation

void dialog_screen::init ( character_base mynpc,
char *  dlg_file,
u_int8  size = 1 
)

Inits the dialogue engine (similar to a constructor call).

Parameters:
mynpc npc the player is talking with.
dlg_file dialogue file to use.
size if 1, use a large window, else a small one.

Definition at line 44 of file dialog_screen.cc.

void dialog_screen::set_portrait ( const string &  new_portrait  ) 

Changes the displayed NPC portrait.

Parameters:
new_portrait file name of the new portrait image to set.

Definition at line 241 of file dialog_screen.cc.

void dialog_screen::set_name ( const string &  new_name  ) 

Changes the displayed NPC name.

Parameters:
char* new name of the npc.

Definition at line 258 of file dialog_screen.cc.

void dialog_screen::set_npc ( const string &  new_npc  ) 

Changes the whole NPC.

Parameters:
char* the name of the new npc to use.

Definition at line 265 of file dialog_screen.cc.

bool dialog_screen::update (  )  [virtual]

React to (keyboard) input.

Returns:
true if the dialog is still running, false otherwise.

Reimplemented from win_base.

Definition at line 218 of file dialog_screen.cc.

void dialog_screen::run (  ) 

Execute one step of the dialogue.

Definition at line 162 of file dialog_screen.cc.


The documentation for this class was generated from the following files:

Generated on Wed Jun 18 16:52:00 2008 for Adonthell by  doxygen 1.5.6