WindowEvents

This commit is contained in:
2025-04-19 15:08:39 -05:00
parent 600d0f3c81
commit 87afa3a0ec
5 changed files with 289 additions and 5 deletions

View File

@@ -14,7 +14,9 @@ WindowModule::~WindowModule() {
void WindowModule::onLoad() {
window = new Archimedes::Window();
window = new Archimedes::Window([this](Archimedes::Event* e){
app->emitEvent(e);
});
renderer = new Archimedes::Renderer();
@@ -34,6 +36,12 @@ void WindowModule::run() {
app->end();
}
for(auto e : window->getWindowImpl().data.eventList) {
app->emitEvent(e);
}
window->getWindowImpl().data.eventList.clear();
window->doFrame();
}