Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

mouseMoveCaptured with right mouse button - bug?

For general discussion related FlowStone

mouseMoveCaptured with right mouse button - bug?

Postby Nubeat7 » Fri Oct 31, 2014 11:24 pm

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?
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: mouseMoveCaptured with right mouse button - bug?

Postby tulamide » Fri Oct 31, 2014 11:53 pm

Hmm, I'm not sure what is happening. Try my demo, it works for me (right click, drag, release).
Attachments
rightmousebutton.fsm
(538 Bytes) Downloaded 963 times
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: mouseMoveCaptured with right mouse button - bug?

Postby Nubeat7 » Sat Nov 01, 2014 12:14 am

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..
Attachments
rightmouseknob.fsm
(7.04 KiB) Downloaded 1003 times
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: mouseMoveCaptured with right mouse button - bug?

Postby Nubeat7 » Sat Nov 01, 2014 12:18 am

but whats interesting is that it works inside the isInMousePoint defined area!
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: mouseMoveCaptured with right mouse button - bug?

Postby tulamide » Sat Nov 01, 2014 12:22 am

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 ;)
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: mouseMoveCaptured with right mouse button - bug?

Postby KG_is_back » Sat Nov 01, 2014 12:25 am

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.
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: mouseMoveCaptured with right mouse button - bug?

Postby Nubeat7 » Sat Nov 01, 2014 10:07 am

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
User avatar
Nubeat7
 
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna

Re: mouseMoveCaptured with right mouse button - bug?

Postby KG_is_back » Sat Nov 01, 2014 1:38 pm

I have an idea. maybe you could use empty full-View module for interaction
KG_is_back
 
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: mouseMoveCaptured with right mouse button - bug?

Postby Tronic » Sun Nov 16, 2014 9:59 am

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)
Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: mouseMoveCaptured with right mouse button - bug?

Postby billv » Sun Nov 16, 2014 11:38 am

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
billv
 
Posts: 1157
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia

Next

Return to General

Who is online

Users browsing this forum: No registered users and 23 guests