mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix: tooltip visibility when cursor is hidden
This commit is contained in:
parent
e3989cb178
commit
cc27e4b224
4 changed files with 23 additions and 5 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue