Add 'mousebutton'
23
mousebutton.md
Normal file
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)
|
||||||
Reference in New Issue
Block a user