Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local GUI = require("GUI")
- local image = require("image")
- --------------------------------------------------------------------------------
- local mainContainer = GUI.fullScreenContainer()
- mainContainer:addChild(GUI.panel(1, 1, mainContainer.width, mainContainer.height, 0x262626))
- local filesystemChooser = mainContainer:addChild(GUI.filesystemChooser(2, 2, 30, 3, 0xE1E1E1, 0x888888, 0x3C3C3C, 0x888888, nil, "Open", "Cancel", "Choose", "/"))
- filesystemChooser:setMode(GUI.IO_MODE_OPEN, GUI.IO_MODE_FILE)
- filesystemChooser.onSubmit = function(path)
- mainContainer:addChild(GUI.image(2, 2, image.load(path)))
- end
- --------------------------------------------------------------------------------
- mainContainer:drawOnScreen(true)
- mainContainer:startEventHandling()
Advertisement
Add Comment
Please, Sign In to add comment