diff --git a/Library/README.md b/Library/README.md index e69de29..aa5880d 100644 --- a/Library/README.md +++ b/Library/README.md @@ -0,0 +1,162 @@ +# Orion Library +This documentation is for the stable release of Orion Library. + +## Booting the Library +```lua +local JustHub = loadstring(game:HttpGet(('https://git.warceuproject.org/Apapapa/AutoFarm/raw/branch/main/Library/testing2.lua')))() +``` + + + +## Creating a Window +```lua +JustHub:InitializeUI({Name = "Just Hub", Theme = "Purple"}) + +wait(6) --Timer Loading Screen + +if not JustHub.Window then + warn("Window belum dibuat.") + return + end + + local window = JustHub.Window + +--[[ +Name = - The name of the UI. +Theme = - Themes(Colors Ui) + +List Theme > Darker,Dark,Purple,Light,Neon +]] +``` + + + +## Creating a Tab +```lua + local Tab = window:addTab("•Home") + +--[[ +local Tab = window:addTab("Your Name Tabs") - The name of the tab. +]] +``` +## Creating a Section +```lua +local Section = Tab:addSection("Home Section", 120) + +--[[ +local Section = Tab:addSection("Your Name Section", 120) - The name of the section and size. +]] +``` + + +## Notifying the user +```lua +JustHub:Notify({ + Title = "Notification", + Message = "UI berhasil dibuat!", + Duration = 5}), + +--[[ +Title = - The title of the notification. +Message = - The content of the notification. +Duration = - The duration of the notfication. +]] +``` + + + +## Creating a Button +```lua +Section:addButton({ + Name = "Execute", + ButtonText = "Run", + Callback = function() + print("Button clicked!") + end +}) + +--[[ +Name = - The name of the button. +ButtonText = - The name of button +Callback = - The function of the button. +]] +``` + +## Creating a Checkbox toggle +```lua +Section:addToggle({ + Name = "Toggle", + Default = false, + Callback = function(state) + print("Toggle state:", state) + end +}) + +--[[ +Name = - The name of the toggle. +Default = - The default value of the toggle. +Callback = - The function of the toggle +--)]] +``` + +## Creat Slider +```Lua +Section:addSlider({ + Name = "Slider Example", + Min = 0, + Max = 100, + Default = 50, + Callback = function(value) + print("Slider value:", value) + end +}) +--[[ +Name = - The name of the slider. +Min = - The minimal value of the slider. +Max = - The maxium value of the slider. +Default = - The default value slider +Callback = - The function of the slider. +]] +``` + +## Creating an Textbox Input +```lua +Section:AddTextbox({ + Name = "Textbox", + Default = "default box input", + Callback = function(Value) + print(Value) + end +}) + +--[[ +Name = - The name of the textbox. +Default = - The default value of the textbox. +Callback = - The function of the textbox. +]] +``` + + +## Creating a Dropdown menu +```lua +Section:addDropdown({ + Name = "Dropdown Example", + Default = "", + Items = {"Option 1", "Option 2", "Option 3"}, + Callback = function(selected) + print("Dropdown selected:", selected) + end +}) + +--[[ +Name = - The name of the dropdown. +Default = - The default value of the dropdown. +Items = - The options in the dropdown. +Callback = - The function of the dropdown. +]] +``` + +## Destroying the Interface +```lua +JustHub:Destroy() +``` \ No newline at end of file