Mercurial > sypikslang
comparison gamelib/gui.py @ 68:7309392d9ca9
fixed widget drawing bugs
author | Rizmari Versfeld <rizziepit@gmail.com> |
---|---|
date | Tue, 08 May 2012 23:05:58 +0200 |
parents | 38f41d046c6f |
children | 22b65c943712 |
comparison
equal
deleted
inserted
replaced
67:06c8539df478 | 68:7309392d9ca9 |
---|---|
18 WIDTH = 128 | 18 WIDTH = 128 |
19 HEIGHT = 64 | 19 HEIGHT = 64 |
20 BG_IMAGE_NORMAL = image.load(data.filepath('images/button_normal.png')) | 20 BG_IMAGE_NORMAL = image.load(data.filepath('images/button_normal.png')) |
21 BG_IMAGE_DOWN = image.load(data.filepath('images/button_down.png')) | 21 BG_IMAGE_DOWN = image.load(data.filepath('images/button_down.png')) |
22 | 22 |
23 def __init__(self, pos, text, font=font_large, shadow=True): | 23 def __init__(self, pos, text, font=font_large, shadow=False): |
24 rect1 = (0, 0, self.WIDTH, self.HEIGHT) | 24 rect1 = (0, 0, self.WIDTH, self.HEIGHT) |
25 n = ImageDrawable(rect1, self.BG_IMAGE_NORMAL) | 25 n = ImageDrawable(rect1, self.BG_IMAGE_NORMAL) |
26 d = ImageDrawable(rect1, self.BG_IMAGE_DOWN) | 26 d = ImageDrawable(rect1, self.BG_IMAGE_DOWN) |
27 rect2 = (pos[0], pos[1], self.WIDTH, self.HEIGHT) | 27 rect2 = (pos[0], pos[1], self.WIDTH, self.HEIGHT) |
28 super(BigButton, self).__init__(rect2, n, d, text, font, shadow) | 28 super(BigButton, self).__init__(rect2, n, d, text, font, shadow) |