2023-02-01 19:46:33 +01:00
|
|
|
#include "gui/components/components.hpp"
|
|
|
|
#include "script_mgr.hpp"
|
2023-03-01 21:27:15 +00:00
|
|
|
#include "view_debug.hpp"
|
2023-02-01 19:46:33 +01:00
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
|
|
|
void debug::scripts()
|
|
|
|
{
|
|
|
|
if (ImGui::BeginTabItem("DEBUG_TAB_SCRIPTS"_T.data()))
|
|
|
|
{
|
2023-03-01 21:27:15 +00:00
|
|
|
components::sub_title("DEBUG_SCRIPTS_SUB_TITLE"_T);
|
2023-02-01 19:46:33 +01:00
|
|
|
|
2023-03-01 21:27:15 +00:00
|
|
|
for (const auto& script : g_script_mgr.scripts())
|
|
|
|
{
|
|
|
|
if (script->is_toggleable())
|
|
|
|
{
|
|
|
|
if (ImGui::Checkbox(script->name(), script->toggle_ptr()))
|
|
|
|
{
|
|
|
|
g_notification_service->push(std::string(script->name()).append(" script"), script->is_enabled() ? "Resumed" : "Halted");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::EndTabItem();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|