Edit: ImGui button-Picking interaction
This commit is contained in:
@@ -1221,6 +1221,8 @@ void VulkanEngine::run()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (e.type == SDL_MOUSEBUTTONDOWN && e.button.button == SDL_BUTTON_LEFT)
|
if (e.type == SDL_MOUSEBUTTONDOWN && e.button.button == SDL_BUTTON_LEFT)
|
||||||
|
{
|
||||||
|
if (!ImGui::GetIO().WantCaptureMouse)
|
||||||
{
|
{
|
||||||
_dragState.buttonDown = true;
|
_dragState.buttonDown = true;
|
||||||
_dragState.dragging = false;
|
_dragState.dragging = false;
|
||||||
@@ -1228,6 +1230,7 @@ void VulkanEngine::run()
|
|||||||
static_cast<float>(e.button.y)};
|
static_cast<float>(e.button.y)};
|
||||||
_dragState.current = _dragState.start;
|
_dragState.current = _dragState.start;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (e.type == SDL_MOUSEBUTTONUP && e.button.button == SDL_BUTTON_LEFT)
|
if (e.type == SDL_MOUSEBUTTONUP && e.button.button == SDL_BUTTON_LEFT)
|
||||||
{
|
{
|
||||||
glm::vec2 releasePos{static_cast<float>(e.button.x),
|
glm::vec2 releasePos{static_cast<float>(e.button.x),
|
||||||
|
|||||||
Reference in New Issue
Block a user