fix: tooltip visibility when cursor is hidden

This commit is contained in:
MihailRis
2024-05-25 06:24:54 +03:00
parent e3989cb178
commit cc27e4b224
4 changed files with 23 additions and 5 deletions
+6 -2
View File
@@ -87,8 +87,6 @@ void GUI::updateTooltip(float delta) {
/// @brief Mouse related input and logic handling
void GUI::actMouse(float delta) {
updateTooltip(delta);
float mouseDelta = glm::length(Events::delta);
doubleClicked = false;
doubleClickTimer += delta + mouseDelta * 0.1f;
@@ -177,8 +175,14 @@ void GUI::act(float delta, const Viewport& vp) {
container->act(delta);
auto prevfocus = focus;
updateTooltip(delta);
if (!Events::_cursor_locked) {
actMouse(delta);
} else {
if (hover) {
hover->setHover(false);
hover = nullptr;
}
}
if (focus) {