Stolar228

Untitled

Oct 1st, 2018
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. local GUI = require("GUI")
  2. local image = require("image")
  3. --------------------------------------------------------------------------------
  4.  
  5. local mainContainer = GUI.fullScreenContainer()
  6. mainContainer:addChild(GUI.panel(1, 1, mainContainer.width, mainContainer.height, 0x262626))
  7.  
  8. local filesystemChooser = mainContainer:addChild(GUI.filesystemChooser(2, 2, 30, 3, 0xE1E1E1, 0x888888, 0x3C3C3C, 0x888888, nil, "Open", "Cancel", "Choose", "/"))
  9. filesystemChooser:setMode(GUI.IO_MODE_OPEN, GUI.IO_MODE_FILE)
  10. filesystemChooser.onSubmit = function(path)
  11. mainContainer:addChild(GUI.image(2, 2, image.load(path)))
  12. end
  13.  
  14. --------------------------------------------------------------------------------
  15.  
  16. mainContainer:drawOnScreen(true)
  17. mainContainer:startEventHandling()
Advertisement
Add Comment
Please, Sign In to add comment