From 79bea8c094fc2969786a8255dc084f3f3322276b Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Wed, 6 Jul 2022 20:26:53 +0200 Subject: [PATCH 01/10] Update progressBarEnergyExample.lua --- examples/progressBarEnergyExample.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/progressBarEnergyExample.lua b/examples/progressBarEnergyExample.lua index 5740e5c..aee5666 100644 --- a/examples/progressBarEnergyExample.lua +++ b/examples/progressBarEnergyExample.lua @@ -3,9 +3,9 @@ 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 "..filePath) -- this is an alternative to the wget command + shell.run("pastebin run ESs1mg7P packed true "..filePath) -- this is an alternative to the wget command end -local basalt = dofile(filePath) -- here you can change the variablename in any variablename you want default: basalt +local basalt = require(filePath) -- here you can change the variablename in any variablename you want default: basalt local energyCube = peripheral.find("ultimateEnergyCube") From 4bbdb3ba31929f2930c638787012a9536aa8d013 Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Wed, 6 Jul 2022 20:27:22 +0200 Subject: [PATCH 02/10] Update basaltPreview.lua --- examples/basaltPreview.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/basaltPreview.lua b/examples/basaltPreview.lua index 2303e7d..cd5e5fc 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 "..filePath) -- this is an alternative to the wget command + shell.run("pastebin run ESs1mg7P packed true "..filePath) -- this is an alternative to the wget command end -local basalt = dofile(filePath) -- here you can change the variablename in any variablename you want default: basalt +local basalt = require(filePath) -- here you can change the variablename in any variablename you want default: basalt local w, h = term.getSize() From 6b2f1ea946589608695efa08c5d45bd325e23951 Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Wed, 6 Jul 2022 20:30:16 +0200 Subject: [PATCH 03/10] Update Basalt.md --- docs/objects/Basalt.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/objects/Basalt.md b/docs/objects/Basalt.md index 88803a1..2d74a14 100644 --- a/docs/objects/Basalt.md +++ b/docs/objects/Basalt.md @@ -1,6 +1,6 @@ To start using Basalt you have to do the following line of code: -`local basalt = dofile("basalt.lua")` +`local basalt = require("Basalt")` remember you need the basalt.lua file on your computer! From 7c499170876786cd6104477be9f317be3ef10a8a Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Wed, 6 Jul 2022 20:35:22 +0200 Subject: [PATCH 04/10] Update mouseEvents.md --- docs/events/mouseEvents.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/events/mouseEvents.md b/docs/events/mouseEvents.md index 0c3e181..ea864cc 100644 --- a/docs/events/mouseEvents.md +++ b/docs/events/mouseEvents.md @@ -8,7 +8,7 @@ Any visual object can register onClick events. Here is a example on how to add a onClick event to your button: ```lua -local basalt = dofile("basalt.lua") +local basalt = require("Basalt") local mainFrame = basalt.createFrame("myMainFrame"):show() local button = mainFrame:addButton("myButton"):setPosition(3,3):setSize(12,3):setText("Click"):show() @@ -27,7 +27,7 @@ Any visual object can register onClickUp events. Here is a example on how to add a onClickUp event to your button: ```lua -local basalt = dofile("basalt.lua") +local basalt = require("Basalt") local mainFrame = basalt.createFrame("myMainFrame"):show() local button = mainFrame:addButton("myButton"):setPosition(3,3):setSize(12,3):setText("Click"):show() @@ -51,7 +51,7 @@ Any visual object can register onScroll events. Here is a example on how to add a onScroll event to your button: ```lua -local basalt = dofile("basalt.lua") +local basalt = require("Basalt") local mainFrame = basalt.createFrame("myMainFrame"):show() local button = mainFrame:addButton("myButton"):setPosition(3,3):setSize(12,3):setText("Click"):show() @@ -70,7 +70,7 @@ Any visual object can register onDrag events. Here is a example on how to add a onDrag event to your button: ```lua -local basalt = dofile("basalt.lua") +local basalt = require("Basalt") local mainFrame = basalt.createFrame("myMainFrame"):show() local button = mainFrame:addButton("myButton"):setPosition(3,3):setSize(12,3):setText("Click"):show() From 8945220ac314b1b1a3c9671807fe20f5b5891eec Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Wed, 6 Jul 2022 20:35:51 +0200 Subject: [PATCH 05/10] Update keyEvents.md --- docs/events/keyEvents.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/events/keyEvents.md b/docs/events/keyEvents.md index adc38fd..079fa99 100644 --- a/docs/events/keyEvents.md +++ b/docs/events/keyEvents.md @@ -8,7 +8,7 @@ Any visual object can register onKey events. Here is a example on how to add a onKey event to your frame: ```lua -local basalt = dofile("basalt.lua") +local basalt = require("Basalt") local mainFrame = basalt.createFrame("myMainFrame"):show() local subFrame = mainFrame:addFrame("subFrame"):setPosition(3,3):setSize(18,6):setBar("Sub Frame",colors.black):showBar():show() @@ -27,7 +27,7 @@ Any visual object can register onKeyUp events. Here is a example on how to add a onKeyUp event to your frame: ```lua -local basalt = dofile("basalt.lua") +local basalt = require("Basalt") local mainFrame = basalt.createFrame("myMainFrame"):show() local subFrame = mainFrame:addFrame("subFrame"):setPosition(3,3):setSize(18,6):setBar("Sub Frame",colors.black):showBar():show() From 02b4eb9f754543dc52fb68a925851cebd7de74b9 Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Wed, 6 Jul 2022 20:36:36 +0200 Subject: [PATCH 06/10] Update otherEvents.md --- docs/events/otherEvents.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/events/otherEvents.md b/docs/events/otherEvents.md index ebe2917..8ed8f3e 100644 --- a/docs/events/otherEvents.md +++ b/docs/events/otherEvents.md @@ -7,7 +7,7 @@ This is a custom event which gets triggered as soon as the function :setValue() Here is a example on how to add a onChange event to your input, and also another example for your checkbox: ```lua -local basalt = dofile("basalt.lua") +local basalt = require("Basalt") local mainFrame = basalt.createFrame("myMainFrame"):show() local aInput = mainFrame:addInput("specialInput"):setPosition(3,3):show() @@ -36,7 +36,7 @@ This is a custom event which gets triggered as soon as the parent frame gets res Here is a example on how to add a onResize event to your button: ```lua -local basalt = dofile("basalt.lua") +local basalt = require("Basalt") local mainFrame = basalt.createFrame("myMainFrame"):show() local aButton = mainFrame:addButton("myButton"):setPosition(3,3):show() @@ -53,6 +53,8 @@ aButton:onResize(onButtonResize) This event gets triggered as soon as the object loses its focus. ```lua +local basalt = require("Basalt") + local mainFrame = basalt.createFrame("myFirstFrame"):show() local aButton = mainFrame:addButton("exampleButton"):setPosition(3,3):onLoseFocus( function(self) @@ -66,6 +68,8 @@ local aButton = mainFrame:addButton("exampleButton"):setPosition(3,3):onLoseFocu This event gets triggered as soon as the object is the currently focused object. ```lua +local basalt = require("Basalt") + local mainFrame = basalt.createFrame("myFirstFrame"):show() local aButton = mainFrame:addButton("exampleButton"):setPosition(3,3):onGetFocus( function(self) From 716c946b9606410248d578a5cc6f39f99d3f9755 Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Wed, 6 Jul 2022 20:50:55 +0200 Subject: [PATCH 07/10] Update installer.md --- docs/home/installer.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/home/installer.md b/docs/home/installer.md index cddd247..4bd7895 100644 --- a/docs/home/installer.md +++ b/docs/home/installer.md @@ -8,9 +8,9 @@ Here is a very basic one which just installs basalt.lua if don't exist: --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 "..filePath) -- this is an alternative to the wget command + shell.run("pastebin run ESs1mg7P packed true "..filePath) -- this is an alternative to the wget command end -local basalt = dofile(filePath) -- here you can change the variablename in any variablename you want default: basalt +local basalt = require(filePath:gsub(".lua", "")) -- here you can change the variablename in any variablename you want default: basalt ``` ## Advanced Installer @@ -51,7 +51,7 @@ if not(fs.exists(filePath))then local event, p1,p2,p3,p4 = os.pullEvent() if(event=="mouse_click")then if(p3==math.floor(h/2+2))and(p2>=w/2-8)and(p2<=w/2-2)then - shell.run("pastebin run ESs1mg7P "..filePath) + shell.run("pastebin run ESs1mg7P packed true "..filePath) _installerWindow.setVisible(false) term.clear() break @@ -69,6 +69,6 @@ if not(fs.exists(filePath))then term.clear() end -local basalt = dofile(filePath) -- here you can change the variablename in any variablename you want default: basalt +local basalt = require(filePath:gsub(".lua", "")) -- here you can change the variablename in any variablename you want default: basalt ------------------------------ ``` From b9fd59d9619186788e7d77d91ab91fd856a95123 Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Wed, 6 Jul 2022 20:51:58 +0200 Subject: [PATCH 08/10] Update progressBarEnergyExample.lua --- examples/progressBarEnergyExample.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/progressBarEnergyExample.lua b/examples/progressBarEnergyExample.lua index aee5666..f1431aa 100644 --- a/examples/progressBarEnergyExample.lua +++ b/examples/progressBarEnergyExample.lua @@ -5,7 +5,7 @@ local filePath = "basalt.lua" --here you can change the file path default: basal if not(fs.exists(filePath))then shell.run("pastebin run ESs1mg7P packed true "..filePath) -- this is an alternative to the wget command end -local basalt = require(filePath) -- here you can change the variablename in any variablename you want default: basalt +local basalt = require(filePath:gsub(".lua", "")) -- here you can change the variablename in any variablename you want default: basalt local energyCube = peripheral.find("ultimateEnergyCube") From 5f9060dae3457b15f1ae6df96b0ed5b33d5ed35e Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Wed, 6 Jul 2022 20:52:16 +0200 Subject: [PATCH 09/10] 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 cd5e5fc..040b7b6 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("pastebin run ESs1mg7P packed true "..filePath) -- this is an alternative to the wget command end -local basalt = require(filePath) -- here you can change the variablename in any variablename you want default: basalt +local basalt = require(filePath:gsub(".lua", "")) -- here you can change the variablename in any variablename you want default: basalt local w, h = term.getSize() From 022bef3b0319377bcc823c8ae24c07f66940fd91 Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Fri, 8 Jul 2022 19:43:53 +0200 Subject: [PATCH 10/10] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index d84de99..dd9152a 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,11 @@ If you have questions, feel free to join the discord server: [https://discord.gg ## Changelogs From now on we will add changes: +#### Version 3: +- fixed monitor support +- added :setIndex() for scrollbars +- added dynamic value system (not fully done) + #### Version 2: Note: You won't get any changes for now, so don't redownload the project! (: - reworked the filesystem, now we use require instead of loadfile