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

Multiple buttons

Started by KittenTheEpic, 14 January 2014 - 04:20 PM
KittenTheEpic #1
Posted 14 January 2014 - 05:20 PM
How to make a button? Or multiple?
Bomb Bloke #2
Posted 14 January 2014 - 08:42 PM
Punch tree. Take log, place log in crafting grid. Take planks, place planks in crafting grid. Extract buttons.

You may also find the Touchpoint API useful.
KittenTheEpic #3
Posted 17 January 2014 - 06:34 AM
Punch tree. Take log, place log in crafting grid. Take planks, place planks in crafting grid. Extract buttons.

You may also find the Touchpoint API useful.

Not those buttons. Like on a cc pc.
Lyqyd #4
Posted 17 January 2014 - 10:19 AM
Did you check out the link he posted?
KittenTheEpic #5
Posted 27 January 2014 - 03:54 PM
Did you check out the link he posted?

Yes, but I figured it out without the TP-API.


while true do
local event, button, x, y = os.pullEvent("mouse_click")
if (y == 1) and x >=1 and x <= 5 then
  print("YOU CLICKED IT!")
end
end