Besides it doing the same thing as my code, I believe the value will update the last value as they are always changing when the other knob changes it.
Not too sure how touch interaction works but iirc gestures (multi-touch) is not supported anyway. isHovered just being the name of the method isPressed is probably more descriptive. Even if multi-touch is supported there would be no need to call isWhatever() as you would have the control on as many fingers and knobs you can change at the same time. Plus if you were to use (on a touch device) the invert of the other to control the second there would be no need to use another finger to change that value but if you wanted to do it the other way around you would be stuck on using that first setter knob.
Sorry, I’m unable to help you if you’re just going to ignore all the advice that I give. If you can’t interpret my pseudocode above, I can write a full implementation when I have more time.
Thank you, much appreciated! As I said in the previous post I tried the psuedo you posted and it was doing the same as my code:
Only after seeing the solution was I able to spot it myself, There is an error with -x being in both if blocks:
if (x != lastX) {
y = -x;
lastX = x;
}
else if (y != lastY) {
x = -x; //← x = -y
lastY = y;
}
Also I was using volt1 and volt2 and passing those values to the Display, those values were messing things up as well, declaring 2 separate variables for X and Y fixes that.
Ah indeed, Thanks! It is much less likely to get funky when they are member but still sometimes occurs. I think, but not too sure, it happens when the tooltip is fluctuating and you reset (double click) from the knob you dragged.