Page 1 of 2
mouseMoveCaptured with right mouse button - bug?
Posted: Fri Oct 31, 2014 11:24 pm
by Nubeat7
hi all,
i found out that you can start captureMouse with the right mousebutton but you cannot finish the the capturing without ending in a locked mouse state for the view you were using it it stays in an active capureing mode
as an easy example just take one of the stock knobs and change the mouseLDown to mouseRDown and try to finish the capturing, i was assuming that you finish it with mouseRUpCaptured but it looks like this methode isn't existing or it doesn't work, and with the mouseRUp methode the capture isn't stopping...
and if you use the leftclick then it hangs and no mouse action is possible any more
so is this a bug? or how can i finish capturingMouse when activated with mouseRDown?
Re: mouseMoveCaptured with right mouse button - bug?
Posted: Fri Oct 31, 2014 11:53 pm
by tulamide
Hmm, I'm not sure what is happening. Try my demo, it works for me (right click, drag, release).
Re: mouseMoveCaptured with right mouse button - bug?
Posted: Sat Nov 01, 2014 12:14 am
by Nubeat7
hmm yes thats interesting, now try the rightmousebutton knob, the only thing i changed is the L to a R and mouseRUp instead of mouseRUpCapture..
Re: mouseMoveCaptured with right mouse button - bug?
Posted: Sat Nov 01, 2014 12:18 am
by Nubeat7
but whats interesting is that it works inside the isInMousePoint defined area!
Re: mouseMoveCaptured with right mouse button - bug?
Posted: Sat Nov 01, 2014 12:22 am
by tulamide
But that's not interesting, that's logical! isInMousePoint returns either true or false, and only if it is true all following methods get mouse events. And in this case, true is only sent when the mouse is in a specified area

Re: mouseMoveCaptured with right mouse button - bug?
Posted: Sat Nov 01, 2014 12:25 am
by KG_is_back
tulamide wrote:But that's not interesting, that's logical! isInMousePoint returns either true or false, and only if it is true all following methods get mouse events. And in this case, true is only sent when the mouse is in a specified area

Yeah, it is annoying but expected that mouse events do not work outside the area. There might be a fix to that - while the mouse button is held expand the isInMousePoint area to be always true. It will probably fail though, because mouse point area is always clipped to the module GUI.
Re: mouseMoveCaptured with right mouse button - bug?
Posted: Sat Nov 01, 2014 10:07 am
by Nubeat7
KG_is_back wrote:Yeah, it is annoying but expected that mouse events do not work outside the area. There might be a fix to that - while the mouse button is held expand the isInMousePoint area to be always true. It will probably fail though, because mouse point area is always clipped to the module GUI.
yes sadly thats no alternative,
whereas mouseLUpCaptured works also does its job outside the area!
i'm also wondering about the mouseLUpCaptured methode if it is defined by FS because it is not documented in the userguide and what is releaseMouse for? shouldn't releaseMouse finish capturing independent from what mousebutton is released?
i need it for the cablepatcher to connect sources with targets which works fine when you release it on an active area (target) but nothing should happen when you are outside an area.. works normal with left mousebuttons but not with right
Re: mouseMoveCaptured with right mouse button - bug?
Posted: Sat Nov 01, 2014 1:38 pm
by KG_is_back
I have an idea. maybe you could use empty full-View module for interaction
Re: mouseMoveCaptured with right mouse button - bug?
Posted: Sun Nov 16, 2014 9:59 am
by Tronic
I do not know how expensive it can be, but it works well,
put this workaround in the "draw" method, get the value from "mouseMoveCaptured" method.
Code: Select all
(isKeyPressed(1) or isKeyPressed(2)) ? captureMouse(0) : releaseMouse(0)
Re: mouseMoveCaptured with right mouse button - bug?
Posted: Sun Nov 16, 2014 11:38 am
by billv
Nubeat7 wrote:i found out that you can start captureMouse with the right mousebutton but you cannot finish the the capturing without ending in a locked mouse state for the view you were using it it stays in an active capureing mode
Nubeat7 wrote:and with the mouseRUp methode the capture isn't stopping...
locking the "active capturing" in a variable...seems to work great...
Code: Select all
def mouseLDown x,y
@mouse=0
captureMouse if @mouse = 0
end
def mouseRDown x,y
@mouse=1
captureMouse if @mouse = 1
end
def mouseMoveCaptured x,y
if @mouse==0 then
output 0,x
elsif @mouse==1 then
output 1,y
end
end
def mouseLUp x,y
releaseMouse if @mouse = 0
end
def mouseRUp x,y
releaseMouse if @mouse = 1
end