Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local nebula = require('nebula')
- local nebulaApp = nebula.createApplication("default", nil, colors.white)
- local neatlabel
- local button1
- local function setLabel() end
- local button1 = nebulaApp.addChild("button", 2, 4, "", function()
- if neatlabel then
- neatLabel = nil
- else
- neatlabel = nebulaApp.addChild("label", 2, 6, "cheese smelly")
- end
- setLabel()
- end)
- setLabel = function()
- if not neatLabel then
- button1.text = "Make a label"
- else
- button1.text = "Destroy label"
- end
- end
- local label1 = nebulaApp.addChild("label", 2, 2, "Hello world")
- setLabel()
- nebula.draw()
- nebula.init()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement