Add 'mousebutton'

2021-12-07 12:45:25 +01:00
parent 1e45ca6844
commit 55e473e7b6

23
mousebutton.md Normal file

@@ -0,0 +1,23 @@
# mousebutton(btn)
Torna true o false segons si està o no pulsat el botó del ratolí especificat. 1 per al botó esquerre, 2 per al del mig i 3 per al botó dret.
### Exemple
```
function update()
cls()
locate(0,0)
if mousebutton(1) then
print("Has pulsat el boto esquerre")
elseif mousebutton(2) then
print("Has pulsat el boto del mig")
elseif mousebutton(3) then
print("Has pulsat el boto dret")
else
print("No has pulsat cap boto")
end
end
```
### Vore també
* [mousex()](mousex)
* [mousey()](mousey)
* [mousewheel()](mousewheel)