Package pajammin :: Package entity :: Package agent :: Module agent :: Class SpeechBubble
[show private | hide private]
[frames | no frames]

Type SpeechBubble

 object --+    
          |    
WorldWidget --+
              |
             SpeechBubble


Method Summary
  __init__(self, agent, text, size)
  __getstate__(self)
  __setstate__(self, state)
  draw(self, screen, duration, dx, dy)
Draw this widget to the screen.
  init_circle(self)
  move(self, dx, dy)
  render(self, agent, text, size)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
Return hash(x)...
  __new__(T, S, ...)
Return a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
Return repr(x)...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
Return str(x)...

Instance Variable Summary
  layer: An integer indicating the order in which the widget should be drawn to the screen, relative to other widgets.
  movement_callback: A callback method that should be called whenever the sprite is moved.
    Inherited from WorldWidget
NoneType rect: A pygame Rect describing the extent of this widget, in world coordinates.

Class Variable Summary
NoneType circle = None                                                                  
tuple colorkey = (255, 0, 0)
dict font_size = {'small': 14, 'big': 28, 'medium': 18}
tuple margin = (6, 2)

Method Details

__init__(self, agent, text, size='big')
(Constructor)

Overrides:
__builtin__.object.__init__

__getstate__(self)

__setstate__(self, state)

draw(self, screen, duration, dx, dy)

Draw this widget to the screen.
Parameters:
screen - The screen surface.
duration - The amount of time that has elapsed since the last call to draw, in msec.
dx, dy - An offset that should be added to world coordinates to give screen coordinates.
Returns:
A pygame Rect indicating what area of the screen has been modified by this draw operation.
Overrides:
pajammin.display.engine.WorldWidget.draw (inherited documentation)

init_circle(self)

move(self, dx, dy)

render(self, agent, text, size)


Instance Variable Details

layer

An integer indicating the order in which the widget should be drawn to the screen, relative to other widgets. Widgets with higher layer numbers will be drawn later.
Value:
150                                                                   

movement_callback

A callback method that should be called whenever the sprite is moved. This is used by the graphics engine to update its grids.
Value:
None                                                                  

Class Variable Details

circle

Type:
NoneType
Value:
None                                                                  

colorkey

Type:
tuple
Value:
(255, 0, 0)                                                            

font_size

Type:
dict
Value:
{'small': 14, 'big': 28, 'medium': 18}                                 

margin

Type:
tuple
Value:
(6, 2)