Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.unloadAPI("button")
- os.loadAPI("button")
- button.makeSingleUseButton({["startx"] = 2, ["starty"] = 2, ["stopx"] = 4, ["stopy"] = 5},
- {["color_bkg"] = colors.lime, ["color_text"] = colors.white, ["text"] = "lol", ["textStartPosX"] = 2, ["textStartPosY"] = 3, ["click_color_text"] = colors.black, ["click_color_bkg"] = colors.green, ["event_value"] = "lol"},
- 1,
- function() while true do local e, k = os.pullEvent("key"); if k == keys.q then button.removeButton("lol"); return end end end,
- function() term.setTextColor(colors.white); term.setBackgroundColor(colors.black); print("Click!"); end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement