* * rct2: 0x006E9269 */
| 985 | * rct2: 0x006E9269 |
| 986 | */ |
| 987 | static void InputWidgetOverChangeCheck(WindowClass windowClass, WindowNumber windowNumber, WidgetIndex widgetIndex) |
| 988 | { |
| 989 | // Prevents invalid widgets being clicked source of bug is elsewhere |
| 990 | if (widgetIndex == kWidgetIndexNull) |
| 991 | return; |
| 992 | |
| 993 | // Check if the widget that the cursor was over, has changed |
| 994 | if (windowClass != gHoverWidget.windowClassification || windowNumber != gHoverWidget.windowNumber |
| 995 | || widgetIndex != gHoverWidget.widgetIndex) |
| 996 | { |
| 997 | // Invalidate last widget cursor was on if widget is a flat button |
| 998 | InputWidgetOverFlatbuttonInvalidate(); |
| 999 | |
| 1000 | // Set new cursor over widget |
| 1001 | gHoverWidget.windowClassification = windowClass; |
| 1002 | gHoverWidget.windowNumber = windowNumber; |
| 1003 | gHoverWidget.widgetIndex = widgetIndex; |
| 1004 | |
| 1005 | // Invalidate new widget cursor is on if widget is a flat button |
| 1006 | if (windowClass != WindowClass::null) |
| 1007 | InputWidgetOverFlatbuttonInvalidate(); |
| 1008 | } |
| 1009 | } |
| 1010 | |
| 1011 | /** |
| 1012 | * Used to invalidate flat button widgets when the mouse leaves and enters them. This should be generalised so that all |
no test coverage detected