From 149979a669c18ca17fd646e900208ccba4b7dbb7 Mon Sep 17 00:00:00 2001 From: adrianna Date: Sat, 10 Sep 2016 15:57:21 +0200 Subject: [PATCH] made pause/play buttons for night time --- data/images/32/pause.png | Bin 0 -> 817 bytes data/images/32/play.png | Bin 0 -> 822 bytes data/images/Makefile | 2 +- sources/vector/pause.svg | 86 ++++++++++++++++++++++++++++++++++++++ sources/vector/play.svg | 77 ++++++++++++++++++++++++++++++++++ tabakrolletjie/widgets.py | 3 ++ 6 files changed, 167 insertions(+), 1 deletion(-) create mode 100644 data/images/32/pause.png create mode 100644 data/images/32/play.png create mode 100644 sources/vector/pause.svg create mode 100644 sources/vector/play.svg diff --git a/data/images/32/pause.png b/data/images/32/pause.png new file mode 100644 index 0000000000000000000000000000000000000000..4ed574182ccbf45f46b9d26c9713e2373c674fae GIT binary patch literal 817 zcmV-11J3-3P))%x_d1=<#rgU9y6d`Uxw@2PxrGoq z#u)oy7?L!?FeE!WJ3d0_SeE4vd1y1Ls&4M>?K!EcDeUgy~h~);}%CzL@JdE5k--RqDT-z z$s9r`8Lw0-B<<{&rs)ZSur#Vkk6zU4_0P>_lO1P{5CZ*vAG+Nxbh}-M<2ad%<2V`b z_xnHy85>}$)hag{jZditYPFigFw?!ZPk~_=s8*|QQw{JuFU(AR0LO8BngOa&dcjv)Kp!YK1d7e9K1D@yI3-X?UPN#Db zhT+V_qbP#Q%gdjs1}w|^a(H++b{i;)fj`RNr|6^rk<@>}mNs^>ujDP1XzO}XGD2mdYXaE3Ud3kxmw(Z=?aj(~l zRaO1=B=G^cH6&pe4jYm;SqvmC*>f_{>-FMxyL~cEOO|9p)3gnYaptDfG|fMQv_HSP zDT>lG4CBZ&O)m(7RM8*^$oBTOXBfuO!oq^~lxJu9F%bk|snKYxRjbuH$8lV-SQG#N vf*^1l$MLSNu6|jTweC31k7)vZon`?5Zf|d`@px?a`~9mT9TyW)6-KkP&I&7t7XZud;|b=Eagllv#2P_ z<@NQo7gcJ`o`;GrEG(=cgvQUk?7A)~6bfX2f1kwN z8@jIB9LKE&8mLq%--5n#j4@eSS|Suhkz%n(c6WD)<2aEFV2nwnQu*rFr2G&0e4eN2 z@XhLZ9`t%WI5;?fa=8rkdL1yvQ~cLz~V#z|BIQ6Ypp(s<_|yScfsqXwiX3Isub&CN}y*XuAp zKOZ{(?(WV8U!r~kVB5C!zl41nkCJ?3px^IbVT?b81&b>T0N}bV3&MhG@jNdfg#IKgesXeRilVqa(^^%l)g!|& z61$E^qmd^`()XFf?@6p7!5B{(lJ`*zJhWslsl;eB@@lo(MVyxGp%StzA0dPyH>J9+ z|Gh7Jyr$HTD2nT AT>t<8 literal 0 HcmV?d00001 diff --git a/data/images/Makefile b/data/images/Makefile index 7319c75..17b0bef 100644 --- a/data/images/Makefile +++ b/data/images/Makefile @@ -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 exit +CONTROLS=night default_cursor exit pause play IMG16=$(MOULD_BODY) IMG32=$(MOULD_BODY) $(MOULD) $(LIGHT) $(SEED) $(LIGHT_MASK) $(CONTROLS) diff --git a/sources/vector/pause.svg b/sources/vector/pause.svg new file mode 100644 index 0000000..3a3361d --- /dev/null +++ b/sources/vector/pause.svg @@ -0,0 +1,86 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/sources/vector/play.svg b/sources/vector/play.svg new file mode 100644 index 0000000..4634dba --- /dev/null +++ b/sources/vector/play.svg @@ -0,0 +1,77 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/tabakrolletjie/widgets.py b/tabakrolletjie/widgets.py index 8ca16e3..51c449f 100644 --- a/tabakrolletjie/widgets.py +++ b/tabakrolletjie/widgets.py @@ -73,5 +73,8 @@ class ImageButton(Button): super(ImageButton, self).__init__(self._img.get_size(), name, pos, padding) + def update_image(self, *imgparts, transform=NullTransform()): + self._img = loader.load_image(*imgparts, transform=transform) + def render(self, surface): surface.blit(self._img, self._pos, None) -- 2.34.1