Mercurial > sypikslang
view gamelib/gamegui.py @ 54:168cfac9a445
Power and reliability.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Mon, 07 May 2012 22:43:54 +0200 |
parents | 655a6912e0ae |
children | 78dfd429b9a6 |
line wrap: on
line source
# -*- coding: utf-8 -*- # vim:fileencoding=utf-8 ai ts=4 sts=4 et sw=4 """Gui for the actual game""" from gamelib.gui_base import Window from gamelib.gui import BigButton from gamelib.engine import PopWindow from gamelib.constants import WIDTH class ExitGameButton(BigButton): def __init__(self): super(ExitGameButton, self).__init__(((WIDTH - 128), 10), 'Exit') def on_click(self): PopWindow.post() class GameWindow(Window): """Main window for the game""" def __init__(self, screen): super(GameWindow, self).__init__(screen) exit = ExitGameButton() self.add_child(exit)