| 707 | } |
| 708 | |
| 709 | bool Sample::MousePosUpdate(double xpos, double ypos) |
| 710 | { |
| 711 | if (!(m_sampleGame && m_sampleGame->CameraActive())) |
| 712 | m_camera.MousePosUpdate(xpos, ypos); |
| 713 | if (m_sampleGame) m_sampleGame->MousePosUpdate(xpos /** upscalingScale.x*/, ypos /** upscalingScale.y*/); |
| 714 | |
| 715 | float2 upscalingScale = float2(1,1); |
| 716 | if (m_renderTargets != nullptr) |
| 717 | upscalingScale = float2(m_renderSize)/float2(m_displaySize); |
| 718 | |
| 719 | m_pickPosition = uint2( static_cast<uint>( xpos * upscalingScale.x ), static_cast<uint>( ypos * upscalingScale.y ) ); |
| 720 | m_ui.MousePos = uint2( static_cast<uint>( xpos * upscalingScale.x ), static_cast<uint>( ypos * upscalingScale.y ) ); |
| 721 | |
| 722 | if (m_zoomTool) m_zoomTool->MousePosUpdate( xpos, ypos ); |
| 723 | |
| 724 | return true; |
| 725 | } |
| 726 | |
| 727 | bool Sample::MouseButtonUpdate(int button, int action, int mods) |
| 728 | { |
nothing calls this directly
no test coverage detected