From 9596250b3a3507539e1578881ec470f112cc5970 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 8 Sep 2016 21:05:01 +0200 Subject: [PATCH] Add reset tool button --- data/images/32/default_cursor.png | Bin 0 -> 689 bytes sources/bitmap/mouse_pointer_wolfram_es_01.png | Bin 0 -> 5620 bytes sources/bitmap/sources.txt | 6 ++++++ tabakrolletjie/scenes/day.py | 7 ++++++- 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 data/images/32/default_cursor.png create mode 100644 sources/bitmap/mouse_pointer_wolfram_es_01.png diff --git a/data/images/32/default_cursor.png b/data/images/32/default_cursor.png new file mode 100644 index 0000000000000000000000000000000000000000..3219c65d23d5850d091ce4471160808d56f63354 GIT binary patch literal 689 zcmV;i0#5yjP)kdg00002VoOIv0RM-N z%)bBt010qNS#tmY4c7nw4c7reD4Tcy000McNliru;0Xv50UMtx9ykC10zyedK~zY` zos>;T6k#03fA8$_P3}SBVY{q=TpcNBa+xi)#MBWgJVg)@ znbt`m#XXuSE&3MDvF_hePz6YuhWTSPllYi)6(O&yG;RttnQ?aEN4bn(2a!P?ou!}i z1Uxu^a;j8Q>A|(cs3+pVK~7IKLaS=@4A3G{nWm4^R2ClR|MWuo#Rpi-1gWBl6oU*c z3((Bt#{}+6mq7+i7Ffk`5(J9?e4?2)IjO*aG zdg$dd-|e+w=w%GWHZ^4tBFboCKsVh>d=X^%L3UPc?d=^hCbRNWDiS;%1ybivc&34=s40bm` zQCMq|dIY@G;o9%yx&-=gLp_7MF`=QMG~WQf;2%8M-n77={i%bNx)_XR@OnGuwj;m2 zZ+DL)yOJM#G<#YnIkfNZ#{T|JznwbB{0DAhjt5iSeuVjt6eE5OPW@XugKvypuS!}v zk2){jLtRB(Wx8n2m2HO}zBo{Qcb`W7)4RsSKBt{htBq6Z1`}hNSGANy`h3o4yT8AG z_-OI{vh!`}X2b1;6>WES>0_=%+p`pS0wszFgJ)p)MA;L(LVnAZWY0fs@%5`&z3H%1 zvv${VYS)&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(=ZRX!zFztQ!eB1-8;0d!C@gn`1Ae-^>a#KkXUW zlzOvyIJ=74mFc$Ec|?>;e0BdQL!7`qvsk}0WYA^T!0kF(Sm)W+Ri7k2JC>A4Jl=eI zGADa%GO#t=f8e^$bYW_NyCxx`$a-Ms^s-${VS|Onblb{`_XZ6SpU0=BbpuQ?r`=yr zpIj7g3QY=#XP@b-9ctF?X}7%NHI$5xy}v3UrTlZhdu*gCpXI%ke19xTr^yhEOy+90 zY{AeJpuZ>f6kFJCNvOK>hGB>HVeM*9F#}-g;*i%?GDC;|$vAN$da&P9`<7LcA%C#{ z;oy8RO6ag$jVhTzAKtP(uv30byJfSDjTzhwM z^%;-zjSycl4;YXvf9HCv?~%59<8Z9n=A}ytTkMl0BbnrEt#j|<-Ay$IRThSo8V?;! zYdMzWr^(#EJf-edUYX?5A*#iWf zqI$!b4zeul=D@e5^DA-D#}=&_W=4Yy1C5+F1e4H+VepqcUail@d&R(m&7W`O+M9Uz z`FJPTWax$W=WpEW-dor;>~1#ixX#rH7B^$_y=Nru*5a{SDwk|W4rk2n9MJyQoiy4P znOCr_=E*GC5Ec_7xjc_g1Y{vEJ~JH^Bnw#}Q01kx3c5uwEB<+DhILKA&^*)W#coBq zJlH#X*Ta!sjhw^`;51zTT|p-u5r1wo_J!SBa#_5-O`hM_N~{nGG3scum`~) zY}KVj8$KcC(I@I&shj?VEpX11UjBzmrD*!^zWcwk1sL+LYyUs`02ud`nt%DBe`m{o t<+86n^lxkdn*Sfh=Ks0lwUs5aPGqMvVI=v7!T-@>*4wk}Zmsp;{|EByQ)&PJ literal 0 HcmV?d00001 diff --git a/sources/bitmap/sources.txt b/sources/bitmap/sources.txt index 7cb1aa5..8ddf1ff 100644 --- a/sources/bitmap/sources.txt +++ b/sources/bitmap/sources.txt @@ -6,3 +6,9 @@ https://commons.wikimedia.org/wiki/File:Galets.jpg Shrub texture: https://commons.wikimedia.org/wiki/File:Gew%C3%B6hnlicher_Buchsbaum,_Buxus_sempervirens_.JPG + +Pointer image: data/images/32/default_cursor.png +Based on mouse_pointer_wolfram_es_01.png +(image cropped and shrunk to 32x32) +From OpenClipArt: http://www.openclipart.org +LICENSE: Public Domain diff --git a/tabakrolletjie/scenes/day.py b/tabakrolletjie/scenes/day.py index e3c5f72..8ac0ed1 100644 --- a/tabakrolletjie/scenes/day.py +++ b/tabakrolletjie/scenes/day.py @@ -24,6 +24,8 @@ class DayScene(BaseScene): self._tools = [ ImageButton('32', 'seed.png', name='seed', pos=(50, SCREEN_SIZE[1] - 40)), + ImageButton('32', 'default_cursor.png', name='reset tool', + pos=(SCREEN_SIZE[0] - 50, SCREEN_SIZE[1] - 40)), ] def exit(self, gamestate): @@ -53,7 +55,10 @@ class DayScene(BaseScene): for tool in self._tools: if tool.pressed(ev): print 'tool', tool.name - self._set_cursor(tool.name) + if tool.name == 'reset tool': + self._unset_cursor() + else: + self._set_cursor(tool.name) return # Not tool, so check lights self._lights.toggle_nearest(ev.pos, surfpos=True) -- 2.34.1