Merge branch 'master' of https://github.com/Pyroxenium/Basalt
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
------------------------------
|
||||
```
|
||||
|
||||
@@ -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!
|
||||
|
||||
|
||||
@@ -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:gsub(".lua", "")) -- here you can change the variablename in any variablename you want default: basalt
|
||||
|
||||
local w, h = term.getSize()
|
||||
|
||||
|
||||
@@ -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:gsub(".lua", "")) -- here you can change the variablename in any variablename you want default: basalt
|
||||
|
||||
local energyCube = peripheral.find("ultimateEnergyCube")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user