My gui (Now with visual editor) in Libraries & API's Posted January 3, 2019 I have error: Code is: local component = require("component") local gpu = component.gpu gpu.setResolution(80,25) local gui = require("gui") local event = require("event") gui.checkVersion(2,5) local prgName = "security" local version = "v1.0" -- Begin: Callbacks local function fire(guiID, buttonID) -- Your code here end local function armoured-true(guiID, buttonID) -- Your code here end local function armoured-false(guiID, buttonID) -- Your code here end local function power-on(guiID, buttonID) -- Your code here end local function power-off(guiID, buttonID) -- Your code here end local function height(guiID, textID, text) -- Your code here end local function rotation(guiID, textID, text) -- Your code here end local function exitButtonCallback(guiID, id) local result = gui.getYesNo("", "Do you really want to exit?", "") if result == true then gui.exit() end gui.displayGui(mainGui) refresh() end -- End: Callbacks -- Begin: Menu definitions mainGui = gui.newGui(1, 2, 79, 23, true) Fire = gui.newButton(mainGui, 1, 1, "Fire!", fire) Rotaion-label = gui.newLabel(mainGui, 1, 3, "Rotation", 0xc0c0c0, 0x0, 7) Height-label = gui.newLabel(mainGui, 1, 5, "Height", 0xc0c0c0, 0x0, 7) Armoured-true = gui.newButton(mainGui, 27, 1, "Set ready", armoured-true) Armoured-false = gui.newButton(mainGui, 12, 1, "Not ready", armoured-false) Power-on = gui.newButton(mainGui, 42, 1, "Power on", power-on) Power-off = gui.newButton(mainGui, 56, 1, "Power off", power-off) Height-value = gui.newText(mainGui, 10, 5, 2, "", height, 10, false) Rotation-value = gui.newText(mainGui, 10, 3, 2, "", rotation, 10, false) exitButton = gui.newButton(mainGui, 73, 23, "exit", exitButtonCallback) -- End: Menu definitions gui.clearScreen() gui.setTop("Energy turret operation software") gui.setBottom("Made with Visual Gui v0.1a and Gui library v2.5") -- Main loop while true do gui.runGui(mainGui) end
My gui (Now with visual editor)
in Libraries & API's
Posted
I have error:
Code is: