From: Simon Cross Date: Sat, 10 Sep 2016 14:49:55 +0000 (+0200) Subject: Merge branch 'master' of ctpug.org.za:tabakrolletjie X-Git-Tag: tabakrolletjie-v1.0.0~91 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=b4d0997da0f17f5277c473a2d2ca708573181295;p=tabakrolletjie.git Merge branch 'master' of ctpug.org.za:tabakrolletjie --- b4d0997da0f17f5277c473a2d2ca708573181295 diff --cc tabakrolletjie/scenes/day.py index aff92a6,17690e2..0176754 --- a/tabakrolletjie/scenes/day.py +++ b/tabakrolletjie/scenes/day.py @@@ -18,7 -17,7 +18,7 @@@ from ..utils import debug_timer, shadow from ..loader import loader from ..transforms import Overlay, Alpha, ColourWedges --from ..constants import SCREEN_SIZE, FONTS ++from ..constants import SCREEN_SIZE, FONTS, DEBUG from ..widgets import ImageButton from ..turnip import Turnip, TurnipInvalidPosition @@@ -81,11 -79,9 +81,9 @@@ class DayScene(BaseScene) def create_tools(self, gamestate): tools = [] - x, y, step = 0, SCREEN_SIZE[1] - 40, 50 - tools.append(ImageButton( - '32', 'default_cursor.png', name='reset tool', pos=(x, y))) - x += step + x, y, step = 50, SCREEN_SIZE[1] - 40, 50 - ++ tools.append(ImageButton('32', 'seed.png', name='seed', pos=(x, y))) x += step @@@ -97,9 -93,11 +95,12 @@@ tools.append(tool) x += step + tools.append(ImageButton( + '32', 'default_cursor.png', name='reset tool', pos=(x, y))) + tools.append(ImageButton( - '32', 'night.png', name='start night', pos=(SCREEN_SIZE[0] - 100, y))) + '32', 'night.png', name='start night', + pos=(SCREEN_SIZE[0] - 100, y))) tools.append(ImageButton( '32', 'exit.png', name='exit', pos=(SCREEN_SIZE[0] - 50, y))) return tools @@@ -210,8 -203,9 +211,8 @@@ from .menu import MenuScene SceneChangeEvent.post(scene=MenuScene()) elif ev.key == pgl.K_e: - from .night import NightScene - SceneChangeEvent.post(scene=NightScene()) + self.end_day(gamestate) - elif ev.key == pgl.K_SPACE: + elif ev.key == pgl.K_SPACE and DEBUG: self._paused = not self._paused elif ev.type == pgl.MOUSEBUTTONDOWN: if ev.button == 1: