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.
This commit is contained in:
2006-06-05 01:23:56 +00:00
parent 233348197e
commit ce202f7540
3 changed files with 34 additions and 3 deletions

View File

@@ -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
"""