Home | Trees | Index | Help |
---|
Package pygsear :: Module Widget :: Class TextInput |
|
TextButton
--+ |Widget
--+ | | |Button
--+ | | |object
--+ | | | | |Sprite
--+ | | | | |Drawable
--+ | | |SpriteButton
--+ |SpriteTextButton
--+ | TextInput
Method Summary | |
---|---|
Initialize the TextInput widget. | |
a new object with type S, a subtype of T |
|
__repr__(self)
(inherited from Sprite )
| |
activate(self)
| |
add(group) add a sprite to container (inherited from Sprite )
| |
add_internal(self,
group)
(inherited from Sprite )
| |
Process the next keypress. | |
alive() -> bool ask the life of a sprite (inherited from Sprite )
| |
arm(self)
(inherited from Button )
| |
bool |
Performs a los (line of sight) check from the center of the source to the center of the target. (inherited from Drawable )
|
Align the Drawable in its layer (inherited from Drawable )
| |
Erase sprite to background (inherited from Drawable )
| |
clicked(self,
pygameEvent)
| |
bool
|
return True if this sprite and other sprite overlap. (inherited from Drawable )
|
Drawable or False
|
return True if this sprite and any in list of others collide. (inherited from Drawable )
|
List
|
return True if this sprite and any in list of others collide. (inherited from Drawable )
|
cursor_left(self)
| |
cursor_right(self)
| |
deactivate(self)
| |
return the direction from the sprite to a point (inherited from Drawable )
| |
return the distance from the sprite to a point (inherited from Drawable )
| |
return the text_content. | |
Blit image to layer (inherited from Drawable )
| |
fire(self,
pygameEvent)
| |
return a copy of the sprite's position (inherited from Drawable )
| |
return size of sprite's rect. (inherited from Drawable )
| |
groups() -> list list used sprite containers (inherited from Sprite )
| |
kill() end life of sprite, remove from all groups (inherited from Sprite )
| |
makeButton(self)
| |
modal(self)
| |
set position to next position on path (inherited from Drawable )
| |
nop(self,
arg)
(inherited from Widget )
| |
Move sprite. (inherited from Drawable )
| |
return True if image is on the screen or layer. (inherited from Drawable )
| |
stop moving along Path (inherited from Drawable )
| |
released(self,
pygameEvent)
| |
remove(group) remove a sprite from container (inherited from Sprite )
| |
remove_internal(self,
group)
(inherited from Sprite )
| |
call move() continuously (inherited from Drawable )
| |
set_callback(self,
callback)
(inherited from Widget )
| |
set the collision pygame.Rect used for collision
checking. (inherited from Drawable )
| |
set which path to follow (inherited from Drawable )
| |
Move sprite to location. (inherited from Drawable )
| |
Move sprite to a random location on screen (inherited from Drawable )
| |
Set size of sprite's rect. (inherited from Drawable )
| |
Save a copy of the content of the text field and update. | |
move sprite so that it does not overlap with other sprite (inherited from Drawable )
| |
clear sprite and update display (inherited from Drawable )
| |
Draw image and update display. (inherited from Drawable )
| |
start moving along Path (inherited from Drawable )
| |
update(self,
*args)
(inherited from Sprite )
| |
updateButton(self)
| |
_quit(self,
pygame_event)
(inherited from Widget )
| |
Move sprite to location. (inherited from Drawable )
| |
_stop(self,
pygame_event)
(inherited from Widget )
|
Method Details |
---|
__init__(self,
window=None,
text='',
prompt='',
maxLength=10,
length=150,
callback=None,
size=22,
color=(255, 255, 255),
border=1,
borderColor=(125, 255, 125),
padding=5,
bgColor=(0, 0, 0),
inactiveColor=(195, 195, 195),
inactiveBgColor=(95, 95, 95),
group=None)
Initialize the TextInput widget.
|
__new__(S, ...)
|
addLetter(self, pygameEvent)Process the next keypress.
|
done(self, pygame_event=None)return the text_content. If this is triggered from one of the widget's own events (ie K_RETURN), it only returns the contents if the widget is active. Otherwise, if it was called from outside (pygame_event is None) it returns the content no matter what it's state was (active or inactive). This allows another button to call in to the TextInput and force it to trigger its callback.
|
set_text(self, text)Save a copy of the content of the text field and update. Since the actual field is padded with spaces when it is rendered, it is necessary to save a copy of the actual contents before going to render. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 1.1 on Sun Nov 30 19:33:15 2003 | http://epydoc.sf.net |