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

Function scrollDragBegin

src/OpenLoco/src/Input/MouseInput.cpp:1479–1493  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1477#pragma mark - Scrollview dragging
1478
1479 static void scrollDragBegin(int32_t x, int32_t y, Ui::Window* window, Ui::WidgetIndex_t widgetIndex)
1480 {
1481 state(State::scrollRight);
1482 _dragLast.x = x;
1483 _dragLast.y = y;
1484 _dragWindowType = window->type;
1485 _dragWindowNumber = window->number;
1486 _dragWidgetIndex = widgetIndex;
1487 _ticksSinceDragStart = 0;
1488
1489 _dragScrollIndex = window->getScrollDataIndex(widgetIndex);
1490
1491 Ui::hideCursor();
1492 startCursorDrag();
1493 }
1494
1495#pragma mark - Widgets
1496

Callers 1

stateNormalRightFunction · 0.85

Calls 4

hideCursorFunction · 0.85
startCursorDragFunction · 0.85
getScrollDataIndexMethod · 0.80
stateFunction · 0.50

Tested by

no test coverage detected