From 7505b6b20a0143d60e32cc415321f323d69372b2 Mon Sep 17 00:00:00 2001 From: adrianna Date: Sat, 10 Sep 2016 15:48:48 +0200 Subject: [PATCH] added exit button --- data/images/32/exit.png | Bin 0 -> 696 bytes data/images/Makefile | 2 +- sources/vector/exit.svg | 84 +++++++++++++++++++++++++++++++++++ tabakrolletjie/scenes/day.py | 8 +++- 4 files changed, 91 insertions(+), 3 deletions(-) create mode 100644 data/images/32/exit.png create mode 100644 sources/vector/exit.svg diff --git a/data/images/32/exit.png b/data/images/32/exit.png new file mode 100644 index 0000000000000000000000000000000000000000..fd81d056ee33f9ed28b182cbef3457f94b32cecb GIT binary patch literal 696 zcmV;p0!RIcP)8c`I5j~cQAiCc-V5=amwAi^LPf<;e7`2Kyf*`VESqh7Cr z=Xnr9Fq_S=Ua#e*_=9VX<975!_WL~@4u>?EOj4F*DS*3Y3gGH4sO%1ip;D<}u~=ZS zSkUYBFc=Juo>N~+z^RA{cxAKM-YY4<5C{Z5x!vw>TCLWggaA05&Zp&a`Askw{7MLs zvNulR;Sj3rcKb($VeTh%wOYNajWit`Irlc!4#^2W~q0000 + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/tabakrolletjie/scenes/day.py b/tabakrolletjie/scenes/day.py index 57eeedb..4c81130 100644 --- a/tabakrolletjie/scenes/day.py +++ b/tabakrolletjie/scenes/day.py @@ -76,9 +76,10 @@ class DayScene(BaseScene): tools.append(tool) x += step - # TODO: will also add back to menu button tools.append(ImageButton( - '32', 'night.png', name='start night', pos=(SCREEN_SIZE[0] - 50, 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 def exit(self, gamestate): @@ -187,6 +188,9 @@ class DayScene(BaseScene): elif tool.name == 'start night': from .night import NightScene SceneChangeEvent.post(scene=NightScene()) + elif tool.name == 'exit': + from .menu import MenuScene + SceneChangeEvent.post(scene=MenuScene()) else: self._tool = tool if self._tool.name == 'seed': -- 2.34.1