Add `hooks.csv` export (#1084)

Co-authored-by: yukani <yukani@zohomail.eu>
This commit is contained in:
Pirulax 2025-05-25 12:24:02 +02:00 committed by GitHub
parent a657310384
commit bfa5a3f9d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 1 deletions

View File

@ -35,6 +35,7 @@ private:
#define NOTSA_MAKE_LOGGER notsa::Logging::GetSingleton().Create
#define NOTSA_LOG_CRIT SPDLOG_CRITICAL
#define NOTSA_LOG_INFO SPDLOG_INFO
#define NOTSA_LOG_ERR SPDLOG_ERROR
#define NOTSA_LOG_WARN SPDLOG_WARN
#define NOTSA_LOG_DEBUG SPDLOG_DEBUG

View File

@ -489,10 +489,21 @@ void HooksDebugModule::RenderCategory(RH::HookCategory& cat) {
}
void HooksDebugModule::RenderWindow() {
const notsa::ui::ScopedWindow window{ "ReversibleHooks (TM) (R)", {500.f, 700.f}, m_IsOpen };
const notsa::ui::ScopedWindow window{ "ReversibleHooks (TM) (R)", {500.f, 700.f}, m_IsOpen, ImGuiWindowFlags_MenuBar };
if (!m_IsOpen) {
return;
}
if (ImGui::BeginMenuBar()) {
if (ImGui::BeginMenu("Tools")) {
if (ImGui::MenuItem("Export hooks.csv")) {
const auto path = fs::current_path() / "hooks.csv";
ReversibleHooks::WriteHooksToFile(path);
NOTSA_LOG_INFO("Exported hooks to {:?}", path.string());
}
ImGui::EndMenu();
}
ImGui::EndMenuBar();
}
m_SlideSetter.Mode = IsMouseDown(ImGuiMouseButton_Middle)
? SlideSetterMode::TOGGLE
: IsMouseDown(ImGuiMouseButton_Right)