Mercurial > pyntnclick
diff gamelib/hand.py @ 57:4f9d412d83db
Use hand icon from openclipart
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Mon, 23 Aug 2010 14:01:00 +0200 |
parents | 8771d545a493 |
children | 213e47dea4d0 |
line wrap: on
line diff
--- a/gamelib/hand.py Mon Aug 23 13:39:12 2010 +0200 +++ b/gamelib/hand.py Mon Aug 23 14:01:00 2010 +0200 @@ -1,9 +1,12 @@ # Button for the hand image +from constants import BUTTON_SIZE + from albow.controls import ImageButton from albow.resource import get_image from albow.utils import frame_rect from pygame.color import Color +from pygame.rect import Rect class HandButton(ImageButton): """The fancy hand button for the widget""" @@ -13,9 +16,10 @@ def __init__(self, action): # FIXME: Yes, please. - this_image = get_image('items', 'square.png') + this_image = get_image('items', 'hand.png') ImageButton.__init__(self, image=this_image, action=action) self.selected = False # Flag if we're selected + self.set_rect(Rect(0, 0, BUTTON_SIZE, BUTTON_SIZE)) def draw(self, surface): """Draw the widget"""