diff engine/extensions/pychan/widgets/slider.py @ 255:51cc05d862f2

Merged editor_rewrite branch to trunk. This contains changes that may break compatibility against existing clients. For a list of changes that may affect your client, see: http://wiki.fifengine.de/Changes_to_pychan_and_FIFE_in_editor_rewrite_branch
author cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
date Mon, 08 Jun 2009 16:00:02 +0000
parents a2d5e2721489
children 48c99636453e
line wrap: on
line diff
--- a/engine/extensions/pychan/widgets/slider.py	Wed Jun 03 19:29:52 2009 +0000
+++ b/engine/extensions/pychan/widgets/slider.py	Mon Jun 08 16:00:02 2009 +0000
@@ -25,12 +25,18 @@
 	VERTICAL = fife.Slider.VERTICAL
 
 	ATTRIBUTES = Widget.ATTRIBUTES + [IntAttr('orientation'), FloatAttr('scale_start'), FloatAttr('scale_end')]
+	DEFAULT_HEXPAND = 1
+	DEFAULT_VEXPAND = 0
 
-	def __init__(self, scaleStart=0.0, scaleEnd=1.0, orientation=HORIZONTAL, **kwargs):
+	def __init__(self, scaleStart=0.0, scaleEnd=1.0, orientation=HORIZONTAL, min_size=(10,10),**kwargs):
 		self.real_widget = fife.Slider(scaleStart, scaleEnd)
 		self.orientation = orientation
 		self.setOrientation(self.orientation)
-		super(Slider, self).__init__(**kwargs)
+		super(Slider, self).__init__(min_size=min_size,**kwargs)
+
+		self.accepts_data = True
+		self._realSetData = self.setValue
+		self._realGetData = self.getValue
 
 	def _setScale(self, start, end):
 		"""setScale(self, double scaleStart, double scaleEnd)"""