Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("arcui")
- monX, monY = term.getSize()
- arcui.drawWindow("Progress Tester")
- arcui.drawButton("btn_plus", 1, 3, 3, 5, colors.green, "+")
- arcui.drawButton("btn_moins", 5, 3, 8, 5, colors.red, "-")
- arcui.drawButton("btn_disable", 10, 3, monX, 5, colors.orange, "Disable progress")
- arcui.drawButton("btn_dis_mar", 1, 7, monX, 7, colors.orange, "Disable marquee")
- arcui.drawButton("btn_en_mar", 1, 9, monX, 9, colors.yellow, "Enable marquee")
- arcui.drawButton("btn_enable", 1, monY, monX, monY, colors.yellow, "Enable progress")
- arcui.drawProgress("prg_test", 1, 10, monX, monX, 30)
- arcui.drawProgress("prg_anim", 10, 16, 30, 20, 12)
- arcui.drawMarqueeProgress("mar_test", 1, 12, 18)
- arcui.drawMarqueeProgress("mar_test_1", 3, 14, 11)
- function loop()
- while true do
- event, a1 = os.pullEvent()
- if event == "button_close_clicked" then
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(1, 1)
- return true
- elseif event == "button_clicked" then
- if a1 == "btn_plus" then
- arcui.changeValue("prg_test", "value", arcui.widgets["prg_test"]["value"] + 1)
- elseif a1 == "btn_moins" then
- arcui.changeValue("prg_test", "value", arcui.widgets["prg_test"]["value"] - 1)
- elseif a1 == "btn_disable" then
- arcui.changeValue("prg_test", "enabled", "false")
- elseif a1 == "btn_dis_mar" then
- arcui.changeValue("mar_test", "enabled", "false")
- elseif a1 == "btn_en_mar" then
- arcui.changeValue("mar_test", "enabled", "true")
- elseif a1 == "btn_enable" then
- arcui.changeValue("prg_test", "enabled", "true")
- end
- end
- end
- end
- parallel.waitForAll(loop, arcui.eventHandler, arcui.marqueeAnim, arcui.progressAnim)
Advertisement
Add Comment
Please, Sign In to add comment