Mercurial > boomslang
view gamelib/widgets.py @ 107:5213b45fcc7e
Initial event sound support
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Tue, 24 Aug 2010 14:07:07 +0200 |
parents | d7c0a702a0b4 |
children | d2f84f22def0 |
line wrap: on
line source
# widgets.py # Copyright Boomslang team, 2010 (see COPYING File) """Custom Albow widgets""" import albow.controls class BoomLabel(albow.controls.Label): def set_margin(self, margin): """Add a set_margin method that recalculates the label size""" old_margin = self.margin w, h = self.size d = margin - old_margin self.margin = margin self.size = (w + 2 * d, h + 2 * d)