changeset 459:e9393970b5f6

picture icons for all counters
author Adrianna Pińska <adrianna.pinska@gmail.com>
date Mon, 23 Nov 2009 20:12:03 +0000
parents 7e4ea53d8b10
children 7204c16ab64d
files data/icons/sun.png data/icons/sun.svg gamelib/icons.py gamelib/toolbar.py
diffstat 4 files changed, 182 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
Binary file data/icons/sun.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/icons/sun.svg	Mon Nov 23 20:12:03 2009 +0000
@@ -0,0 +1,177 @@
+<?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:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="525"
+   height="525"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.46"
+   version="1.0"
+   sodipodi:docname="sun.svg"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient4262">
+      <stop
+         style="stop-color:#51ff00;stop-opacity:1;"
+         offset="0"
+         id="stop4264" />
+      <stop
+         style="stop-color:#267900;stop-opacity:1;"
+         offset="1"
+         id="stop4266" />
+    </linearGradient>
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+    <inkscape:perspective
+       id="perspective2447"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3125"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3201"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3277"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3345"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3433"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4262"
+       id="radialGradient4287"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.9908856,0,0.7541151)"
+       cx="275.55112"
+       cy="82.739212"
+       fx="275.55112"
+       fy="82.739212"
+       r="81.053001" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1.0152381"
+     inkscape:cx="152.67355"
+     inkscape:cy="262.5"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1280"
+     inkscape:window-height="735"
+     inkscape:window-x="1280"
+     inkscape:window-y="24" />
+  <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" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-169.70945,-261.08105)">
+    <g
+       id="g3169"
+       transform="matrix(0.9672833,0,0,0.9618305,117.15143,257.49266)">
+      <path
+         transform="translate(90.702379,-190.20747)"
+         d="M 498.57142,588.07646 L 358.9875,518.41427 L 309.5072,737.81523 L 276.94214,585.25046 L 74.557094,683.35946 L 173.53305,562.77649 L -29.356666,465.71546 L 126.62939,467.91573 L 76.015096,248.7736 L 171.55057,372.10025 L 311.32529,195.89552 L 274.47003,347.48108 L 499.38055,346.8995 L 357.88731,412.59694 L 498.57142,588.07646 z"
+         inkscape:randomized="0"
+         inkscape:rounded="0"
+         inkscape:flatsided="false"
+         sodipodi:arg2="0.43840224"
+         sodipodi:arg1="0.45215386"
+         sodipodi:r2="121.94862"
+         sodipodi:r1="277.92966"
+         sodipodi:cy="466.64789"
+         sodipodi:cx="248.57143"
+         sodipodi:sides="7"
+         id="path2383"
+         style="opacity:1;fill:#ffff00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         sodipodi:type="star" />
+      <path
+         transform="translate(88.050434,-189.53659)"
+         d="M 475.71428,423.79074 L 368.08341,442.39193 L 423.69974,617.51433 L 342.05001,544.96278 L 239.81001,697.6324 L 245.62532,588.56092 L 62.517809,603.81443 L 151.41911,540.35606 L 25.327772,406.70725 L 130.37058,436.64745 L 156.24476,254.7366 L 198.32969,355.52977 L 356.68561,262.33946 L 304.12186,358.08631 L 475.71428,423.79074 z"
+         inkscape:randomized="0"
+         inkscape:rounded="0"
+         inkscape:flatsided="false"
+         sodipodi:arg2="-0.20023854"
+         sodipodi:arg1="-0.18648692"
+         sodipodi:r2="121.94862"
+         sodipodi:r1="231.15062"
+         sodipodi:cy="466.64789"
+         sodipodi:cx="248.57143"
+         sodipodi:sides="7"
+         id="path3167"
+         style="opacity:1;fill:#ffff00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         sodipodi:type="star" />
+      <path
+         transform="matrix(1.2046784,0,0,1.2046784,-121.4954,-644.62718)"
+         d="M 502.85715,765.93359 A 122.14286,122.14286 0 1 1 258.57143,765.93359 A 122.14286,122.14286 0 1 1 502.85715,765.93359 z"
+         sodipodi:ry="122.14286"
+         sodipodi:rx="122.14286"
+         sodipodi:cy="765.93359"
+         sodipodi:cx="380.71429"
+         id="path2395"
+         style="opacity:1;fill:#ffcd00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+         sodipodi:type="arc" />
+    </g>
+  </g>
+</svg>
--- a/gamelib/icons.py	Mon Nov 23 16:15:37 2009 +0000
+++ b/gamelib/icons.py	Mon Nov 23 20:12:03 2009 +0000
@@ -10,6 +10,7 @@
 WOOD_ICON = Image(imagecache.load_image('icons/wood.png'))
 GROATS_ICON = Image(imagecache.load_image('icons/groats.png'))
 EMPTY_NEST_ICON = Image(imagecache.load_image('sprites/nest.png'))
+DAY_ICON = Image(imagecache.load_image('icons/sun.png'))
 
 def animal_icon(animal):
     return Image(animal.image_left)
--- a/gamelib/toolbar.py	Mon Nov 23 16:15:37 2009 +0000
+++ b/gamelib/toolbar.py	Mon Nov 23 20:12:03 2009 +0000
@@ -66,10 +66,10 @@
         self.tr()
         self.td(gui.Spacer(self.rect.w/2, 0))
         self.td(gui.Spacer(self.rect.w/2, 0))
-        self.add_counter(mklabel("Day:"), self.day_counter)
-        self.add_counter(mklabel("Groats:"), self.cash_counter)
-        self.add_counter(mklabel("Planks:"), self.wood_counter)
-        self.add_counter(mklabel("Eggs:"), self.egg_counter)
+        self.add_counter(icons.DAY_ICON, self.day_counter)
+        self.add_counter(icons.GROATS_ICON, self.cash_counter)
+        self.add_counter(icons.WOOD_ICON, self.wood_counter)
+        self.add_counter(icons.EGG_ICON, self.egg_counter)
         self.add_counter(icons.CHKN_ICON, self.chicken_counter)
         self.add_counter(icons.KILLED_FOX, self.killed_foxes)
         self.add_spacer(5)