How to stop button mid press?
I have a group of buttons in a canvas that can be panned. If a button is being pressed and the mouse moves, I want the button to lose focus and not be pressed on mouse up. I can't seem to find a way to just stop a button from being pressed.
-
sfernandez
Site Admin
- Posts: 2995
- Joined:
Re: How to stop button mid press?
If you want to drag the panel then you need to capture the mouse (so you still receive move events when mouse is outside the canvas), and if you do so then the Button will automatically be released and click aborted.
Have you tried that?
Have you tried that?
Re: How to stop button mid press?
Ah, I was trying to use CaptureMouse() but it didn't seem to work, so I have been using my own flag for when the mouse is panning. I will try to use it again.
Who is online
Users browsing this forum: Ahrefs [Bot] and 13 guests