forked from mirror/OpenTTD
This fixes the timed tooltip window being (invisibly) destroyed and reconstructed every frame. This also affects the unused OnHover() window event.
This commit is contained in:
@@ -2966,7 +2966,7 @@ void HandleMouseEvents()
|
||||
hover_pos = _cursor.pos;
|
||||
hover_time = std::chrono::steady_clock::now();
|
||||
_mouse_hovering = false;
|
||||
} else {
|
||||
} else if (!_mouse_hovering) {
|
||||
if (std::chrono::steady_clock::now() > hover_time + std::chrono::milliseconds(_settings_client.gui.hover_delay_ms)) {
|
||||
click = MC_HOVER;
|
||||
_input_events_this_tick++;
|
||||
|
Reference in New Issue
Block a user