0x004B3B54
| 1427 | |
| 1428 | // 0x004B3B54 |
| 1429 | static void scrollMouseDown(Window& self, [[maybe_unused]] const int16_t x, const int16_t y, [[maybe_unused]] const uint8_t scrollIndex) |
| 1430 | { |
| 1431 | auto head = Common::getVehicle(self); |
| 1432 | if (head == nullptr) |
| 1433 | { |
| 1434 | return; |
| 1435 | } |
| 1436 | if (head->owner != CompanyManager::getControllingId()) |
| 1437 | { |
| 1438 | return; |
| 1439 | } |
| 1440 | |
| 1441 | auto car = Common::getCarFromScrollView(self, y); |
| 1442 | if (!car) |
| 1443 | { |
| 1444 | return; |
| 1445 | } |
| 1446 | |
| 1447 | OpenLoco::Vehicles::Vehicle train{ *head }; |
| 1448 | for (auto c : train.cars) |
| 1449 | { |
| 1450 | if (c.front == car->front) |
| 1451 | { |
| 1452 | if (isPaintToolActive(self)) |
| 1453 | { |
| 1454 | paintToolDownScroll(self, c, x); |
| 1455 | return; |
| 1456 | } |
| 1457 | DragVehiclePart::open(c); |
| 1458 | break; |
| 1459 | } |
| 1460 | } |
| 1461 | } |
| 1462 | |
| 1463 | // 0x004B399E |
| 1464 | static void scrollMouseOver(Window& self, [[maybe_unused]] const int16_t x, const int16_t y, [[maybe_unused]] const uint8_t scrollIndex) |
nothing calls this directly
no test coverage detected