| 76 | } |
| 77 | |
| 78 | Float2 Screen::ScreenToGameViewport(const Float2& screenPos) |
| 79 | { |
| 80 | #if USE_EDITOR |
| 81 | return Editor::Managed->ScreenToGameViewport(screenPos); |
| 82 | #else |
| 83 | auto win = Engine::MainWindow; |
| 84 | return win ? win->ScreenToClient(screenPos) / win->GetDpiScale() : Float2::Minimum; |
| 85 | #endif |
| 86 | } |
| 87 | |
| 88 | Float2 Screen::GameViewportToScreen(const Float2& viewportPos) |
| 89 | { |
nothing calls this directly
no test coverage detected