SpeechBox¶
The speech box shown to the player that displays the text of a conversation.
Constructor
SpeechBox (levelWindow[, x, y, w, h, text]) |
The speech box shown to the player that displays the text of a conversation. |
Methods
build ([hasNext]) |
Builds the SpeechBox. |
buildAndShow ([hasNext]) |
Actually builds and shows the SpeechBox. |
connectButtons (obj) |
Connects buttons within the SpeechBox. |
draw (levelWindow) |
Adds this object to the level. |
hide () |
Makes the SpeechBox invisible. |
onClick (o, e) |
Callback function for if someone clicks on the SpeechBox. |
show () |
Makes the SpeechBox visible. |
visible () |
Indicates whether the SpeechBox is currently visible. |
Details
-
class
SpeechBox
(levelWindow, x=50, y=50, w=600, h=100, text='')[source]¶ Bases:
object
Constructs a SpeechBox object.
Parameters: - levelWindow – The LevelWindow associated with this SpeechBox.
- x – The x coordinate of the SpeechBox.
- y – The y coordinate of the SpeechBox.
- w – The width of the SpeechBox.
- x – The height of the SpeechBox.
- text – The text to be shown in the SpeechBox.
Methods
-
build
(hasNext=False)[source]¶ Builds the SpeechBox.
Parameters: hasNext – If True, the SpeechBox will have a ‘more dialog is available’ marker.
-
buildAndShow
(hasNext=False)[source]¶ Actually builds and shows the SpeechBox.
Parameters: hasNext – If True, the SpeechBox will have a ‘more dialog is available’ marker.
-
connectButtons
(obj)[source]¶ Connects buttons within the SpeechBox.
Parameters: obj – The button to connect.
-
draw
(levelWindow)[source]¶ Adds this object to the level.
Important: requires a LevelWindow object, not a Calico Window object.
Parameters: levelWindow – A LevelWindow object.