Rotating vertical slider (filmstrip)
-
I’m trying to rotate a slider.
I tried rotating and inverting the filmstrip file, (just within preview for Mac) but this means mouse drags move the slider in the opposite direction.
What’s the easiest way to do this? (A tad confused as to how to use the g.rotate function)
Thanks!
-
Step-by-Step Solution
-
Draw a Vertical Slider
Start with a basic vertical slider (unrotated). For example, a rectangle that moves up and down based on mouse position. -
Apply Rotation
Use g.rotate to rotate the slider around a pivot point (e.g., its center). This visually rotates it, but the mouse interaction will still be in the original coordinate system. -
Adjust Mouse Input
To fix the "opposite direction" issue, transform the mouse coordinates to align with the rotated slider. For a 90-degree rotation (e.g., turning a horizontal slider vertical), swap and invert the mouse X and Y values.
-
-
@dianasv25 AI?
-
@d-healey We been watched the whole time…