Package parpg :: Package gui :: Module dialoguegui :: Class DialogueGUI
[hide private]
[frames] | no frames]

Class DialogueGUI

source code

object --+
         |
        DialogueGUI

Window that handles the dialogues.

Instance Methods [hide private]
 
__init__(self, controller, npc, quest_engine, player_character)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
initiateDialogue(self)
Callback for starting a quest
source code
 
setDialogueText(self, text)
Set the displayed dialogue text.
source code
 
continueDialogue(self)
Display the dialogue text and responses for the current DialogueSection.
source code
 
handleEntered(self, *args)
Callback for when user hovers over response label.
source code
 
handleExited(self, *args)
Callback for when user hovers out of response label.
source code
 
handleClicked(self, *args)
Handle a response being clicked.
source code
 
handleEnd(self)
Handle the end of the conversation being reached, either from the GUI or from within the conversation itself.
source code
 
setNpcName(self, name)
Set the NPC name to display on the dialogue GUI.
source code
 
setAvatarImage(self, image_path)
Set the NPC avatar image to display on the dialogue GUI
source code
 
setResponses(self, dialogue_responses)
Creates the list of clickable response labels and sets their respective on-click callbacks.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  _logger = logging.getLogger('dialoguegui.DialogueGUI')
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, controller, npc, quest_engine, player_character)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

setDialogueText(self, text)

source code 

Set the displayed dialogue text.

Parameters:
  • text - text to display.

setNpcName(self, name)

source code 

Set the NPC name to display on the dialogue GUI.

Parameters:
  • name (basestring) - name of the NPC to set

setAvatarImage(self, image_path)

source code 

Set the NPC avatar image to display on the dialogue GUI

Parameters:
  • image_path (basestring) - filepath to the avatar image

setResponses(self, dialogue_responses)

source code 

Creates the list of clickable response labels and sets their respective on-click callbacks.

Parameters:
  • responses (list of DialogueResponses) - list of DialogueResponses from the DialogueProcessor