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

[Lua][Question]print/select between 2 xPos/yPos

Started by vantheman1wald, 21 February 2013 - 06:02 AM
vantheman1wald #1
Posted 21 February 2013 - 07:02 AM
Hey pros out there!
I wanted to write a touchscreen program in wich you can select from multiple red marked spaces with text in the middle of the space and then it *forgot word :D/>* a bundled output and makes the space green but i dont want to write it so long like if xPos==1 or xPos==2 …
Greeting from Germany!
Lyqyd #2
Posted 21 February 2013 - 07:25 AM

if xClicked >= 2 and xClicked <= 12 and yClicked >= 2 and yClicked <= 4 then
  --user clicked between 2, 2 and 12, 4 on the screen.
end