function imgui.CenterText(text)
local width = imgui.GetWindowWidth()
local height = imgui.GetWindowHeight()
local calc = imgui.CalcTextSize(text)
imgui.SetCursorPosX( width / 2 - calc.x / 2 )
imgui.SetCursorPosY( height / 2 - calc.y / 2 )
imgui.Text(text)
end