Classes concerned with the screen and drawing things on it.
The skool font.
Parameters: |
|
---|
Define the location and width of a font character bitmap in the font image.
Parameters: |
|
---|
Return whether the skool font contains a bitmap for a given character.
Parameter: | char – The character to look for. |
---|
Return an image (a pygame.Surface) of a text message written in the skool font.
Parameters: |
|
---|
A container for all the images used in a game.
Parameters: |
|
---|
Return an image (a pygame.Surface) from the gallery, or None if there is no image in the gallery with the given ID. The image will be scaled up as necessary.
Parameter: | image_id – The ID of the image. |
---|
Represents the screen upon which everything is drawn.
Parameters: |
|
---|
Define the location and width of a font character bitmap in the font image.
Parameters: |
|
---|
Return whether a character is on-screen.
Parameters: |
|
---|
Draw everything on the screen.
Parameters: |
|
---|
Create a speech bubble displaying a portion of a message.
Parameters: |
|
---|---|
Returns: | A 2-tuple, (bubble, done}, where bubble is the speech bubble image (a pygame.Surface), and done is True if the entire message has been spoken, False otherwise. |
Return the direction in which the screen should be scrolled when Eric is at a given x-coordinate.
Parameter: | x – Eric’s x-coordinate. |
---|---|
Returns: | -1 if the screen should scroll right, 1 if it should scroll left, or 0 if it should not scroll. |
Return a pygame.Surface displaying some text in the skool font.
Parameters: |
|
---|
Return whether the skool font contains a bitmap for a given character.
Parameter: | char – The character to look for. |
---|
Set the leftmost column of the play area that will appear on the screen when the game starts.
Parameters: |
|
---|
Print the hi-score in the score box.
Parameter: | hiscore – The hi-score. |
---|
Print the inventory. If no inventory is defined, nothing happens.
Parameter: | item_images – A sequence of item images to draw in the inventory box. |
---|
Print some text in the lesson box.
Parameter: | text_lines – The lines of text to print. |
---|
Print the lines total in the score box.
Parameter: | lines – The lines total. |
---|
Print a lines message bubble.
Parameters: |
|
---|
Print the mouse inventory. If no mouse inventory is defined, nothing happens.
Parameters: |
|
---|
Print the score in the score box.
Parameter: | score – The score. |
---|
Scale up a pair of coordinates and return them.
Parameter: | coords – The coordinates. |
---|
Scroll the skool a number of columns across the screen.
Parameters: |
|
---|
Scroll the skool across the entire width of the screen from right to left.
Parameters: |
|
---|
Take a screenshot and save it to a file.
Parameter: | filename – The name of the file. |
---|