[Mouse]
| 382 | |
| 383 | // [Mouse] |
| 384 | void SetMousePosition(const Float2& screenPosition) final override |
| 385 | { |
| 386 | #if USE_EDITOR |
| 387 | auto window = Editor::Managed->GetGameWindow(); |
| 388 | if (window == nullptr) |
| 389 | window = Engine::MainWindow; |
| 390 | #else |
| 391 | auto window = Engine::MainWindow; |
| 392 | #endif |
| 393 | Float2 position = window->ScreenToClient(screenPosition); |
| 394 | SDL_WarpMouseInWindow(static_cast<SDLWindow*>(window)->_window, position.X, position.Y); |
| 395 | |
| 396 | OnMouseMoved(screenPosition); |
| 397 | } |
| 398 | |
| 399 | void SetRelativeMode(bool relativeMode, Window* window) final override |
| 400 | { |
nothing calls this directly
no test coverage detected