comparison gamelib/mainmenu.py @ 230:745a6ee5f643

large font for main menu
author Rizmari Versfeld <rizziepit@gmail.com>
date Sat, 12 May 2012 23:18:30 +0200
parents 64ec8ff87c6e
children 05afa7ae5df3
comparison
equal deleted inserted replaced
229:64ec8ff87c6e 230:745a6ee5f643
12 json = simplejson 12 json = simplejson
13 except ImportError: 13 except ImportError:
14 import json 14 import json
15 15
16 from gamelib import data 16 from gamelib import data
17 from gamelib.gui_base import Window 17 from gamelib.gui_base import Window, font_large
18 from gamelib.gui import BigButton 18 from gamelib.gui import BigButton
19 from gamelib.engine import AddWindow 19 from gamelib.engine import AddWindow
20 from gamelib.gamegui import LabWindow 20 from gamelib.gamegui import LabWindow
21 21
22 from gamelib.game_base import get_save_filename 22 from gamelib.game_base import get_save_filename
25 class MainMenuButton(BigButton): 25 class MainMenuButton(BigButton):
26 WIDTH = 276 26 WIDTH = 276
27 HEIGHT = 75 27 HEIGHT = 75
28 BG_IMAGE_NORMAL = image.load(data.filepath('images/main_normal.png')) 28 BG_IMAGE_NORMAL = image.load(data.filepath('images/main_normal.png'))
29 BG_IMAGE_DOWN = image.load(data.filepath('images/main_down.png')) 29 BG_IMAGE_DOWN = image.load(data.filepath('images/main_down.png'))
30
31 def __init__(self, pos, text):
32 super(MainMenuButton, self).__init__(pos, text, font_large)
30 33
31 34
32 class NewGameButton(MainMenuButton): 35 class NewGameButton(MainMenuButton):
33 36
34 def __init__(self, parent): 37 def __init__(self, parent):