Skip to content

Commit adea6e4

Browse files
author
AliksusFootages
committed
Changed link
1 parent 14c2d2c commit adea6e4

File tree

2 files changed

+193
-38
lines changed

2 files changed

+193
-38
lines changed

Example.lua

Lines changed: 190 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
local WindUI = loadstring(game:HttpGet("https://raw.githubusercontent.com/Footagesus/WindUI/refs/heads/main/dist/main.lua"))()
1+
local WindUI = loadstring(game:HttpGet("https://tree-hub.vercel.app/api/UI/WindUI"))()
22

33
local Window = WindUI:CreateWindow({
44
Title = "WindUI Library", -- UI Title
@@ -14,7 +14,7 @@ local Window = WindUI:CreateWindow({
1414
},
1515
Transparent = true,-- UI Transparency
1616
Theme = "Dark", -- UI Theme
17-
SideBarWidth = 170, -- UI Sidebar Width (number)
17+
SideBarWidth = 200, -- UI Sidebar Width (number)
1818
HasOutline = false, -- Adds Oultines to the window
1919
})
2020

@@ -70,13 +70,17 @@ local WindowTab = Window:Tab({
7070
Title = "Window and File Configuration",
7171
Icon = "settings",
7272
})
73+
local CreateThemeTab = Window:Tab({
74+
Title = "Create theme",
75+
Icon = "palette",
76+
})
7377

7478
local Divider = Window:Divider()
7579

7680
for i=1, 20 do
7781
Window:Tab({
78-
Title = "Just A Tab",
79-
Image = "Grid"
82+
Title = "Just An Empty Tab",
83+
Image = "grid"
8084
})
8185
end
8286

@@ -109,6 +113,51 @@ local Paragraph = MainTab:Paragraph({
109113
Title = "Paragraph without content",
110114
})
111115

116+
MainTab:Section({ Title = "Code" })
117+
118+
MainTab:Code({
119+
Title = "main.lua",
120+
Code = [[-- This is a simple Lua script
121+
local message = "hi"
122+
print(message)
123+
124+
-- Condition check
125+
if message == "hi" then
126+
print("Hello, world!")
127+
end
128+
129+
local function pisun(a,b)
130+
return print(a,b)
131+
end
132+
133+
pisun("hello", "world")]],
134+
})
135+
136+
MainTab:Code({
137+
Title = "Example.lua",
138+
Code = [[local WindUI = loadstring(game:HttpGet("https://raw.githubusercontent.com/Footagesus/WindUI/refs/heads/main/dist/main.lua"))()
139+
140+
local Window = WindUI:CreateWindow({
141+
Title = "WindUI Library", -- UI Title
142+
Icon = "image", -- Url or rbxassetid or lucide
143+
Author = ".ftgs", -- Author & Creator
144+
Folder = "CloudHub", -- Folder name for saving data (And key)
145+
Size = UDim2.fromOffset(580, 460), -- UI Size
146+
KeySystem = { -- Creates key system
147+
Key = "1234", -- key
148+
Note = "The Key is 1234", -- Note
149+
URL = "https://github.com/Footagesus/WindUI", -- URL To get key (example: Discord)
150+
SaveKey = true, -- Saves the key in the folder specified above
151+
},
152+
Transparent = true,-- UI Transparency
153+
Theme = "Dark", -- UI Theme
154+
SideBarWidth = 170, -- UI Sidebar Width (number)
155+
HasOutline = true, -- Adds Oultines to the window
156+
})
157+
158+
]],
159+
})
160+
112161
Paragraph1:SetTitle("New Title!")
113162
Paragraph1:SetDesc("New Description!")
114163

@@ -356,6 +405,7 @@ local Button = NotificationTab:Button({
356405
WindUI:Notify({
357406
Title = "Notification",
358407
Content = "Content",
408+
Icon = "eye",
359409
Duration = 5,
360410
})
361411
end,
@@ -365,34 +415,44 @@ local Button = NotificationTab:Button({
365415
Desc = "Long Notify Button Desc",
366416
Callback = function()
367417
WindUI:Notify({
368-
Title = "Notification LONG AND BIG",
369-
Content = "Content LON GGGGG EEE RRR AND BIGGER ",
418+
Title = "Notification LONG AND BIG a a a a a ",
419+
Content = "Content LON GGGGG EEE RRR AND BIGGER aaaaaaaaa",
420+
Icon = "droplet",
370421
Duration = 200,
371422
})
372423
end,
373424
})
374-
local Button = NotificationTab:Button({
375-
Title = "Notification with buttons",
376-
Desc = "Notify with buttons and Callback",
377-
Callback = function()
378-
local Notification
379-
Notification = WindUI:Notify({
380-
Title = "Question",
381-
Content = "Would you like to die?",
382-
CanClose = false, -- dont allow to close the notification
383-
--Duration = 5, -- removing duration
384-
Callback = function(Button) -- Callback
385-
if Button == "Confirm" then
386-
game.Players.LocalPlayer.Character.Humanoid.Health = 0
387-
else
388-
print("Canceled..")
389-
end
390-
-- Closing Notification
391-
Notification:Close()
392-
end
393-
})
394-
end,
395-
})
425+
426+
-- Outdated
427+
428+
-- local Button = NotificationTab:Button({
429+
-- Title = "Notification with buttons",
430+
-- Desc = "Notify with buttons and Callback",
431+
-- Callback = function()
432+
-- local Notification
433+
-- Notification = WindUI:Notify({
434+
-- Title = "Question",
435+
-- Content = "Would you like to die?",
436+
-- Icon = "circle-help",
437+
-- CanClose = false, -- dont allow to close the notification
438+
-- --Duration = 5, -- removing duration
439+
-- Buttons = { -- Buttons
440+
-- {
441+
-- Name = "Yes",
442+
-- Callback = function()
443+
-- game.Players.LocalPlayer.Character.Humanoid.Health = 0
444+
-- end
445+
-- },
446+
-- {
447+
-- Name = "Nope",
448+
-- Callback = function()
449+
-- print("Cancelled...")
450+
-- end
451+
-- },
452+
-- }
453+
-- })
454+
-- end,
455+
-- })
396456

397457

398458
-- Window Tab
@@ -452,7 +512,7 @@ end
452512
WindowTab:Section({ Title = "Window" })
453513

454514
local themeValues = {}
455-
for name, _ in pairs(Window:GetThemes()) do
515+
for name, _ in pairs(WindUI:GetThemes()) do
456516
table.insert(themeValues, name)
457517
end
458518

@@ -466,14 +526,14 @@ local themeDropdown = WindowTab:Dropdown({
466526
WindUI:SetTheme(theme)
467527
end
468528
})
469-
themeDropdown:Select(Window:GetCurrentTheme())
529+
themeDropdown:Select(WindUI:GetCurrentTheme())
470530

471531
local ToggleTransparency = WindowTab:Toggle({
472532
Title = "Toggle Window Transparency",
473533
Callback = function(e)
474534
Window:ToggleTransparency(e)
475535
end,
476-
Value = Window:GetTransparency()
536+
Value = WindUI:GetTransparency()
477537
})
478538

479539
WindowTab:Section({ Title = "Save" })
@@ -491,7 +551,7 @@ WindowTab:Button({
491551
Title = "Save File",
492552
Callback = function()
493553
if fileNameInput ~= "" then
494-
SaveFile(fileNameInput, { Transparent = Window:GetTransparency(), Theme = Window:GetCurrentTheme() })
554+
SaveFile(fileNameInput, { Transparent = WindUI:GetTransparency(), Theme = WindUI:GetCurrentTheme() })
495555
end
496556
end
497557
})
@@ -526,7 +586,7 @@ WindowTab:Button({
526586
Window:ToggleTransparency(data.Transparent)
527587
ToggleTransparency:SetValue(data.Transparent)
528588
end
529-
if data.Theme then Window:SetTheme(data.Theme) end
589+
if data.Theme then WindUI:SetTheme(data.Theme) end
530590
end
531591
end
532592
end
@@ -536,7 +596,7 @@ WindowTab:Button({
536596
Title = "Overwrite File",
537597
Callback = function()
538598
if fileNameInput ~= "" then
539-
SaveFile(fileNameInput, { Transparent = Window:GetTransparency(), Theme = Window:GetCurrentTheme() })
599+
SaveFile(fileNameInput, { Transparent = WindUI:GetTransparency(), Theme = WindUI:GetCurrentTheme() })
540600
end
541601
end
542602
})
@@ -557,6 +617,32 @@ WindowTab:Button({
557617

558618

559619

620+
BlockedElementsTab:Code({
621+
Title = "Blocked_Example.lua",
622+
Locked = true,
623+
Code = [[local WindUI = loadstring(game:HttpGet("https://raw.githubusercontent.com/Footagesus/WindUI/refs/heads/main/dist/main.lua"))()
624+
625+
local Window = WindUI:CreateWindow({
626+
Title = "WindUI Library", -- UI Title
627+
Icon = "image", -- Url or rbxassetid or lucide
628+
Author = ".ftgs", -- Author & Creator
629+
Folder = "CloudHub", -- Folder name for saving data (And key)
630+
Size = UDim2.fromOffset(580, 460), -- UI Size
631+
KeySystem = { -- Creates key system
632+
Key = "1234", -- key
633+
Note = "The Key is 1234", -- Note
634+
URL = "https://github.com/Footagesus/WindUI", -- URL To get key (example: Discord)
635+
SaveKey = true, -- Saves the key in the folder specified above
636+
},
637+
Transparent = true,-- UI Transparency
638+
Theme = "Dark", -- UI Theme
639+
SideBarWidth = 170, -- UI Sidebar Width (number)
640+
HasOutline = true, -- Adds Oultines to the window
641+
})
642+
643+
]],
644+
})
645+
560646

561647
local Button = BlockedElementsTab:Button({
562648
Title = "Blocked Button",
@@ -652,4 +738,73 @@ local Colorpicker = BlockedElementsTab:Colorpicker({
652738
})
653739

654740
--- Unlock
655-
Colorpicker:Unlock()
741+
Colorpicker:Unlock()
742+
743+
744+
---
745+
746+
local currentThemeName = WindUI:GetCurrentTheme()
747+
local themes = WindUI:GetThemes()
748+
749+
local ThemeAccent = themes[currentThemeName].Accent
750+
local ThemeOutline = themes[currentThemeName].Outline
751+
local ThemeText = themes[currentThemeName].Text
752+
local ThemePlaceholderText = themes[currentThemeName].PlaceholderText
753+
754+
function updateTheme()
755+
WindUI:AddTheme({
756+
Name = currentThemeName,
757+
Accent = ThemeAccent,
758+
Outline = ThemeOutline,
759+
Text = ThemeText,
760+
PlaceholderText = ThemePlaceholderText
761+
})
762+
WindUI:SetTheme(currentThemeName)
763+
end
764+
765+
local CreateInput = CreateThemeTab:Input({
766+
Title = "Theme Name",
767+
Value = currentThemeName,
768+
Callback = function(name)
769+
currentThemeName = name
770+
end
771+
})
772+
773+
CreateThemeTab:Colorpicker({
774+
Title = "Background Color",
775+
Default = Color3.fromHex(ThemeAccent),
776+
Callback = function(color)
777+
ThemeAccent = color:ToHex()
778+
end
779+
})
780+
781+
CreateThemeTab:Colorpicker({
782+
Title = "Outline Color",
783+
Default = Color3.fromHex(ThemeOutline),
784+
Callback = function(color)
785+
ThemeOutline = color:ToHex()
786+
end
787+
})
788+
789+
CreateThemeTab:Colorpicker({
790+
Title = "Text Color",
791+
Default = Color3.fromHex(ThemeText),
792+
Callback = function(color)
793+
ThemeText = color:ToHex()
794+
end
795+
})
796+
797+
CreateThemeTab:Colorpicker({
798+
Title = "Placeholder Text Color",
799+
Default = Color3.fromHex(ThemePlaceholderText),
800+
Callback = function(color)
801+
ThemePlaceholderText = color:ToHex()
802+
end
803+
})
804+
805+
CreateThemeTab:Button({
806+
Title = "Update Theme",
807+
Callback = function()
808+
updateTheme()
809+
end
810+
})

docs/documentation/getting-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ On this page
66
## Load Window
77
### Latest version <Badge type="info">Recommended</Badge>
88
```lua
9-
local WindUI = loadstring(game:HttpGet("https://raw.githubusercontent.com/Footagesus/WindUI/refs/heads/main/dist/main.lua"))()
9+
local WindUI = loadstring(game:HttpGet("https://tree-hub.vercel.app/api/UI/WindUI"))()
1010
```
1111

1212
### Selected version
1313
```lua
14-
local Version = "1.1.9"
15-
local WindUI = loadstring(game:HttpGet("https://github.com/Footagesus/WindUI/releases/download/" .. Version .. "/main.lua"))()
14+
local Version = "1.4.0"
15+
local WindUI = loadstring(game:HttpGet("https://tree-hub.vercel.app/api/UI/WindUI/" .. Version))()
1616
```
1717

1818
## Window

0 commit comments

Comments
 (0)