update: tooltip conditions
This commit is contained in:
@@ -68,8 +68,6 @@ void GUI::updateTooltip(float delta) {
|
||||
if (hover == nullptr || !hover->isInside(Events::cursor)) {
|
||||
return resetTooltip();
|
||||
}
|
||||
float mouseDelta = glm::length(Events::delta);
|
||||
if (mouseDelta < 1.0f || tooltipTimer >= hover->getTooltipDelay()) {
|
||||
if (tooltipTimer + delta >= hover->getTooltipDelay()) {
|
||||
auto label = std::dynamic_pointer_cast<gui::Label>(get("tooltip.label"));
|
||||
const auto& text = hover->getTooltip();
|
||||
@@ -89,9 +87,6 @@ void GUI::updateTooltip(float delta) {
|
||||
}
|
||||
}
|
||||
tooltipTimer += delta;
|
||||
} else {
|
||||
resetTooltip();
|
||||
}
|
||||
}
|
||||
|
||||
/// @brief Mouse related input and logic handling
|
||||
|
||||
Reference in New Issue
Block a user