mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-07-09 02:25:24 +02:00
22 lines
594 B
C++
22 lines
594 B
C++
#include <gui/menus/scripting.h>
|
|
#include <core.h>
|
|
#include <gui/style.h>
|
|
#include <imgui/imgui.h>
|
|
|
|
namespace scriptingmenu {
|
|
void init() {
|
|
|
|
}
|
|
|
|
void draw(void* ctx) {
|
|
float menuWidth = ImGui::GetContentRegionAvailWidth();
|
|
for (const auto& [name, script] : core::scriptManager.scripts) {
|
|
bool running = script->running;
|
|
if (running) { style::beginDisabled(); }
|
|
if (ImGui::Button(name.c_str(), ImVec2(menuWidth, 0))) {
|
|
script->run();
|
|
}
|
|
if (running) { style::endDisabled(); }
|
|
}
|
|
}
|
|
} |