* New function based on 6e914e * returns -1 if index is invalid */
| 502 | * returns -1 if index is invalid |
| 503 | */ |
| 504 | int32_t DropdownIndexFromPoint(const ScreenCoordsXY& loc, WindowBase* w) |
| 505 | { |
| 506 | if (w->classification == WindowClass::dropdown) |
| 507 | { |
| 508 | auto* ddWnd = static_cast<DropdownWindow*>(w); |
| 509 | return ddWnd->GetIndexFromPoint(loc); |
| 510 | } |
| 511 | return -1; |
| 512 | } |
| 513 | |
| 514 | // Colour ordered for use in colour dropdown |
| 515 | static constexpr Colour kColoursDropdownOrder[] = { |
no test coverage detected