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

Function getNextDragOffset

src/OpenLoco/src/Input.cpp:73–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71 }
72
73 Ui::Point getNextDragOffset()
74 {
75 auto current = Ui::getCursorPos();
76
77 auto delta = current - _cursorDragStart;
78
79 Ui::setCursorPos(_cursorDragStart.x, _cursorDragStart.y);
80
81 auto scale = Config::get().scaleFactor;
82 delta.x /= scale;
83 delta.y /= scale;
84
85 return { static_cast<int16_t>(delta.x), static_cast<int16_t>(delta.y) };
86 }
87
88 // 0x004072EC
89 bool processMessagesMini()

Callers 2

stateViewportRightFunction · 0.85
stateScrollRightFunction · 0.85

Calls 3

getCursorPosFunction · 0.85
setCursorPosFunction · 0.85
getFunction · 0.70

Tested by

no test coverage detected