added exit button
authoradrianna <adrianna.pinska@gmail.com>
Sat, 10 Sep 2016 13:48:48 +0000 (15:48 +0200)
committeradrianna <adrianna.pinska@gmail.com>
Sat, 10 Sep 2016 13:48:58 +0000 (15:48 +0200)
data/images/32/exit.png [new file with mode: 0644]
data/images/Makefile
sources/vector/exit.svg [new file with mode: 0644]
tabakrolletjie/scenes/day.py

diff --git a/data/images/32/exit.png b/data/images/32/exit.png
new file mode 100644 (file)
index 0000000..fd81d05
Binary files /dev/null and b/data/images/32/exit.png differ
index b72c05081a9e6b2e2f32eca2dcbc14f777f7a4a2..7319c759242b6d559a732075a1176e3d57588673 100644 (file)
@@ -6,7 +6,7 @@ MOULD_BODY=mouldA mouldB mouldC
 MOULD=eyeballA eyeballB eyeballC
 LIGHT=spotlight lamp laser
 LIGHT_MASK=light_mask_2_1 light_mask_2_2 light_mask_3_1 light_mask_3_2 light_mask_3_3
-CONTROLS=night default_cursor
+CONTROLS=night default_cursor exit
 
 IMG16=$(MOULD_BODY)
 IMG32=$(MOULD_BODY) $(MOULD) $(LIGHT) $(SEED) $(LIGHT_MASK) $(CONTROLS)
diff --git a/sources/vector/exit.svg b/sources/vector/exit.svg
new file mode 100644 (file)
index 0000000..7f09eeb
--- /dev/null
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="100mm"
+   height="100mm"
+   viewBox="0 0 354.33071 354.33071"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   sodipodi:docname="exit.svg">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1.4"
+     inkscape:cx="115.01124"
+     inkscape:cy="168.74492"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:window-width="1264"
+     inkscape:window-height="720"
+     inkscape:window-x="102"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     inkscape:object-nodes="true"
+     inkscape:snap-smooth-nodes="true">
+    <inkscape:grid
+       type="xygrid"
+       id="grid4423"
+       units="mm"
+       spacingx="3.543307"
+       spacingy="3.543307" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-698.0315)">
+    <rect
+       style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect4149"
+       width="194.8819"
+       height="283.46457"
+       x="124.01575"
+       y="733.4646" />
+    <path
+       style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       d="m 124.01575,733.46457 159.44882,35.43307 0,212.59843 -159.44882,35.43303 z"
+       id="rect4151"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
+       d="m 35.433071,839.76378 53.149606,0 0,-35.43307 106.299213,70.86614 -106.299213,70.86615 0,-35.43307 -53.149606,0 z"
+       id="path4154"
+       inkscape:connector-curvature="0" />
+  </g>
+</svg>
index 57eeedb51f3d440e0af7a40da7841a3c590d205b..4c81130c9e7e77104ad24ce84a92dc35547dfb0e 100644 (file)
@@ -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':