Files
Archimedes/src/example_apps/ImguiEmbed/ImguiEmbed.cpp
2025-04-10 14:18:42 -05:00

32 lines
625 B
C++

#include "ImguiEmbed.h"
void ImguiEmbed::run() {
for(auto m : runOrder)
modules[m]->onLoad();
// Main loop
while (!done && !runOrder.empty()) {
for(auto m : runOrder) {
modules[m]->run();
}
for(auto m : toClose) {
unload(m);
}
toClose.clear();
for(auto m : toOpen) {
if(std::holds_alternative<std::string>(m)) {
load(std::get<std::string>(m))->onLoad();
} else {
load(std::get<Archimedes::Module*>(m))->onLoad();
}
}
toOpen.clear();
}
}