pyzzle :: Text :: Text :: Class Text
[hide private]
[frames] | no frames]

Class Text

source code

          object --+    
                   |    
pygame.sprite.Sprite --+
                       |
                      Text

Presents text to the user

Instance Methods [hide private]
 
__init__(self, text, fontFile=None, fontSize=None, color=None, slide=None, rectRel=None, onClick=None, cursor=None)
Creates new Text
source code
 
_getRect(self)
The coordinates of the movie.
source code
 
setText(self, text) source code
 
_loadImage(self)
The image of text as presented to the user
source code
 
_getImage(self) source code
 
draw(self, screen)
Writes the text to the screen
source code
 
highlight(self)
Called when text is highlighted by the user.
source code
 
click(self, *param)
Called when user clicks on the text.
source code

Inherited from pygame.sprite.Sprite: __repr__, add, add_internal, alive, groups, kill, remove, remove_internal, update

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Class Variables [hide private]
  fontFileDefault = 'freesansbold.ttf'
  fontSizeDefault = 32
  colorDefault = 0, 0, 0
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, text, fontFile=None, fontSize=None, color=None, slide=None, rectRel=None, onClick=None, cursor=None)
(Constructor)

source code 

Creates new Text

Overrides: object.__init__

_getRect(self)

source code 

The coordinates of the movie. rect coordinates are determined by rectRel. If a coordinate in rectRel is None, the coordinate is determined by the slide's image size.

click(self, *param)

source code 

Called when user clicks on the text. Runs onClick() function