Interface

Menu and skin

Read and change the menu theme, accent color and window colors from a script.

FunctionParametersReturnsDescription
menu.is_open()boolset_open(bool), toggle(), hovered(), rect() (x, y, w, h)
menu.select_tab(name)boolmenu.tabs() lists the tab names.
menu.set_accent(Color or nil)nonenil gives the accent back to the settings. menu.accent() reads it.
menu.set_color(name, Color)noneSkin colors: window_bg, border_dark, border_light, group_dark, group_light, line, frame_*, box_off_*, text, text_active, text_title, text_dim, text_tab, text_group, text_selected, popup_border, popup_bg, picker_bg, tooltip_bg, field_bg, item_hover, item_hover_edge. menu.get_color, menu.color_names(), menu.reset_colors().
menu.settings()listEvery Luna option {path, type}. menu.setting(path), menu.set_setting(path, value), menu.save_config()
imgui.window(title, fn, w?, h?)boolInside events.menu. Widgets: text, button, checkbox, slider_float, slider_int, input_text, combo, color_edit, separator, same_line, spacing.

Accent and skin colors changed by a script are restored when it unloads.

local g = ui.Page("settings").Group("lua theme")
local accent = g.ColorPicker("accent", Color(255, 120, 180))
local background = g.ColorPicker("window background", Color(10, 10, 14))

local function apply()
    menu.set_accent(accent:get())
    menu.set_color("window_bg", background:get())
end

accent:on_change(apply)
background:on_change(apply)
apply()