imgui.OnFrame(function() return main_window_state[0] end,
function(player)
imgui.SetNextWindowSize(imgui.ImVec2(400, 380), imgui.Cond.FirstUseEver)
imgui.Begin('Answer on klads', main_window_state)
imgui.PushItemWidth(380)
imgui.Text("Хорошего поиска!")
imgui.InputTextWithHint(u8'', u8'Find', findfield, 256)
imgui.Separator()
if imgui.CollapsingHeader('Связь с автором') then
imgui.TextWrapped('ВК - vk.com/mrkuroko')
imgui.TextWrapped('TELEGRAM - t.me/darkd3rk')
imgui.TextWrapped('TGK - t.me/twizzsquad')
imgui.TextWrapped('Баги кидать в телегу, я гей')
imgui.Separator()
end
local findedtext = (ffi.string(findfield)):gsub('[%(%[%%]', '')
for car, cost in pairs(ans) do
car = car:lower()
local costfind = string.gsub(cost,"[.]", "")
costfind = string.gsub(costfind,"[$]", "")
if car:find(findedtext) or costfind:find(findedtext) then
if imgui.Button(car) then setClipboardText(car) end
imgui.SameLine()
if imgui.IsItemHovered() then
imgui.BeginTooltip()
imgui.Text("Copy vopr")
imgui.EndTooltip()
end
local costtocopy = string.gsub(cost,"[.]", "")
costtocopy = string.gsub(costtocopy,"[$]", "")
if imgui.Button(cost) then setClipboardText(costtocopy) end
if imgui.IsItemHovered() then
imgui.BeginTooltip()
imgui.Text("Copy answer")
imgui.EndTooltip()
end
end
end
imgui.End()
end
)