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.
YimMenu/src/gui/components/input_text.cpp

16 lines
435 B
C++
Raw Normal View History

#include "fiber_pool.hpp"
#include "gui/components/components.hpp"
#include "natives.hpp"
namespace big
{
void components::input_text(const std::string_view label, char* buf, size_t buf_size, ImGuiInputTextFlags_ flag, std::function<void()> cb)
{
if (ImGui::InputText(label.data(), buf, buf_size, flag))
if (cb)
g_fiber_pool->queue_job(std::move(cb));
if (ImGui::IsItemActive())
g.self.hud.typing = TYPING_TICKS;
}
}