forked from bloodball/UI-Librarys
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SolarisLib
90 lines (71 loc) · 2.45 KB
/
SolarisLib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
local SolarisLib = loadstring(game:HttpGet("https://raw.githubusercontent.com/bloodball/-back-ups-for-libs/main/sol"))()
--[[SolarisLib:New({
Name - Title of the UI <string>
FolderToSave - Name of the folder where the UI files will be stored <string>
})]]
local win = SolarisLib:New({
Name = "SolarisLib",
FolderToSave = "SolarisLibStuff"
})
--win:Tab(title <string>)
local tab = win:Tab("Tab 1")
--tab:Section(title <string>)
local sec = tab:Section("Elements")
--sec:Button(title <string>, callback <function>)
sec:Button("Button", function()
SolarisLib:Notification("Test", "This is a notification test.")
end)
--sec:Toggle(title <string>,default <boolean>, flag <string>, callback <function>)
local toggle = sec:Toggle("Toggle", false,"Toggle", function(t)
print(t)
end)
--[[
toggle:Set(state <boolean>)
]]
--sec:Slider(title <string>,default <number>,max <number>,minimum <number>,increment <number>, flag <string>, callback <function>)
local slider = sec:Slider("Slider", 0,25,0,2.5,"Slider", function(t)
print(t)
end)
--[[
slider:Set(state <number>)
]]
--sec:Dropdown(title <string>,options <table>,default <string>, flag <string>, callback <function>)
local dropdown = sec:Dropdown("Dropdown", {"a","b","c","d","e"},"","Dropdown", function(t)
print(t)
end)
--[[
Dropdown:Refresh(options <table>, deletecurrent <boolean>)
Dropdown:Set(option <string>)
]]
--sec:MultiDropdown(title <string>,options <table>,default <table>, flag <string>, callback <function>)
local multidropdown =sec:MultiDropdown("Multi Dropdown", {"a","b","c","d","e"},{"b", "c"},"Dropdown", function(t)
print(table.concat(t, ", "))
end)
--[[
Dropdown:Refresh(options <table>, deletecurrent <boolean>)
Dropdown:Set(option <table>)
]]
--sec:Colorpicker(title <string>, default <color3>, flag <string>, callback <function>)
sec:Colorpicker("Colorpicker", Color3.fromRGB(255,255,255),"Colorpicker", function(t)
print(t)
end)
--sec:Textbox(title <string> ,disappear <boolean>, callback <function>)
sec:Textbox("Textbox", true, function(t)
print(t)
end)
--sec:Bind(title <string>, default <keycode>, hold <boolean>, flag <string>, callback <function>)
sec:Bind("Hold Bind", Enum.KeyCode.E, true, "BindHold", function(t)
print(t)
end)
sec:Bind("Normal Bind", Enum.KeyCode.F, false, "BindNormal", function()
print("Bind pressed")
end)
--[[
bind:Set(state <keycode>)
]]
--sec:Label(text <string>)
local label = sec:Label("Label")
--[[
label:Set(text <string>)
]]
local tab2 = win:Tab("Tab 2")