Mercurial > fife-parpg
changeset 609:bab6eeec278c
Added the step_length property to the slider widget. close[t:482]
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Tue, 21 Sep 2010 18:13:21 +0000 |
parents | c54f286a45fc |
children | 3087215c9ca1 |
files | engine/python/fife/extensions/pychan/widgets/slider.py |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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)