function imgui.Hint(text, delay, action)
if imgui.IsItemHovered() then
if go_hint == nil then go_hint = os.clock() + (delay and delay or 0.0) end
local alpha = (os.clock() - go_hint) * 5
if os.clock() >= go_hint then
imgui.PushStyleVar(imgui.StyleVar.WindowPadding, imgui.ImVec2(10, 10))
imgui.PushStyleVar(imgui.StyleVar.Alpha, (alpha <= 1.0 and alpha or 1.0))
imgui.PushStyleColor(imgui.Col.PopupBg, imgui.ImVec4(0.11, 0.11, 0.11, 1.00))
imgui.BeginTooltip()
imgui.PushTextWrapPos(450)
imgui.TextColored(imgui.GetStyle().Colors[imgui.Col.ButtonHovered], u8' Подсказка:')
imgui.TextUnformatted(text)
if action ~= nil then
imgui.TextColored(imgui.GetStyle().Colors[imgui.Col.TextDisabled], '\n '..action)
end
if not imgui.IsItemVisible() and imgui.GetStyle().Alpha == 1.0 then go_hint = nil end
imgui.PopTextWrapPos()
imgui.EndTooltip()
imgui.PopStyleColor()
imgui.PopStyleVar(2)
end
end
end