View previous topic :: View next topic |
Author |
Message |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Wed Jun 18, 2003 2:59 pm Post subject: VDS 5 @mousedown() bug! |
|
|
This is what it says in the help file:
"Flags are L, M, R. Default L. Returns the state of the mentioned mouse button. If the button is down, it returns 1, if not it returns NULL. When specifying more than one flag, the return is a string of null or 1 separated by the standard VDS field separator. "
I put the @mousedown() function in a timer loop to check if the right mouse button is being pressed. Well (as in VDS 4) the following returns R which is NOT one of the correct returns. Or am I reading something wrong?
if @mousedown(R)
info @mousedown(R)
#do something
end _________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed Jun 18, 2003 9:02 pm Post subject: |
|
|
This code works the same way with VDS 4 & 5.
Code: | DIALOG CREATE,New Dialog,-1,0,240,160
DIALOG ADD,TEXT,This_is_a_test,63,78,,,This_is_a_test
DIALOG SHOW
:loop
wait event,0
goto @event()
:timer
if @mousedown(R)
info @mousedown(R)
end
goto loop
:close
exit |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
sieber Newbie
Joined: 01 Jul 2003 Posts: 13 Location: Germany
|
Posted: Tue Jul 01, 2003 4:06 pm Post subject: Mousedown bug and popup window for VDS 4 and 5 |
|
|
If you use the mousedown function to detecting if the rigth mouse was pressed and after this add a popup window -> you get trouble. You can simulate it with the Mousedown example or have a look the my example. If you use the mousedown example, please add the red line to the code:
....
if @mousedown(r)
dialog show,r
dialog popup, TESTPopup
else
.....
My example:
Code: | rem Demo for PopupMenu by RightMouse click
rem This is not working also for VDS Version 4.x
rem The internal event for the rightMouse event will not reset
rem start the script and press the right mouse in the list, now you always get the popup !
rem Close the test and start it again with F9 -> the popup will direct display !!
option decimalsep,.
DIALOG CREATE,New Dialog,-1,0,614,358
DIALOG ADD,LIST,LIST1,35,24,213,242,,MULTI
DIALOG ADD,STATUS,STATUS
DIALOG SHOW
list add,list1,"line 1"
list add,list1,"line 2"
list add,list1,"line 3"
%%Counter = 0
:loop
wait event,0.5
%E = @event()
goto %E
:TIMER
%%Counter = @succ(%%Counter)
%%Focus = @focus()
if @equal(%%focus,LIST1)
%%mousedown = @mousedown(R)
if %%mousedown
dialog popup,Popupwindow
dialog set,status, Mouse <%%mousedown> Count <%%Counter>
end
end
goto loop
:popupwindowmenu
goto loop
:close
stop |
|
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Tue Jul 01, 2003 4:23 pm Post subject: |
|
|
Hi Sieber!
Welcome to VDSWORLD!
Thank you for your bug reports. However, I just wanted to let you
know that you can use the [code] BBCode tag to highlight your code and
make it easier to read. I changed it in your example above for you already. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
sieber Newbie
Joined: 01 Jul 2003 Posts: 13 Location: Germany
|
Posted: Wed Jul 02, 2003 6:17 am Post subject: |
|
|
Hi, thank you for this information. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|