function imgui.CustomSelectable(drawlist, icon, text, is_selected)
local vec2 = imgui.GetCursorPos()
local sv2 = imgui.GetCursorScreenPos()
local width = imgui.GetWindowWidth()
local padding = 10
imgui.PushFont(icons_font)
local size = imgui.CalcTextSize(icon)
local is_clicked, is_hovered = false, false
if imgui.InvisibleButton("##"..text, imgui.ImVec2(width, size.y + padding * 2)) then is_clicked = true end
imgui.SetCursorPos(imgui.ImVec2(vec2.x + padding, vec2.y + padding))
if imgui.IsItemHovered() then is_hovered = true end
drawlist:AddRectFilled(imgui.ImVec2(sv2.x, sv2.y), imgui.ImVec2(sv2.x + width, sv2.y + size.y + padding * 2),
imgui.ColorConvertFloat4ToU32(imgui.ImVec4(0, 0, 0, is_selected and 0.6 or (is_hovered and 0.2 or 0.0))))
imgui.Text(icon)
imgui.PopFont()
imgui.SameLine()
imgui.PushFont(title_font)
imgui.Text(text)
imgui.PopFont()
imgui.SetCursorPos(imgui.ImVec2(vec2.x, vec2.y + size.y + padding * 2))
return is_clicked
end