Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
28
Task/Mouse-position/FreeBASIC/mouse-position.basic
Normal file
28
Task/Mouse-position/FreeBASIC/mouse-position.basic
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
type MOUSE
|
||||
'mouse position, button state, wheel state
|
||||
x as integer
|
||||
y as integer
|
||||
buttons as integer
|
||||
wheel as integer
|
||||
end type
|
||||
|
||||
screen 12
|
||||
|
||||
dim as MOUSE mouse
|
||||
|
||||
while inkey=""
|
||||
locate 1,1
|
||||
getmouse(mouse.x, mouse.y, mouse.wheel, mouse.buttons)
|
||||
if mouse.x < 0 then
|
||||
print "Mouse out of window. "
|
||||
print " "
|
||||
print " "
|
||||
else
|
||||
print "Mouse position : ", mouse.x, mouse.y, " "
|
||||
print "Buttons clicked: ";
|
||||
print Iif( mouse.buttons and 1, "Left ", " " );
|
||||
print Iif( mouse.buttons and 2, "Right ", " " );
|
||||
print Iif( mouse.buttons and 4, "Middle ", " " )
|
||||
print "Wheel scrolls: ", mouse.wheel," "
|
||||
end if
|
||||
wend
|
||||
Loading…
Add table
Add a link
Reference in a new issue