Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("GLib.lua")
- local gl = GLib
- gl:addCloseButton()
- a = gl.Text("test", 2, 2, colors.purple)
- a:blit()
- b = gl.Text("test1", 5, 3)
- b:blit()
- c = gl.Text("test2", 8, 4, colors.yellow)
- c:blit()
- p = gl.ProgressBar(3, 10, 20, 3)
- p:blit()
- bpm = gl.Button(3, 13, 10, 1, nil, nil, nil, "<--", function() p:addProgress(-0.05) end)
- bpm:blit()
- bpp = gl.Button(13, 13, 10, 1, nil, nil, nil, "-->", function() p:addProgress(0.05) end)
- bpp:blit()
- bt = gl.Text("", 16, 7)
- bt:blit()
- but = gl.Button(3, 6, 11, 3, colors.cyan, colors.blue, colors.white, "button", function() bt:setText("btn was pressed!") end)
- but:blit()
- ch = gl.CheckBox(17, 3, colors.gray, colors.white)
- ch:setSymbol("x")
- ch:blit()
- input = gl.TextInput(3, 15, 20, colors.white, colors.gray)
- input:blit()
- input1 = gl.TextInput(3, 17, 20, colors.white, colors.gray)
- input1:blit()
- inpch = gl.CheckBox(25, 17)
- inpch:setSymbol("x")
- inpch:blit()
- function loop()
- if ch:isChecked() then
- b:setColor(colors.green)
- else
- b:setColor(colors.white)
- end
- if inpch:isChecked() then
- input1:hideText(false)
- else
- input1:hideText(true)
- end
- end
- gl.mainloop(loop)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement