Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Import this library
- local GUI = require("GUI")
- -- We will also need downloaded double buffering library to render rectangles
- local buffer = require("doubleBuffering")
- -- stäng av högerklick för att öppna
- local term = require("term")
- local comp = require("component")
- local scre = comp.screen
- scre.setTouchModeInverted(true)
- --------------------------------------------------------------------------------
- -- Create new application
- local application = GUI.application()
- application:addChild(GUI.panel(1, 1, application.width, application.height, 0x000000))
- application:addChild(GUI.label(3, 2, application.width, application.height, 0xFFFFFF, "Tilted Food Terminal")):setAlignment(GUI.ALIGNMENT_HORIZONTAL_CENTER, GUI.ALIGNMENT_VERTICAL_TOP)
- -- Add a regular button
- local regularButton = application:addChild(GUI.button(2, 2, 5, 3, 0xFFFFFF, 0x555555, 0x000000, 0xFFFFFF, "Exit"))
- regularButton.onTouch = function()
- term.clear()
- application:stop()
- end
- --------------------------------------------------------------------------------
- -- Draw application content once on screen when program starts
- application:draw(true)
- -- Start processing events for application
- application:start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement