Library API Documentation

Welcome! This documentation will guide you through creating a nice UI using the library.

Main Variable

The primary variable used in this library is Elerium/ImGUI.

Function Map

library: {
    AddWindow(string title, table options [optional]) -> {
        AddTab(string title) -> {
            AddLabel(string text)
            AddButton(string title, function callback)
            AddTextBox(string title, function callback, table options [clear = true])
            AddSwitch(string title, function callback) -> { Set(boolean statement) }
            AddSlider(string title, function callback, table options [min, max, readonly]) -> { Set(number) }
            AddKeybind(string title, function callback, table options [standard]) -> { SetKeybind(Enum keycode) }
            AddDropdown(string title, function callback) -> { Add(string title) -> { Remove() } }
            AddColorPicker(function callback) -> { Set(Color3 color) }
            AddConsole(table options) -> { Get(), Set(string input), Log(string message) }
            AddHorizontalAlignment() -> { AddButton(...) }
            AddFolder(string title) -> { Returns similar functions as AddTab }
            Show() -- Opens tab
        }
    }
    FormatWindows() -- Organizes windows
}
    

Creating a Window

local window = library:AddWindow("My Window")

Adding a Tab

local tab = window:AddTab("Main Tab")
tab:Show()

Examples

AddLabel

tab:AddLabel("Hello World!")

AddButton

tab:AddButton("Click Me", function()
    print("Button Clicked!")
end)

AddTextBox

tab:AddTextBox("Enter Name", function(text)
    print("User entered: " .. text)
end, { clear = false })

AddSwitch

local switch = tab:AddSwitch("Enable Feature", function(state)
    print("Feature Enabled: " .. tostring(state))
end)
switch:Set(true)

AddSlider

local slider = tab:AddSlider("Speed", function(value)
    print("Speed set to: " .. value)
end, { min = 10, max = 100 })
slider:Set(50)

AddDropdown

local dropdown = tab:AddDropdown("Choose Option", function(choice)
    print("Selected: " .. choice)
end)
local option1 = dropdown:Add("Option 1")
option1:Remove()

AddColorPicker

tab:AddColorPicker(function(color)
    print("Color Selected: ", color)
end)

AddConsole

tab:AddConsole({ y = 200, readonly = false, source = "Lua" })

Finalizing UI

library:FormatWindows()

Use FormatWindows() after setting up your UI to neatly arrange all windows.