pygamelib.engine.Screen¶
-
class
pygamelib.engine.
Screen
(terminal=None)¶ The screen object is pretty straightforward: it is an object that allow manipulation of the screen. At the moment it relies heavily on the blessed module, but it wraps a lot of its methods and provide easy calls to actions.
Parameters: terminal ( Terminal
) – A Terminal reference.Example:
screen = Screen(terminal=Terminal()) screen.display_at('This is centered', int(screen.height/2), int(screen.width/2))
-
__init__
(terminal=None)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
([terminal])Initialize self. clear
()This methods clear the screen Attributes
height
This method wraps Terminal.height and return the height of the terminal window in number of characters. width
This method wraps Terminal.width and return the width of the terminal window in number of characters. -