| 1494 | } |
| 1495 | |
| 1496 | static void InputUpdateTooltip(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) |
| 1497 | { |
| 1498 | if (gTooltipWidget.windowClassification == WindowClass::null) |
| 1499 | { |
| 1500 | if (gTooltipCursor == screenCoords) |
| 1501 | { |
| 1502 | if (gCurrentRealTimeTicks >= _tooltipNotShownTimeout && w != nullptr && widgetIndex != kWidgetIndexNull |
| 1503 | && widgetIsVisible(*w, widgetIndex)) |
| 1504 | { |
| 1505 | gTooltipCloseTimeout = gCurrentRealTimeTicks + 8000; |
| 1506 | WindowTooltipOpen(w, widgetIndex, screenCoords); |
| 1507 | } |
| 1508 | } |
| 1509 | else |
| 1510 | { |
| 1511 | ResetTooltipNotShown(); |
| 1512 | } |
| 1513 | |
| 1514 | gTooltipCloseTimeout = gCurrentRealTimeTicks + 8000; |
| 1515 | gTooltipCursor = screenCoords; |
| 1516 | } |
| 1517 | else |
| 1518 | { |
| 1519 | gTooltipCursor = screenCoords; |
| 1520 | ResetTooltipNotShown(); |
| 1521 | |
| 1522 | if (w == nullptr || gTooltipWidget.windowClassification != w->classification |
| 1523 | || gTooltipWidget.windowNumber != w->number || gTooltipWidget.widgetIndex != widgetIndex |
| 1524 | || !widgetIsVisible(*w, widgetIndex)) |
| 1525 | { |
| 1526 | WindowTooltipClose(); |
| 1527 | } |
| 1528 | |
| 1529 | if (gCurrentRealTimeTicks >= gTooltipCloseTimeout) |
| 1530 | { |
| 1531 | auto* windowMgr = GetWindowManager(); |
| 1532 | windowMgr->CloseByClass(WindowClass::tooltip); |
| 1533 | } |
| 1534 | } |
| 1535 | } |
| 1536 | |
| 1537 | #pragma endregion |
| 1538 |
no test coverage detected