| 404 | } |
| 405 | |
| 406 | bool ModelView::MouseButtonUpdate(int button, int action, int mods) |
| 407 | { |
| 408 | if (m_displayMode == DisplayMode::SplitScreen) |
| 409 | { |
| 410 | if (action == GLFW_PRESS && (button == GLFW_MOUSE_BUTTON_LEFT && mods == GLFW_MOD_SHIFT || |
| 411 | button == GLFW_MOUSE_BUTTON_RIGHT && mods == 0)) |
| 412 | { |
| 413 | m_moveSplit = true; |
| 414 | m_splitPosition = m_mousePos.x; |
| 415 | return true; |
| 416 | } |
| 417 | |
| 418 | if (action == GLFW_RELEASE && m_moveSplit) |
| 419 | { |
| 420 | m_moveSplit = false; |
| 421 | return true; |
| 422 | } |
| 423 | } |
| 424 | |
| 425 | if (action == GLFW_PRESS && button == GLFW_MOUSE_BUTTON_LEFT && mods == GLFW_MOD_CONTROL) |
| 426 | { |
| 427 | m_moveLight = true; |
| 428 | m_dragStart = m_mousePos; |
| 429 | return true; |
| 430 | } |
| 431 | |
| 432 | if (action == GLFW_RELEASE && button == GLFW_MOUSE_BUTTON_LEFT && m_moveLight) |
| 433 | { |
| 434 | m_moveLight = false; |
| 435 | return true; |
| 436 | } |
| 437 | |
| 438 | m_camera->MouseButtonUpdate(button, action, mods); |
| 439 | return true; |
| 440 | } |
| 441 | |
| 442 | bool ModelView::MouseScrollUpdate(double xoffset, double yoffset) |
| 443 | { |
nothing calls this directly
no outgoing calls
no test coverage detected