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

Type LevelMap

  object --+    
           |    
ScreenWidget --+
               |
              LevelMap



Method Summary
  __init__(self, x, y, level, anchor, max_width, max_height, border, alpha)
  draw(self, screen, duration)
Draw this widget to the screen.
  draw_border(self, surface)
  explore(self, rect)
  render(self)
  render_fog(self)
  render_map(self)
  resize(self, level)
Figure out the scale factor, dx, dy, and rect that are appropriate for this level.
  set_level(self, level)
  set_viewport(self, viewport)
  skycolor(self)
Return the average color of the top 1/10th of the current level's background image.
    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
  fog_image: The fog overlay image
bool hidden: If true, then the screen widget will not be drawn.
  layer: An integer indicating the order in which the widget should be drawn to the screen, relative to other widgets.
  map_image: The map image
  viewport_mask: Viewport overlay image.

Class Variable Summary
bool fog = True
tuple map_entities = (<class 'pajammin.entity.environ.Platform...

Method Details

__init__(self, x, y, level, anchor='topleft', max_width=400, max_height=300, border=(0, 255, 255), alpha=None)
(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)

draw_border(self, surface)

explore(self, rect)

render(self)

render_fog(self)

render_map(self)

resize(self, level)

Figure out the scale factor, dx, dy, and rect that are appropriate for this level.

set_level(self, level)

set_viewport(self, viewport)

skycolor(self)

Return the average color of the top 1/10th of the current level's background image.

Instance Variable Details

fog_image

The fog overlay image

hidden

If true, then the screen widget will not be drawn.
Type:
bool
Value:
False                                                                  

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                                                                   

map_image

The map image

[XX] fog locations should be recorded in the level, not here!

viewport_mask

Viewport overlay image.

Class Variable Details

fog

Type:
bool
Value:
True                                                                   

map_entities

Type:
tuple
Value:
(<class 'pajammin.entity.environ.Platform'>,
 <class 'pajammin.entity.environ.Wall'>,
 <class 'pajammin.entity.environ.Ground'>,
 <class 'pajammin.entity.environ.Decoration'>)