From b01a1e3a71f3c60eac2913f6dee9172f76e81970 Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Fri, 27 May 2022 22:14:00 +0200 Subject: [PATCH 1/2] Update basaltPreview.lua added progressbar, fixed scrollbar --- examples/basaltPreview.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/examples/basaltPreview.lua b/examples/basaltPreview.lua index 0fb5995..b7c82f6 100644 --- a/examples/basaltPreview.lua +++ b/examples/basaltPreview.lua @@ -1,9 +1,9 @@ --Basalt configurated installer local filePath = "basalt.lua" --here you can change the file path default: basalt.lua if not(fs.exists(filePath))then -shell.run("pastebin run ESs1mg7P") +shell.run("wget https://raw.githubusercontent.com/NoryiE/Basalt/master/basalt.lua "..filePath) end -local basalt = dofile("basalt.lua") -- here you can change the variablename in any variablename you want default: basalt +local basalt = dofile("lib/basalt.lua") -- here you can change the variablename in any variablename you want default: basalt local w, h = term.getSize() @@ -53,9 +53,16 @@ objFrame:addLabel("radio1Label"):setPosition(37,10):setText("Radio 1"):show() objFrame:addLabel("radio2Label"):setPosition(37,12):setText("Radio 2"):show() objFrame:addLabel("radio3Label"):setPosition(37,14):setText("Radio 3"):show() -objFrame:addScrollbar("exampleScrollbar"):setPosition(objFrame:getWidth(),1):setMaxValue(objFrame:getHeight()):setSize(1,objFrame:getHeight()):setSymbolSize(3):ignoreOffset():onChange(function(self) objFrame:setOffset(0, (self:getValue()-1)) end):show():setZIndex(15) +objFrame:addScrollbar("exampleScrollbar"):setPosition(objFrame:getWidth(),1):setMaxValue(objFrame:getHeight()):setSize(1,objFrame:getHeight()):setSymbolSize(3):ignoreOffset():onChange(function(self) objFrame:setOffset(0, (self:getValue()-1)) end):setAnchor("right"):show():setZIndex(15) +local prog = objFrame:addProgressbar("exampleProgressbar"):setAnchor("bottom"):setSize(30, 3):setBackground(colors.gray):setPosition(2,3):onProgressDone(function() +basalt.debug("Progress done!") +end):show() +local timer = objFrame:addTimer("exampleTimer"):setTime(1, -1):onCall(function() + prog:setProgress(prog:getProgress()+2) +end):start() + --Program Frame: local programCount = 1 visualButton(programFrame:addButton("exampleButton"):setText("Add Shell"):setSize(13,3):setPosition(2,2):onClick(function() From 31d03b5f21b24daff0f550f602b08092257c3ab6 Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Fri, 27 May 2022 22:14:19 +0200 Subject: [PATCH 2/2] Update basaltPreview.lua --- examples/basaltPreview.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/basaltPreview.lua b/examples/basaltPreview.lua index b7c82f6..c47b0d9 100644 --- a/examples/basaltPreview.lua +++ b/examples/basaltPreview.lua @@ -3,7 +3,7 @@ local filePath = "basalt.lua" --here you can change the file path default: basal if not(fs.exists(filePath))then shell.run("wget https://raw.githubusercontent.com/NoryiE/Basalt/master/basalt.lua "..filePath) end -local basalt = dofile("lib/basalt.lua") -- here you can change the variablename in any variablename you want default: basalt +local basalt = dofile("basalt.lua") -- here you can change the variablename in any variablename you want default: basalt local w, h = term.getSize()