Update mod_menu.cpp

This commit is contained in:
Pepe20129 2025-01-15 15:55:38 +01:00
commit 9a8b87d431

View file

@ -116,6 +116,10 @@ void AfterModChange() {
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame(); Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
} }
void DrawModInfo(std::string file) {
ImGui::Text(file.c_str());
}
void ModMenuWindow::DrawElement() { void ModMenuWindow::DrawElement() {
if (ImGui::Button("Update")) { if (ImGui::Button("Update")) {
UpdateModFiles(); UpdateModFiles();
@ -141,7 +145,7 @@ void ModMenuWindow::DrawElement() {
AfterModChange(); AfterModChange();
} }
ImGui::SameLine(); ImGui::SameLine();
ImGui::Text(file.c_str()); DrawModInfo(file);
} }
} else { } else {
ImGui::Text("<None>"); ImGui::Text("<None>");
@ -162,7 +166,7 @@ void ModMenuWindow::DrawElement() {
AfterModChange(); AfterModChange();
} }
ImGui::SameLine(); ImGui::SameLine();
ImGui::Text(file.c_str()); DrawModInfo(file);
} }
} else { } else {
ImGui::Text("<None>"); ImGui::Text("<None>");