WindowEvents
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user