0x004B4BC1 / 0x004B4C78 based on
| 2952 | |
| 2953 | // 0x004B4BC1 / 0x004B4C78 based on |
| 2954 | static bool onOrderMove(Vehicles::VehicleHead* const head, const int16_t orderId, bool(orderMoveFunc)(Vehicles::VehicleHead*, uint32_t)) |
| 2955 | { |
| 2956 | // No moveable orders |
| 2957 | if (head->sizeOfOrderTable <= 1) |
| 2958 | { |
| 2959 | return false; |
| 2960 | } |
| 2961 | // Valid orderId should be positive (avoid -1 / null) |
| 2962 | if (orderId < 0) |
| 2963 | { |
| 2964 | return false; |
| 2965 | } |
| 2966 | |
| 2967 | auto* order = getOrderTable(head).atIndex(orderId); |
| 2968 | if (order != nullptr) |
| 2969 | { |
| 2970 | return orderMoveFunc(head, order->getOffset()); |
| 2971 | } |
| 2972 | return false; |
| 2973 | } |
| 2974 | |
| 2975 | // 0x004B4B43 |
| 2976 | static void onMouseUp(Window& self, const WidgetIndex_t widgetIndex, [[maybe_unused]] const WidgetId id) |
no test coverage detected