MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / onMove

Function onMove

src/OpenLoco/src/Ui/Windows/DragVehiclePart.cpp:77–87  ·  view source on GitHub ↗

0x004B6271

Source from the content-addressed store, hash-verified

75
76 // 0x004B6271
77 static void onMove(Window& self, [[maybe_unused]] const int16_t x, [[maybe_unused]] const int16_t y)
78 {
79 const auto height = self.height;
80 self.height = 0; // Set to zero so that skipped in window find
81 Vehicle::Details::scrollDragEnd(Input::getScrollLastLocation());
82 // Reset the height so that invalidation works correctly
83 self.height = height;
84
85 WindowManager::invalidate(WindowType::vehicle, enumValue(_dragVehicleHead));
86 WindowManager::close(&self);
87 }
88
89 // 0x004B6197
90 static void draw(Ui::Window& self, Gfx::DrawingContext& drawingCtx)

Callers

nothing calls this directly

Calls 5

scrollDragEndFunction · 0.85
getScrollLastLocationFunction · 0.85
enumValueFunction · 0.85
closeFunction · 0.70
invalidateFunction · 0.50

Tested by

no test coverage detected