Changeset 29:58505d3482b6


Ignore:
Timestamp:
Sep 1, 2013, 2:09:16 PM (7 years ago)
Author:
Stefano Rivera <stefano@…>
Branch:
default
Message:

Text on the menu screen

Files:
5 added
2 edited

Legend:

Unmodified
Added
Removed
  • nagslang/constants.py

    r16 r29  
    11SCREEN = (800, 600)
    22FPS = 40
     3FONT = 'DejaVuSans.ttf'
     4FONT_SIZE = 16
     5
    36DEFAULTS = dict(
    47    debug=False,
  • nagslang/screens/menu.py

    r21 r29  
    55from nagslang.screens.base import Screen
    66from nagslang.events import QuitEvent, ScreenChange
     7from nagslang.widgets.text import TextWidget
    78
    89
     
    1718
    1819    def render(self, surface):
    19         surface.fill(pygame.color.Color(0, 0, 0))
    20         color = pygame.color.Color(255, 0, 0)
    21         rect = pygame.rect.Rect(10, 10, 200, 200)
    22         surface.fill(color, rect)
     20        surface.fill(pygame.color.Color(255, 255, 255))
     21        TextWidget((10, 10), 'Menu').draw(surface)
     22        TextWidget((10, 30), 'Press 1 to start').draw(surface)
Note: See TracChangeset for help on using the changeset viewer.