0x004CD47A
| 1525 | |
| 1526 | // 0x004CD47A |
| 1527 | void processMouseOver(int32_t x, int32_t y) |
| 1528 | { |
| 1529 | bool skipItem = false; |
| 1530 | Ui::CursorId cursorId = Ui::CursorId::pointer; |
| 1531 | |
| 1532 | Windows::MapToolTip::reset(); |
| 1533 | |
| 1534 | if (hasMapSelectionFlag(MapSelectionFlags::hoveringOverStation)) |
| 1535 | { |
| 1536 | resetMapSelectionFlag(MapSelectionFlags::hoveringOverStation); |
| 1537 | auto station = StationManager::get(_hoveredStationId); |
| 1538 | if (!station->empty()) |
| 1539 | { |
| 1540 | station->invalidate(); |
| 1541 | } |
| 1542 | } |
| 1543 | |
| 1544 | Ui::Window* window = Ui::WindowManager::findAt(x, y); |
| 1545 | |
| 1546 | if (window != nullptr) |
| 1547 | { |
| 1548 | int16_t widgetIdx = window->findWidgetAt(x, y); |
| 1549 | |
| 1550 | if (widgetIdx != -1) |
| 1551 | { |
| 1552 | Ui::Widget& widget = window->widgets[widgetIdx]; |
| 1553 | switch (widget.type) |
| 1554 | { |
| 1555 | case Ui::WidgetType::panel: |
| 1556 | case Ui::WidgetType::newsPanel: |
| 1557 | case Ui::WidgetType::frame: |
| 1558 | if (window->hasFlags(Ui::WindowFlags::resizable)) |
| 1559 | { |
| 1560 | if (window->minWidth != window->maxWidth || window->minHeight != window->maxHeight) |
| 1561 | { |
| 1562 | if (x >= window->x + window->width - 19 && y >= window->y + window->height - 19) |
| 1563 | { |
| 1564 | cursorId = Ui::CursorId::diagonalArrows; |
| 1565 | break; |
| 1566 | } |
| 1567 | } |
| 1568 | } |
| 1569 | [[fallthrough]]; |
| 1570 | default: |
| 1571 | _scrollLast.x = x; |
| 1572 | _scrollLast.y = y; |
| 1573 | cursorId = window->callCursor(widgetIdx, window->widgets[widgetIdx].id, x, y, cursorId); |
| 1574 | break; |
| 1575 | |
| 1576 | case Ui::WidgetType::scrollview: |
| 1577 | { |
| 1578 | _scrollLast.x = x; |
| 1579 | _scrollLast.y = y; |
| 1580 | |
| 1581 | auto res = Ui::ScrollView::getPart( |
| 1582 | *window, |
| 1583 | &window->widgets[widgetIdx], |
| 1584 | x, |
no test coverage detected