From: adrianna Date: Sat, 10 Sep 2016 13:57:21 +0000 (+0200) Subject: made pause/play buttons for night time X-Git-Tag: tabakrolletjie-v1.0.0~97^2~3 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=149979a669c18ca17fd646e900208ccba4b7dbb7;p=tabakrolletjie.git made pause/play buttons for night time --- diff --git a/data/images/32/pause.png b/data/images/32/pause.png new file mode 100644 index 0000000..4ed5741 Binary files /dev/null and b/data/images/32/pause.png differ diff --git a/data/images/32/play.png b/data/images/32/play.png new file mode 100644 index 0000000..5acc03d Binary files /dev/null and b/data/images/32/play.png differ 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)