Add unload button
This commit is contained in:
@@ -30,15 +30,24 @@ void MainGUI::onLoad() {
|
||||
void MainGUI::run() {
|
||||
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
static std::string path;
|
||||
static std::string s;
|
||||
|
||||
ImGui::Begin("MainGUI Module");
|
||||
|
||||
ImGui::Text("Enter a module to load:");
|
||||
ImGui::InputText("path: ", &path);
|
||||
ImGui::Text("Active Modules:");
|
||||
for(auto m : app->getModuleNames())
|
||||
ImGui::Text("%s", m.c_str());
|
||||
|
||||
if (ImGui::Button("Button"))
|
||||
app->startModule(path);
|
||||
ImGui::Text("\nEnter a module to un/load:");
|
||||
ImGui::InputText("module: ", &s);
|
||||
|
||||
if(ImGui::Button("load"))
|
||||
app->startModule(s);
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
if(ImGui::Button("unload"))
|
||||
app->stopModule(s);
|
||||
|
||||
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
|
||||
ImGui::End();
|
||||
|
||||
Reference in New Issue
Block a user