This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Mycrafter5's profile picture

Anyone have a mouse api?

Started by Mycrafter5, 11 December 2012 - 12:29 PM
Mycrafter5 #1
Posted 11 December 2012 - 01:29 PM
Hello, i am currently planning on learning and scripting in lua.
im wondering if anybody has a mouse api for a start menu ill try to develop in a os im in
planning.Plz reply asap.
PixelToast #2
Posted 11 December 2012 - 01:37 PM
not sure what you mean by mouse api, i mean there is no reason to make one
its just a simple event pull .-.
Mycrafter5 #3
Posted 11 December 2012 - 02:03 PM
By what i mean by mouse api is a better way of detecting mouse clicks(And the difference between right and left clicks) To
make it like windows in the advanced computer version.
Kingdaro #4
Posted 11 December 2012 - 02:03 PM
You mean a GUI API?
Mycrafter5 #5
Posted 11 December 2012 - 02:07 PM
No,Something that could let me effectively tell if the Mouse click was right or left
Kingdaro #6
Posted 11 December 2012 - 02:10 PM

local ev, p1 = os.pullEvent('mouse_click')
print(p1)
Prints 1 for left click, 2 for right click, and (i think) 3 for middle click.
Mycrafter5 #7
Posted 11 December 2012 - 02:10 PM
Ok Thanks.