From a8d364ce4accb900c690229925356ba2ffabdc74 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Mon, 22 Feb 2010 23:25:34 +0000 Subject: 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) --- source/blender/editors/util/numinput.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/util/numinput.c') 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; } -- cgit v1.2.3