# HG changeset patch # User prock@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1285092801 0 # Node ID bab6eeec278c859e5f8aa0165949f787dba7d775 # Parent c54f286a45fc6fa85f6a4eb6362ba926725874c3 Added the step_length property to the slider widget. close[t:482] diff -r c54f286a45fc -r bab6eeec278c engine/python/fife/extensions/pychan/widgets/slider.py --- a/engine/python/fife/extensions/pychan/widgets/slider.py Mon Sep 20 20:21:45 2010 +0000 +++ b/engine/python/fife/extensions/pychan/widgets/slider.py Tue Sep 21 18:13:21 2010 +0000 @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- # #################################################################### -# Copyright (C) 2005-2009 by the FIFE team -# http://www.fifengine.de +# Copyright (C) 2005-2010 by the FIFE team +# http://www.fifengine.net # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or @@ -36,16 +36,16 @@ - orientation: 1 = horizontal, 0=vertical - scale_start: float: default 0.0 - scale_end: float: default 1.0 + - step_length: float: default scale_end/10 FIXME: - - set new attributes for marker & step length, value - update docstrings """ HORIZONTAL = fife.Slider.HORIZONTAL VERTICAL = fife.Slider.VERTICAL - ATTRIBUTES = Widget.ATTRIBUTES + [IntAttr('orientation'), FloatAttr('scale_start'), FloatAttr('scale_end')] + ATTRIBUTES = Widget.ATTRIBUTES + [IntAttr('orientation'), FloatAttr('scale_start'), FloatAttr('scale_end'), FloatAttr('step_length')] DEFAULT_HEXPAND = 1 DEFAULT_VEXPAND = 0 @@ -127,3 +127,5 @@ def getStepLength(self): """getStepLength(self) -> double""" return self.real_widget.getStepLength() + + step_length = property(getStepLength, setStepLength)