Mercurial > fife-parpg
changeset 81:0e39a20bdfb2
add selection color to widget class
author | spq@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Fri, 18 Jul 2008 12:16:48 +0000 |
parents | ccb65f566c8d |
children | b5bb869665fd |
files | engine/core/gui/widgets/widgets.i engine/extensions/pychan/widgets.py |
diffstat | 2 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/engine/core/gui/widgets/widgets.i Fri Jul 18 10:51:34 2008 +0000 +++ b/engine/core/gui/widgets/widgets.i Fri Jul 18 12:16:48 2008 +0000 @@ -89,6 +89,8 @@ virtual const Color& getForegroundColor() const; virtual void setBackgroundColor(const Color& color); virtual const Color& getBackgroundColor() const; + virtual void setSelectionColor(const Color& color); + virtual const Color& getSelectionColor() const; virtual void requestFocus(); virtual void requestMoveToTop(); virtual void requestMoveToBottom();
--- a/engine/extensions/pychan/widgets.py Fri Jul 18 10:51:34 2008 +0000 +++ b/engine/extensions/pychan/widgets.py Fri Jul 18 12:16:48 2008 +0000 @@ -588,6 +588,13 @@ self.real_widget.setForegroundColor(color) foreground_color = property(_getForegroundColor,_setForegroundColor) + def _getSelectionColor(self): return self.real_widget.getSelectionColor() + def _setSelectionColor(self,color): + if isinstance(color,type(())): + color = fife.Color(*color) + self.real_widget.setSelectionColor(color) + selection_color = property(_getSelectionColor,_setSelectionColor) + def _getName(self): return self._name def _setName(self,name): from pychan import manager