Mercurial > pyntnclick
diff gamelib/hand.py @ 144:29ba5456e8b3
Removed a bunch of cruft.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Tue, 24 Aug 2010 22:57:09 +0200 |
parents | 97322b78d1c1 |
children | ef4da30f0f38 |
line wrap: on
line diff
--- a/gamelib/hand.py Tue Aug 24 22:49:14 2010 +0200 +++ b/gamelib/hand.py Tue Aug 24 22:57:09 2010 +0200 @@ -12,26 +12,9 @@ class HandButton(ImageButton): """The fancy hand button for the widget""" - sel_colour = Color('red') - sel_width = 2 - def __init__(self, action): # FIXME: Yes, please. 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""" - ImageButton.draw(self, surface) - if self.selected: - rect = surface.get_rect().inflate(-self.sel_width, -self.sel_width) - frame_rect(surface, self.sel_colour, rect, self.sel_width) - - def toggle_selected(self): - self.selected = not self.selected - - def unselect(self): - self.selected = False -