work on object system
This commit is contained in:
@@ -112,5 +112,29 @@ void ImguiModule::run() {
|
||||
|
||||
bool ImguiModule::onEvent(const Archimedes::Event &e) {
|
||||
|
||||
unsigned int type = app->getEventType(e);
|
||||
|
||||
ImGuiIO& io = ImGui::GetIO(); (void)io;
|
||||
|
||||
if(type == app->getEventType(Archimedes::KeyPressedWindowEvent())) {
|
||||
|
||||
return io.WantCaptureKeyboard;
|
||||
} else if(type == app->getEventType(Archimedes::KeyReleasedWindowEvent())) {
|
||||
|
||||
return io.WantCaptureKeyboard;
|
||||
} else if(type == app->getEventType(Archimedes::MouseButtonPressedWindowEvent())) {
|
||||
|
||||
return io.WantCaptureMouse;
|
||||
} else if(type == app->getEventType(Archimedes::MouseButtonReleasedWindowEvent())) {
|
||||
|
||||
return io.WantCaptureMouse;
|
||||
} else if(type == app->getEventType(Archimedes::ScrollWindowEvent())) {
|
||||
|
||||
return io.WantCaptureMouse;
|
||||
} else if(type == app->getEventType(Archimedes::MouseMovedWindowEvent())) {
|
||||
|
||||
return io.WantCaptureMouse;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user