Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cobalt = dofile( "cobalt" )
- cobalt.ui = dofile( "cobalt-ui/init.lua" )
- local Panel = cobalt.ui.new({ w = "50%", marginleft="25%", h = "50%", margintop = "25%" })
- local Button = Panel:add("button", { wrap="center", y = 4})
- Button.onclick = function()
- Button.backColour = 2 ^ math.random( 1, 15 )
- end
- function cobalt.draw()
- cobalt.ui.draw()
- end
- function cobalt.mousepressed( x, y, button )
- cobalt.ui.mousepressed( x, y, button )
- end
- function cobalt.mousereleased( x, y, button )
- cobalt.ui.mousereleased( x, y, button )
- end
- cobalt.initLoop()
Add Comment
Please, Sign In to add comment