0x004B3B7E
| 30 | |
| 31 | // 0x004B3B7E |
| 32 | void open(Vehicles::Car& car) |
| 33 | { |
| 34 | WindowManager::close(WindowType::dragVehiclePart); |
| 35 | _dragCarComponent = car.front; |
| 36 | _dragVehicleHead = car.front->head; |
| 37 | WindowManager::invalidate(WindowType::vehicle, enumValue(car.front->head)); |
| 38 | |
| 39 | uint16_t width = getWidthVehicleInline(car); |
| 40 | auto pos = Ui::ToolTip::getTooltipMouseLocation(); |
| 41 | pos.y -= 30; |
| 42 | pos.x -= width / 2; |
| 43 | Ui::Size size = { width, 60 }; |
| 44 | |
| 45 | auto self = WindowManager::createWindow(WindowType::dragVehiclePart, { pos.x, pos.y }, size, WindowFlags::transparent | WindowFlags::stickToFront, getEvents()); |
| 46 | self->setWidgets(widgets); |
| 47 | self->widgets[widx::frame].right = width - 1; |
| 48 | |
| 49 | Input::windowPositionBegin(Ui::ToolTip::getTooltipMouseLocation().x, Ui::ToolTip::getTooltipMouseLocation().y, self, widx::frame); |
| 50 | } |
| 51 | |
| 52 | static void onClose([[maybe_unused]] Window& self) |
| 53 | { |
nothing calls this directly
no test coverage detected