Mercurial > fife-parpg
changeset 253:6ab09eb765a1
* Added patch by MadMonk that exposes the guichan focus functions to pychan
* Thanks for contributing
author | nihathrael@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Fri, 08 May 2009 08:45:27 +0000 |
parents | 81d623c97e57 |
children | 10b5f7f36dd4 |
files | engine/extensions/pychan/widgets/widget.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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): """