Skip to content

feat: ImGui lua bindings #7

@TechHog8984

Description

@TechHog8984

example:

local ImGui = game:GetService("ImGuiService")

local window_active = Instance.new("BoolValue")
window_active.Value = true

local render_connection
render_connection = ImGui.Render:Connect(function()
    if ImGui.Begin("Lua Window", window_active) then
        ImGui.Text(("Hello, %s"):format("world!"))
        if ImGui.Button("Destroy") then
            window_active.Value = false
        end
    end
    ImGui.End()

    -- disconnecting the connection should go after the button press because
    -- we don't want to omit the above End midway through
    if not window_active.Value then render_connection:Disconnect() end
end)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions