Posted 28 October 2012 - 11:07 PM
Okay guys so here is a small example program for how to use the mouse function. Nothing special but if you do use this EXACT program in your program then PLZ give credit. Otherwise have fun and edit the hell out of my program :D/>/>
print ("1.Option 1")
print ("2.Option 2")
print ("3.Option 3")
while true do
local event, button, X, Y = os.pullEvent("mouse_click")
XY = X..","..Y
if XY == "1,2" then
– Do stuff for Option 1
break
end
if XY == "1,3" then
– Do stuff for Option 2
break
end
if XY == "1,4" then
– Do stuff for Option 3
break
end
end
EDIT- By CPU I mean computer…sorry about the confusion
Spoiler
print ("Menu-Click the Number")print ("1.Option 1")
print ("2.Option 2")
print ("3.Option 3")
while true do
local event, button, X, Y = os.pullEvent("mouse_click")
XY = X..","..Y
if XY == "1,2" then
– Do stuff for Option 1
break
end
if XY == "1,3" then
– Do stuff for Option 2
break
end
if XY == "1,4" then
– Do stuff for Option 3
break
end
end
EDIT- By CPU I mean computer…sorry about the confusion