TmpMenu/src/gui/components/script_patch_checkbox.cpp
maybegreat48 97a8c5d60b Add more spoofing options and added clang-format (#1020)
* feat(Spoofing): add spoofing
* feat(Spoofing): prepare code for player attach
* remove(PlayerAttach): isn't going to work due to netsync architecture
* fix(GUI): fix scaling
* feat(Project): add clang-format file
* feat(Classes): update classes
* fix(BlackHole): remove unnecessary cleanup
* fix(Formatting): fix formatting for initializer lists
* feat(clang-format): Set tab width and 1 space before comment

Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
2023-03-01 21:27:15 +00:00

25 lines
520 B
C++

#include "components.hpp"
#include "fiber_pool.hpp"
#include "services/script_patcher/script_patcher_service.hpp"
namespace big
{
bool components::script_patch_checkbox(const std::string_view text, bool* option, const std::string_view tooltip)
{
bool ret = ImGui::Checkbox(text.data(), option);
if (ret)
{
g_fiber_pool->queue_job([] {
g_script_patcher_service->update();
});
}
if (!tooltip.empty())
{
if (ImGui::IsItemHovered())
ImGui::SetTooltip(tooltip.data());
}
return ret;
}
}