|
Post by Walt Decker on Jul 17, 2023 18:08:12 GMT -5
I am not very familiar with the LB graphics instruction set. Will this:
when leftmouseButtonDown; when mouseMove ROTATE
work to send both conditions to SUB ROTATE?
Or should it be
when leftmouseButtonDown ROTATE
when mouseMove ROTATE
Also, can one use "while" with the mouse instructions?
Never mind. I will work it out myself.
|
|
|
Post by Brandon Parker on Jul 19, 2023 20:34:32 GMT -5
Walt, Either of those should work perfectly fine; although, people typically want to know which event caused the subroutine to activate, so you might want to keep a running track of MouseX & MouseY (LB variables) vs oldMouseX & oldMouseY (user variables) to figure out whether it was the "Left Button Down" or "Mouse Move" event that fired. This is one reason for using two separate subroutines...
{:0)
Brandon Parker
|
|
|
Post by tsh73 on Jul 20, 2023 1:56:54 GMT -5
Hello Walt Names for these events in LB
leftButtonDown leftButtonMove
Issuing "when leftButtonDown" actually removes handler from mouse click so
#gr "when leftButtonDown; when leftButtonMove ROTATE" does * remove handler from mouse click * assign handler to mouse move
If you want both events to be assigned to ROTATE, you can use two lines
#gr "when leftButtonDown ROTATE" #gr "when leftButtonMove ROTATE" or single line
#gr "when leftButtonDown ROTATE; when leftButtonMove ROTATE"
As to
plese explain what you mean.
|
|
|
Post by Walt Decker on Jul 20, 2023 13:12:07 GMT -5
Thanks Mr. Parker, Anatoly. I figured it out a couple of days ago.
|
|