# HG changeset patch # User nihathrael@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1241772327 0 # Node ID 6ab09eb765a193467d8c8aeb9526fac7b018b9f7 # Parent 81d623c97e5741021f63da1a56b39eb5fd0b6ba8 * Added patch by MadMonk that exposes the guichan focus functions to pychan * Thanks for contributing diff -r 81d623c97e57 -r 6ab09eb765a1 engine/extensions/pychan/widgets/widget.py --- a/engine/extensions/pychan/widgets/widget.py Wed Apr 29 20:30:52 2009 +0000 +++ b/engine/extensions/pychan/widgets/widget.py Fri May 08 08:45:27 2009 +0000 @@ -59,7 +59,7 @@ PointAttr('min_size'), PointAttr('size'), PointAttr('max_size'), ColorAttr('base_color'),ColorAttr('background_color'),ColorAttr('foreground_color'),ColorAttr('selection_color'), Attr('style'), Attr('font'),IntAttr('border_size'),Attr('position_technique'), - UnicodeAttr('helptext') + UnicodeAttr('helptext'), BoolAttr('is_focusable') ] DEFAULT_NAME = '__unnamed__' @@ -641,6 +641,10 @@ def _getName(self): return self._name name = property(_getName,_setName) + def _setFocusable(self, b): self.real_widget.setFocusable(b) + def _isFocusable(self): + return self.real_widget.isFocusable() + x = property(_getX,_setX) y = property(_getY,_setY) width = property(_getWidth,_setWidth) @@ -649,6 +653,7 @@ position = property(_getPosition,_setPosition) font = property(_getFont,_setFont) border_size = property(_getBorderSize,_setBorderSize) + is_focusable = property(_isFocusable,_setFocusable) def setEnterCallback(self, cb): """