Get mouse coordinates on click
#1
In my addon, I have an image that takes up the width of the screen. As a feature of this, I would like to be able to click (or touch, as i'm using a touchscreen) to get the position of where the cursor pressed on the image. Then use that as a gauge for what action to take.

For instance, I'm building a radio. When I tap the left, which is 87.9 Mhz, I want to tune there, or if I tap in the middle, then 97.9, etc.

Is it possible to get the position of the mouse press/touch?
Reply
#2
what do you think about a slider control?
empty signature
Reply
#3
I put the slider control in place of my button. I did not have to change anything other than the type based on how the rest of my UI and python code were laid out.

using the getPercent() method of the slider is absolutely perfect. Thanks for the idea!
Reply

Logout Mark Read Team Forum Stats Members Help
Get mouse coordinates on click0