| 495 | } |
| 496 | |
| 497 | void Window::SetControlMode(ControlMode mode) { |
| 498 | if (currentControlMode == mode) |
| 499 | return; |
| 500 | currentControlMode = mode; |
| 501 | // Reset any control state when switching modes |
| 502 | switch (currentControlMode) { |
| 503 | case CONTROL_FIRST_PERSON: |
| 504 | firstPersonControls->reset(); |
| 505 | break; |
| 506 | case CONTROL_ARCBALL: |
| 507 | arcballControls->reset(); |
| 508 | break; |
| 509 | case CONTROL_SELECTION: |
| 510 | // Auto-open selection controls when switching to selection mode |
| 511 | ui->SetSelectionControls(true); |
| 512 | // Don't reset selection when switching to selection mode |
| 513 | // This preserves the active selection for inspection while navigating |
| 514 | break; |
| 515 | } |
| 516 | } |
| 517 | |
| 518 | // Static GLFW Callbacks |
| 519 | void Window::FramebufferSizeCallback(GLFWwindow* window, int width, int height) { |
no test coverage detected