Page 1 of 2
using the bush tool without mousedown
Posted: Wed Feb 10, 2010 3:49 pm
by jmburnod
Hi All,
Is there a way to use the brush of the tools of drawing without maintaining the button of the mouse pushed ?
Jean-Marc
Re: using the bush tool without mousedown
Posted: Wed Feb 10, 2010 7:19 pm
by bn
Hi Jean-Marc,
that is a bit difficult but doable. The problem is that once you are in painting mode the image does not get the mouse messages like mouseUp etc. So to end painting I resorted to letting the user press the option-key (or alt-key on windows). Or when the user leaves the rect of the image browsing mode is restored. To begin painting the user has to click into the image.
I attach a stack that shows what I mean.
regards
Bernd
Re: using the bush tool without mousedown
Posted: Thu Feb 11, 2010 7:29 pm
by jmburnod
Hi Bernd,
Great. It work. Many thanks
It will allow children who cannot use the physical keyboard and the button of the mouse to draw with a joystick
Regards
Jean-Marc
Re: using the bush tool without mousedown
Posted: Thu Feb 11, 2010 8:40 pm
by bn
Hi Jean-Marc,
glad it works. If there is anything I could help you with this, just let me know.
regards
Bernd
Re: using the bush tool without mousedown
Posted: Sat Feb 13, 2010 3:34 pm
by jmburnod
Hi Bernd,
If you wait 3 seconds without moving you can go out the image with the browse tool
It work but if you click one more at the same place, the tool stay to browse (i need setting the tool to brush)
Regards
Jean-Marc
The new script of image 1 :
Code: Select all
local sLastLoc, sTrack,sdepTime --•• jmb 130210 add local sdepTime
on mouseUp
put the ticks into sdepTime --•• jmb 130210
--breakpoint
if sTrack is "" then put false into sTrack
if sTrack is false then
put true into sTrack
set the brushcolor to black
set the brush to 8
choose brush tool
put the mouseLoc into sLastLoc
send trackMouse to me in 25 milliseconds
end if
end mouseUp
on mouseLeave
put false into sTrack
choose browse tool
end mouseLeave
on trackMouse
if sTrack then
-- once in paint mode the image does not get mouseUp/mouseDown messages
-- that is why you have to end painting differently
-- here I use the optionKey = Alt-key on windows
if the optionkey is down then
choose browse tool
put false into sTrack
exit trackMouse
end if
put the mouseLoc into tLoc
--•• bernd
-- drag from sLastLoc to tLoc
-- put tLoc into sLastLoc
--•• bernd end
--•• JMB 130210
if sLastLoc <>tLoc then
drag from sLastLoc to tLoc
put tLoc into sLastLoc
put the ticks into sdepTime
else
if the ticks >sdepTime+180 then --•• after 3 seconds no move set the tool to browse
choose browse tool
exit to top
end if
end if
--••• JMB 130210 end
if "trackMouse" is not in the pendingmessages then
send trackMouse to me in 45 milliseconds -- change time as appropriate
end if
end if
end trackMouse
Re: using the bush tool without mousedown
Posted: Sat Feb 13, 2010 4:55 pm
by bn
Jean-Marc,
I just added one line of code, I post only the changed part. You had to set the script local variable sTrack to false. The way the mouseUp handler is now it only sets the sTrack to true, so when you want to get out of the tracking you have to set sTrack to false.
Code: Select all
if the ticks >sdepTime+180 then --•• after 3 seconds no move set the tool to browse
choose browse tool
put false into sTrack -- Added this BN
exit to top
end if
I think that was the problem.
regards
Bernd
Re: using the bush tool without mousedown
Posted: Sat Feb 13, 2010 6:52 pm
by jmburnod
Yes Bernd,
That was the problem
Thanks
Jean-Marc
Re: using the bush tool without mousedown
Posted: Thu Feb 18, 2010 7:27 pm
by jmburnod
Hi Bernd,
The paintings tools (eraser,brush, bucket and spray) work fine but not in a standalone or with the player
What i forget ?
Any idea ?
Regards
Jean-Marc
Re: using the bush tool without mousedown
Posted: Thu Feb 18, 2010 7:48 pm
by bn
Hi Jean-Marc,
I just tried and it did not work with the standard settings. But if you go to the standalone settings ->General-> click "select inclusion for the standalone settings" then check -> brushes
That works for me in a standalone for MacOSX.
regards
Bernd
Re: using the bush tool without mousedown
Posted: Thu Feb 18, 2010 8:50 pm
by jmburnod
Hi Bernd,
Vielen Dank noch einmal.
Jean-Marc
Re: using the bush tool without mousedown
Posted: Thu Feb 18, 2010 8:53 pm
by bn
Jean-Marc,
pas de quoi, puisqu'on était practiquement des voisins...
salut
Bernd
Re: using the bush tool without mousedown
Posted: Sat Feb 27, 2010 10:39 am
by jmburnod
Guten Morgen Bernd,
I progress
I builded one revlet but no cursors for painting tools (i have in revmedia 4.0 and in standalone rev 4.0)
Do you have one more idea ?
Jean-Marc
Re: using the bush tool without mousedown
Posted: Sat Feb 27, 2010 11:54 am
by bn
Jean-Marc,
cursors in revlets do not work (yet). What I did in one case is I created a graphic which is shown at the location of the mouse pointer cursor
http://berndniggemann.on-rev.com/qtvr/
You could do something similar to indicate that the mode changed, not a native look but at least a feedback to the user.
If you want to go that road it should be relatively easy to show a e.g. dot near the cursor.
regards
Bernd
Re: using the bush tool without mousedown
Posted: Sat Feb 27, 2010 12:30 pm
by jmburnod
Thank Bernd
I'll do images cursor of painting tools
I saw the qtvr in revlet. It is nice
Jean-Marc
Re: using the bush tool without mousedown
Posted: Sat Feb 27, 2010 5:54 pm
by FourthWorld
bn wrote:Jean-Marc,
cursors in revlets do not work (yet). What I did in one case is I created a graphic which is shown at the location of the mouse pointer cursor
http://berndniggemann.on-rev.com/qtvr/
Why does that revlet require access to my hard drive?
Why does nearly every revlet deployed ask for that? Is there a bug in the standalone builder? Makes RevWeb seem like the scariest plugin ever invented.