satdump/plugins/wip_tracking_app/main.cpp

34 lines
945 B
C++
Raw Permalink Normal View History

2025-05-10 22:20:46 +02:00
#include "core/plugin.h"
#include "logger.h"
#include "explorer/explorer.h"
2025-05-10 22:20:46 +02:00
#include "tracking.h"
class WipTrackingAppPlugin : public satdump::Plugin
{
public:
std::string getID() { return "wiptracking_app"; }
void init()
{
2025-05-18 20:05:55 +02:00
// TODOREWORK maybe a way to call up/init a handler?
2025-07-24 21:55:57 +02:00
satdump::eventBus->register_handler<satdump::explorer::RenderLoadMenuElementsEvent>(renderExplorerLoaderButton);
2025-05-10 22:20:46 +02:00
}
2025-07-24 21:55:57 +02:00
static void renderExplorerLoaderButton(const satdump::explorer::RenderLoadMenuElementsEvent &evt)
2025-05-10 22:20:46 +02:00
{
2025-08-12 11:04:46 +02:00
if (ImGui::BeginMenu("Add"))
2025-05-18 20:05:55 +02:00
{
2025-06-22 12:21:12 +02:00
if (ImGui::BeginMenu("Tools"))
2025-05-18 20:05:55 +02:00
{
if (ImGui::MenuItem("WIP Tracking"))
evt.master_handler->addSubHandler(std::make_shared<satdump::WipTrackingHandler>());
ImGui::EndMenu();
}
ImGui::EndMenu();
}
} // TODOREWORK
2025-05-10 22:20:46 +02:00
};
PLUGIN_LOADER(WipTrackingAppPlugin)