satdump/plugins/wip_settings_editor_app/main.cpp

30 lines
891 B
C++
Raw Permalink Normal View History

2025-07-05 19:25:49 +02:00
#include "core/plugin.h"
#include "logger.h"
#include "explorer/explorer.h"
#include "settings_editor.h"
class WipSettingsEditorAppPlugin : public satdump::Plugin
{
public:
std::string getID() { return "wipsettings_app"; }
2025-07-24 21:55:57 +02:00
void init() { satdump::eventBus->register_handler<satdump::explorer::RenderLoadMenuElementsEvent>(renderExplorerLoaderButton); }
2025-07-05 19:25:49 +02:00
2025-07-24 21:55:57 +02:00
static void renderExplorerLoaderButton(const satdump::explorer::RenderLoadMenuElementsEvent &evt)
2025-07-05 19:25:49 +02:00
{
2025-08-12 11:04:46 +02:00
if (ImGui::BeginMenu("Add"))
2025-07-05 19:25:49 +02:00
{
if (ImGui::BeginMenu("Tools"))
{
2025-07-05 19:30:51 +02:00
if (ImGui::MenuItem("Instrument Config Editor"))
2025-07-05 19:25:49 +02:00
evt.master_handler->addSubHandler(std::make_shared<satdump::WipSettingsEditorHandler>());
ImGui::EndMenu();
}
ImGui::EndMenu();
}
}
};
PLUGIN_LOADER(WipSettingsEditorAppPlugin)