Advertisement
Guest User

z.lua

a guest
Aug 25th, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.83 KB | None | 0 0
  1.  
  2. -- Import libraries
  3. local GUI = require("GUI")
  4. local system = require("System")
  5.  
  6. ---------------------------------------------------------------------------------
  7.  
  8. -- Add a new window to MineOS workspace
  9. local workspace, window, menu = system.addWindow(GUI.filledWindow(1, 1, 60, 20, 0xE1E1E1))
  10.  
  11. -- Add single cell layout to window
  12. --local layout = window:addChild(GUI.layout(1, 1, window.width, window.height, 1, 1))
  13.  
  14. -- Add nice gray text object to layout
  15. window:addChild(GUI.text(1, 1, 0x4B4B4B, "qwe"))
  16.  
  17. window.onResize = function(newWidth, newHeight)
  18.   window.backgroundPanel.width, window.backgroundPanel.height = newWidth, newHeight
  19.   layout.width, layout.height = newWidth, newHeight
  20. end
  21.  
  22. ---------------------------------------------------------------------------------
  23.  
  24. -- Draw changes on screen after customizing your window
  25. workspace:draw()
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement