# HG changeset patch # User Simon Cross # Date 1282552553 -7200 # Node ID 79062a225703f83a163dd15cbca15797367218c1 # Parent 7517a3cc06e7ce2cc7b77b480a68a4f4fee57128 Correct out-by-one indentation error. :) diff -r 7517a3cc06e7 -r 79062a225703 gamelib/hand.py --- a/gamelib/hand.py Mon Aug 23 01:10:10 2010 +0200 +++ b/gamelib/hand.py Mon Aug 23 10:35:53 2010 +0200 @@ -6,28 +6,28 @@ from pygame.color import Color class HandButton(ImageButton): - """The fancy hand button for the widget""" + """The fancy hand button for the widget""" - sel_colour = Color('red') - sel_width = 2 + sel_colour = Color('red') + sel_width = 2 - def __init__(self, action): - # FIXME: Yes, please. - this_image = get_image('items', 'square.png') - ImageButton.__init__(self, image=this_image, action=action) - self.selected = False # Flag if we're selected + def __init__(self, action): + # FIXME: Yes, please. + this_image = get_image('items', 'square.png') + ImageButton.__init__(self, image=this_image, action=action) + self.selected = False # Flag if we're selected - def draw(self, surface): - """Draw the widget""" - print 'drawing widget', self.selected - 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 draw(self, surface): + """Draw the widget""" + print 'drawing widget', self.selected + 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 toggle_selected(self): + self.selected = not self.selected - def unselect(self): - self.selected = False + def unselect(self): + self.selected = False