diff options
author | Martin Poirier <theeth@yahoo.com> | 2010-02-23 02:25:34 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2010-02-23 02:25:34 +0300 |
commit | a8d364ce4accb900c690229925356ba2ffabdc74 (patch) | |
tree | dccaeb695cd57ab1f63311e2f87b586b705ae7f7 /source/blender/editors/util/numinput.c | |
parent | 8a31fab3041d4c9804fdce036dc70637f4993507 (diff) |
Move increment value into numinput structure.
Easier for transform to have different values per transform then (also different from gears values).
(Based on a bug reported by Jonathan Smith)
Diffstat (limited to 'source/blender/editors/util/numinput.c')
-rw-r--r-- | source/blender/editors/util/numinput.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c index d6e2621a235..fc193373327 100644 --- a/source/blender/editors/util/numinput.c +++ b/source/blender/editors/util/numinput.c @@ -159,7 +159,7 @@ void applyNumInput(NumInput *n, float *vec) } } -char handleNumInput(NumInput *n, wmEvent *event, float increment) +char handleNumInput(NumInput *n, wmEvent *event) { float Val = 0; short idx = n->idx, idx_max = n->idx_max; @@ -170,13 +170,13 @@ char handleNumInput(NumInput *n, wmEvent *event, float increment) if (!n->ctrl[idx]) n->ctrl[idx] = 1; - n->val[idx] += increment; + n->val[idx] += n->increment; break; case NUM_MODAL_INCREMENT_DOWN: if (!n->ctrl[idx]) n->ctrl[idx] = 1; - n->val[idx] -= increment; + n->val[idx] -= n->increment; break; default: return 0; @@ -300,6 +300,8 @@ char handleNumInput(NumInput *n, wmEvent *event, float increment) } } + printf("%f\n", n->val[idx]); + /* REDRAW SINCE NUMBERS HAVE CHANGED */ return 1; } |