# HG changeset patch # User spq@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1216383408 0 # Node ID 0e39a20bdfb262c3da897fe8a31ae898c9312269 # Parent ccb65f566c8d13c339123aa01a9b720a878f350a add selection color to widget class diff -r ccb65f566c8d -r 0e39a20bdfb2 engine/core/gui/widgets/widgets.i --- 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(); diff -r ccb65f566c8d -r 0e39a20bdfb2 engine/extensions/pychan/widgets.py --- 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