Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2006-06-05 05:23:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2006-06-05 05:23:56 +0400
commitce202f75405208e906f0744c376b27d944a8fb22 (patch)
tree61ddced8626ccd24bee9bc6102ffd694a90970e9 /source/blender/python/api2_2x/doc/Draw.py
parent233348197ef8ade459fd6b35fad5fd889d7e88cd (diff)
Clicking on the arrows of a python float button did not change the value :/ - (Click step was zero) Fixed in Draw.c
Added a comment to interface.c on how a1 and a2 are used with float buttons. Added an example to Draw.py epydocs of a script using a float button.
Diffstat (limited to 'source/blender/python/api2_2x/doc/Draw.py')
-rw-r--r--source/blender/python/api2_2x/doc/Draw.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/doc/Draw.py b/source/blender/python/api2_2x/doc/Draw.py
index 8bce549831e..d6d33733f36 100644
--- a/source/blender/python/api2_2x/doc/Draw.py
+++ b/source/blender/python/api2_2x/doc/Draw.py
@@ -631,6 +631,19 @@ def Number(name, event, x, y, width, height, initial, min, max, tooltip = None):
is kept over the button).
@rtype: Blender Button
@return: The Button created.
+
+ I{B{Example:}}
+
+ This example draws a single floating point value::
+ from Blender import Draw
+ b= Draw.Create(0.0) # Data for floating point button
+ def bevent(evt):
+ print 'My Button event:', evt
+ def gui():
+ global b
+ b= Draw.Number('value: ', 1000, 0,0, 200, 20, b.val, 0,10, 'some text tip')
+
+ Draw.Register(gui, None, bevent) # we are not going to worry about keyboard and mouse events
"""