|
Methods defined here:
- __init__(self, size, res, bgdict, fullscreen=True, grid=0)
- center(self)
- Centers viewport on player.
- drawbg(self, *areas)
- drawbg([areas]) --> int
Draws the background over the given areas (rects).
Currently, only tiled mode is supported.
- drawgrid(self)
- drawsprites(self, spritedict)
- Draw all sprites in spritedict and in viewport to display surface.
- fixplace(self)
- Fixes the viewport if it's partially outside self.world.rect.
Returns true if the viewport was changed.
- screen2vp(self, obj)
- returns rect or 2-len-sequence adjusted to viewport
A rectangle or (x,y) coordinates who are relative to the topleft
of the entire screen, will be recalculated so that they are
relative to the topleft of the current viewport. This is
useful when drawing sprites (level->screen).
- scroll(self, (x, y))
- Scroll screen according to (x, y).
- vp2screen(self, obj)
- Reverse of screen2vp
A rectangle or (x,y) coordinates who are relative to the topleft
of the current viewport, will be recalculated so that they are
relative to the topleft of the entire screen. This is useful
when placing sprites (screen->level).
Properties defined here:
- bgmode
- Mode to draw bgimage to background.
- get = get(self)
- set = set(self, mode)
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Screen' objects>
- list of weak references to the object (if defined)
- allsprites = []
- modes = ['tiled']
- player = None
- scrolled = 'first'
|