-- Imgui
imgui.CenterText('Text')
--
function imgui.CenterText(text, color)
color = color or imgui.GetStyle().Colors[imgui.Col.Text]
local width = imgui.GetWindowWidth()
for line in text:gmatch('[^\n]+') do
local lenght = imgui.CalcTextSize(line).x
imgui.SetCursorPosX((width - lenght) / 2)
imgui.TextColored(color, line)
end
end