Changeset 124:69fd96eafde8


Ignore:
Timestamp:
Sep 2, 2009, 9:14:05 PM (11 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
Convert:
svn:b4e93282-eac8-4b8b-b765-0f5d36de2b68@125
Message:

Display splash screen and replace window title.

Location:
gamelib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • gamelib/gameboard.py

    r122 r124  
    160160
    161161    def paint(self, screen):
     162        screen.fill(constants.BG_COLOR)
    162163        self.disp.paint(screen)
    163164
  • gamelib/main.py

    r90 r124  
    1111from pygame.locals import SWSURFACE
    1212
    13 from mainmenu import MainMenu
     13from mainmenu import MenuContainer, MainMenu
    1414from engine import Engine, MainMenuState
    1515from sound import init_sound
     
    2121    main_menu = MainMenu()
    2222
    23     c = gui.Container(align=0, valign=0)
     23    c = MenuContainer(align=0, valign=0)
    2424    c.add(main_menu, 0, 0)
    2525
  • gamelib/mainmenu.py

    r11 r124  
    55import constants
    66import engine
     7import imagecache
     8
     9class MenuContainer(gui.Container):
     10    def paint(self, s):
     11        pygame.display.set_caption(constants.NAME)
     12        splash = imagecache.load_image("images/splash.png")
     13        pygame.display.get_surface().blit(splash, (0, 0))
     14        gui.Container.paint(self, s)
    715
    816class MainMenu(gui.Table):
     
    3745
    3846        self.tr()
    39         self.td(gui.Label(constants.NAME, color=constants.FG_COLOR), **td_kwargs)
    40 
    41         self.tr()
    4247        self.td(start_button, **td_kwargs)
    4348
Note: See TracChangeset for help on using the changeset viewer.