Advertisement
Guest User

test

a guest
Nov 17th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.17 KB | None | 0 0
  1. -- Import this library
  2. local GUI = require("GUI")
  3. -- We will also need downloaded double buffering library to render rectangles
  4. local buffer = require("doubleBuffering")
  5.  
  6. -- stäng av högerklick för att öppna
  7. local term = require("term")
  8. local comp = require("component")
  9. local scre = comp.screen
  10. scre.setTouchModeInverted(true)
  11.  
  12. --------------------------------------------------------------------------------
  13.  
  14. -- Create new application
  15. local application = GUI.application()
  16.  
  17. application:addChild(GUI.panel(1, 1, application.width, application.height, 0x000000))
  18.  
  19. application:addChild(GUI.label(3, 2, application.width, application.height, 0xFFFFFF, "Tilted Food Terminal")):setAlignment(GUI.ALIGNMENT_HORIZONTAL_CENTER, GUI.ALIGNMENT_VERTICAL_TOP)
  20.  
  21. -- Add a regular button
  22. local regularButton = application:addChild(GUI.button(2, 2, 5, 3, 0xFFFFFF, 0x555555, 0x000000, 0xFFFFFF, "Exit"))
  23. regularButton.onTouch = function()
  24.   term.clear()
  25.   application:stop()
  26. end
  27. --------------------------------------------------------------------------------
  28.  
  29. -- Draw application content once on screen when program starts
  30. application:draw(true)
  31. -- Start processing events for application
  32. application:start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement