MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / WindowMovePosition

Function WindowMovePosition

src/openrct2-ui/interface/Window.cpp:894–911  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

892 }
893
894 void WindowMovePosition(WindowBase& w, const ScreenCoordsXY& deltaCoords)
895 {
896 if (deltaCoords.x == 0 && deltaCoords.y == 0)
897 return;
898
899 // Invalidate old region
900 w.invalidate();
901
902 // Translate window and viewport
903 w.windowPos += deltaCoords;
904 if (w.viewport != nullptr)
905 {
906 w.viewport->pos += deltaCoords;
907 }
908
909 // Invalidate new region
910 w.invalidate();
911 }
912
913 void WindowSetPosition(WindowBase& w, const ScreenCoordsXY& screenCoords)
914 {

Callers 2

WindowSetPositionFunction · 0.85
onOpenMethod · 0.85

Calls 1

invalidateMethod · 0.45

Tested by

no test coverage detected