Prevent target deselection during camera rotation

Left-click targeting now fires on mouse-up with a drag threshold so
camera rotation drags no longer clear the current target.
This commit is contained in:
Kelsi 2026-02-07 13:53:03 -08:00
parent 0ae38a59c8
commit e234ac8d7a
2 changed files with 64 additions and 48 deletions

View file

@ -173,6 +173,10 @@ private:
// Action bar drag state (-1 = not dragging)
int actionBarDragSlot_ = -1;
GLuint actionBarDragIcon_ = 0;
// Left-click targeting: distinguish click from camera drag
glm::vec2 leftClickPressPos_ = glm::vec2(0.0f);
bool leftClickWasPress_ = false;
};
} // namespace ui