Right-click drag?

For general discussion related FlowStone
Post Reply
Perfect Human Interface
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Right-click drag?

Post by Perfect Human Interface »

Can we get right-click drag control? Or does Flowstone only support left-click drag? Ruby?
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Re: Right-click drag?

Post by billv »

Just change "capture mouse" and "release mouse" to the right click definitions.

Code: Select all

def mouseRDown x,y
    captureMouse
end

def mouseMoveCaptured x,y 

end


def mouseRUp x,y
   releaseMouse
end
Perfect Human Interface
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Right-click drag?

Post by Perfect Human Interface »

Thanks. It's too bad there isn't a prim, but I'll manage. :)
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Right-click drag?

Post by tulamide »

Be aware though, that this introduces the old view-catches-no-mouse-release issue (when you have nested views), because there is no 'mouseRUpCaptured' as exists for the lmb.
"There lies the dog buried" (German saying translated literally)
Perfect Human Interface
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Right-click drag?

Post by Perfect Human Interface »

I see, thank you for bringing that to my attention.
Jay
Posts: 276
Joined: Tue Jul 13, 2010 5:42 pm

Re: Right-click drag?

Post by Jay »

i needed this also quite recently and i have been using this code edited from the guide to give separate x and y and a bool on output 2 for the mousedown, you can see my noobish way of getting the bool, could someone show me how to do that the correct way please?

Code: Select all

def isInMousePoint x,y
true
end
output 2, false   
   
def mouseRDown x,y
captureMouse
output 2, true
end

def mouseMoveCaptured x,y
output 0,x
output 1,y
end

def mouseRUp x,y
output 2, false
releaseMouse
end


rclick drag.fsm
(598 Bytes) Downloaded 959 times


cheers!
Post Reply