Jump to content




Q:How to make things clickable?


  • You cannot reply to this topic
3 replies to this topic

#1 Zambonie

  • Members
  • 477 posts
  • LocationSpring Hill, Fl

Posted 24 December 2012 - 06:59 AM

Because 1.48 just came out with touchscreen monitors,Im gonna make my own program thats compadible with that.But first I need a peice of code to make it clickable to do it.Do any of you guys have an peice of code that can proboly do that?Thank you if you do.

#2 NDFJay

  • Members
  • 216 posts
  • LocationLeeds, England

Posted 24 December 2012 - 07:02 AM

local event = os.pullEvent()
if event == "mouse_click" then
   if X >= 1 and X <= 5 and Y >= 1 and Y <= 5 then
	 --do something
   end
end

that will make a 5x5 click-able square in the top right corner of your screen

#3 Doyle3694

  • Members
  • 815 posts

Posted 24 December 2012 - 07:04 AM

top left actually ;)

#4 Zambonie

  • Members
  • 477 posts
  • LocationSpring Hill, Fl

Posted 24 December 2012 - 07:12 AM

Ok,thanks.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users