This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.

29 lines
824 B
C++
Raw Normal View History

#include "gui/components/components.hpp"
#include "fiber_pool.hpp"
namespace big
{
bool components::selectable(const std::string_view text, bool selected)
{
return ImGui::Selectable(text.data(), selected);
}
bool components::selectable(const std::string_view text, bool selected, ImGuiSelectableFlags flag)
{
return ImGui::Selectable(text.data(), selected, flag);
}
void components::selectable(const std::string_view text, bool selected, std::function<void()> cb)
{
if (components::selectable(text.data(), selected))
g_fiber_pool->queue_job(std::move(cb));
}
void components::selectable(const std::string_view text, bool selected, ImGuiSelectableFlags flag, std::function<void()> cb)
{
if (components::selectable(text.data(), selected, flag))
{
g_fiber_pool->queue_job(std::move(cb));
}
}
}