Mercurial > sypikslang
changeset 125:c224057befff
put 'End Turn' & 'Next Turn' buttons in the same place. Move 'Exit' button away from the action
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Thu, 10 May 2012 12:19:29 +0200 |
parents | 685301e35f88 |
children | 0f205b1384db |
files | gamelib/gamegui.py |
diffstat | 1 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/gamegui.py Thu May 10 12:16:15 2012 +0200 +++ b/gamelib/gamegui.py Thu May 10 12:19:29 2012 +0200 @@ -17,7 +17,7 @@ font_medium, font_large) from gamelib.gui import BigButton, ImageDrawable from gamelib.engine import PopWindow, AddWindow, GameOver -from gamelib.constants import (WIDTH, FAILURE, SUCCESS, NEW_SCIENCE, +from gamelib.constants import (WIDTH, HEIGHT, FAILURE, SUCCESS, NEW_SCIENCE, NEW_SCHEMATIC, GAME_WIN) from gamelib.gamestate import Game @@ -36,8 +36,8 @@ class PopWindowButton(BigButton): - def __init__(self, text): - super(PopWindowButton, self).__init__(((WIDTH - 128), 10), text) + def __init__(self, pos, text): + super(PopWindowButton, self).__init__(pos, text) def on_click(self): PopWindow.post() @@ -45,13 +45,14 @@ class ExitGameButton(PopWindowButton): def __init__(self): - super(ExitGameButton, self).__init__('Exit') + super(ExitGameButton, self).__init__((WIDTH - 128, HEIGHT - 60), + 'Exit') class EndTurnButton(BigButton): def __init__(self, parent): - super(EndTurnButton, self).__init__(((WIDTH - 256), 10), 'End Turn') + super(EndTurnButton, self).__init__(((WIDTH - 128), 10), 'End Turn') self.parent = parent def on_click(self): @@ -60,7 +61,7 @@ class NextTurnButton(PopWindowButton): def __init__(self): - super(NextTurnButton, self).__init__('Next Turn') + super(NextTurnButton, self).__init__(((WIDTH - 128), 10), 'Next Turn') class ResetButton(BigButton):