--это всё куда нибудь в начало скрипта
render_in_menu = imgui.ImBool(false)
lock_player = imgui.ImBool(false)
show_cursor = imgui.ImBool(false)
--это всё в OnDrawFrame
local width = imgui.GetWindowWidth()
if imgui.Button("ImGui Example", imgui.ImVec2(20, width)) then
--code
end
if imgui.Button("Moon ImGui tutorial 1", imgui.ImVec2(20, width)) then
--code
end
if imgui.Button("Moon ImGui tutorial 2", imgui.ImVec2(20, width)) then -- и так далее
--code
end
if imgui.CollapsingHeader("Options") then
if imgui.CheckBox("Render in menu", render_in_menu) then
--code
end
if imgui.CheckBox("Lock Player", lock_player) then
--code
end
if imgui.CheckBox("Show cursor", show_cursor) then
--code
end
end