Package populusgui :: Module PopulusGui :: Class ChatBox
[frames] | no frames]

Class ChatBox


This class create a chat box to let the player send messages to an intended recipient.

Instance Methods
 
__init__(self, player, command, pos=(0.85, 0, -0.85))
 
addNewLine(self, text='')
Add a new line of text in the output frame.
 
clearOutput(self)
Clear the output.
 
handleNewText(self, dirtyText)
Handle new text.
 
checkPlayerState(self, task)
Check the state of the player to see if he is in a conversation.
 
hide(self)
Hide the ChatBox gradually.
 
show(self)
Show the ChatBox gradually.
 
disable(self)
Disable the input-frame.
 
enable(self)
Enable the input-frame.
 
setPlayer(self, newPlayer)
Set the player.

Inherited from direct.showbase.DirectObject.DirectObject: accept, acceptOnce, addTask, classTree, detectLeaks, doMethodLater, getAllAccepting, ignore, ignoreAll, isAccepting, isIgnoring, removeAllTasks, removeTask

Method Details

__init__(self, player, command, pos=(0.85, 0, -0.85))
(Constructor)

 
Overrides: direct.showbase.DirectObject.DirectObject.__init__

addNewLine(self, text='')

 

Add a new line of text in the output frame. Use this method to visualize a received chat messages.