Fixed example. PR #671.

This commit is contained in:
Branimir Karadžić 2016-01-31 20:38:14 -08:00
parent 016bfc4290
commit ed061b62fc

View File

@ -436,13 +436,15 @@ class Terrain : public entry::AppI
imguiEndScrollArea();
imguiEndFrame();
// Update camera.
cameraUpdate(deltaTime, m_mouseState);
bool leftMouseButtonDown = !!m_mouseState.m_buttons[entry::MouseButton::Left];
if (leftMouseButtonDown)
if (!imguiMouseOverArea() )
{
mousePickTerrain();
// Update camera.
cameraUpdate(deltaTime, m_mouseState);
if (!!m_mouseState.m_buttons[entry::MouseButton::Left])
{
mousePickTerrain();
}
}
// Update terrain.