Package pajammin :: Package display :: Module hud :: Class StatusBar
[show private | hide private]
[frames | no frames]

Type StatusBar

  object --+    
           |    
ScreenWidget --+
               |
              StatusBar


A status bar.
Method Summary
  __init__(self, x, y, style, percent, anchor)
  draw(self, screen, duration)
Draw this widget to the screen.
  get(self)
  set(self, percent)
    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.
    Inherited from ScreenWidget
bool hidden: If true, then the screen widget will not be drawn.

Class Variable Summary
dict BORDERS = {'redgreen': 2, 'loading': 2, 'greenblue': 2, ...
dict IMAGES = {'redgreen': 'hud/statusbar0.gif', 'loading': '...

Method Details

__init__(self, x, y, style='redgreen', percent=100, anchor='topleft')
(Constructor)

Overrides:
__builtin__.object.__init__

draw(self, screen, duration)

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.
Returns:
A pygame Rect indicating what area of the screen has been modified by this draw operation.
Overrides:
pajammin.display.engine.ScreenWidget.draw (inherited documentation)

get(self)

set(self, percent)


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:
100                                                                   

Class Variable Details

BORDERS

Type:
dict
Value:
{'redgreen': 2, 'loading': 2, 'greenblue': 2, 'poison': 1}             

IMAGES

Type:
dict
Value:
{'greenblue': 'hud/statusbar1.gif',
 'loading': 'hud/statusbar2.gif',
 'poison': 'hud/statusbar3.gif',
 'redgreen': 'hud/statusbar0.gif'}