use std::any
This commit is contained in:
@@ -78,22 +78,8 @@ void ImguiModule::onLoad() {
|
||||
|
||||
#if WINDOW == 2
|
||||
ecmd_it = wm->addEventFn([this](Archimedes::Event* e){
|
||||
if(e->userData != nullptr) {
|
||||
unsigned int type = app->getEventType(*e);
|
||||
|
||||
if(type == app->getEventType(Archimedes::ResizeWindowEvent())
|
||||
|| type == app->getEventType(Archimedes::CloseWindowEvent())
|
||||
|| type == app->getEventType(Archimedes::KeyPressedWindowEvent())
|
||||
|| type == app->getEventType(Archimedes::KeyReleasedWindowEvent())
|
||||
|| type == app->getEventType(Archimedes::MouseButtonPressedWindowEvent())
|
||||
|| type == app->getEventType(Archimedes::MouseButtonReleasedWindowEvent())
|
||||
|| type == app->getEventType(Archimedes::ScrollWindowEvent())
|
||||
|| type == app->getEventType(Archimedes::MouseMovedWindowEvent())
|
||||
|| type == app->getEventType(Archimedes::FocusedWindowEvent())
|
||||
|| type == app->getEventType(Archimedes::FocusLostWindowEvent())
|
||||
|| type == app->getEventType(Archimedes::MovedWindowEvent())) {
|
||||
ImGui_ImplSDL3_ProcessEvent((SDL_Event*) e->userData);
|
||||
}
|
||||
if(e->userData.type() == std::typeid(SDL_Event*)) {
|
||||
ImGui_ImplSDL3_ProcessEvent(std::any_cast<SDL_Event*>(e.userData));
|
||||
}
|
||||
});
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user