Search the Community
Showing results for tags 'buttonapi'.
Hi, i would like to know how we can do a text that when we touch it execute some code. Thanks for your help! main.lua local component = require("component") local event = require("event") local computer = require("computer") local gpu = component.gpu local term = require("term") local version = "1.0" local h, w = gpu.getResolution() API = require("buttonAPI") local function base() gpu.setBackground(0x0000cc) gpu.fill(1,1,h,1," ") gpu.set((h / 2) - 5,1,"TopiGui v"..version) gpu.setBackground(0xcccccc) gpu.fill(1,2,h,w, " ") while true do gpu.setBackground
Changelog: First and foremost, yes, this is a port of DW20's button API from ComputerCraft. Why do his? Because his is a rather simple API and it provided a challenge, at least for me, to learn more about OC. When I did the port, it is more or less a direct port, so any limitations, or bugs (if any) were present in it, are still there. The only change I made to his api is that I made the button flash delay configurable from your script so you shouldn't have to edit the API itself to change it. Now, for some of the issues I noticed from this API running on OC: 1. It does fully wo