2022-03-14 23:31:30 +01:00
|
|
|
#include "fiber_pool.hpp"
|
2023-03-01 21:27:15 +00:00
|
|
|
#include "gui/components/components.hpp"
|
2022-03-14 23:31:30 +01:00
|
|
|
#include "natives.hpp"
|
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
2023-03-01 21:27:15 +00:00
|
|
|
void components::input_text_with_hint(const std::string_view label, const std::string_view hint, char* buf, size_t buf_size, ImGuiInputTextFlags_ flag, std::function<void()> cb)
|
|
|
|
{
|
2022-03-14 23:31:30 +01:00
|
|
|
if (ImGui::InputTextWithHint(label.data(), hint.data(), buf, buf_size, flag))
|
|
|
|
if (cb)
|
|
|
|
g_fiber_pool->queue_job(std::move(cb));
|
|
|
|
|
|
|
|
if (ImGui::IsItemActive())
|
|
|
|
g_fiber_pool->queue_job([] {
|
|
|
|
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|