Added welcome tab

This commit is contained in:
Cooldude2606
2020-03-24 18:41:57 +00:00
parent 162d586b34
commit 53ec32c832
5 changed files with 119 additions and 13 deletions

View File

@@ -215,4 +215,28 @@ end)
local frame_style = element.parent.style
frame_style.padding = 2
frame_style.minimal_width = width
end)
--[[-- Used to make a solid white bar in a gui
@element Gui.bar
@tparam LuaGuiElement parent the parent element to which the container will be added
@tparam number width the width of the bar that will be made, if not given bar will strech to fill the parent
@usage-- Adding a bar to a gui
local bar = Gui.bar(parent, 100)
]]
Gui.bar =
Gui.element(function(_,parent)
return parent.add{
type = 'progressbar',
size = 1,
value = 1
}
end)
:style(function(style,_,width)
style.height = 3
style.color = {r=255,g=255,b=255}
if width then style.width = width
else style.horizontally_stretchable = true end
end)