MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / HandlePlacePresize

Function HandlePlacePresize

src/window.cpp:1940–1954  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1938}
1939
1940static void HandlePlacePresize()
1941{
1942 if (_special_mouse_mode != WSM_PRESIZE) return;
1943
1944 Window *w = _thd.GetCallbackWnd();
1945 if (w == nullptr) return;
1946
1947 Point pt = GetTileBelowCursor();
1948 if (pt.x == -1) {
1949 _thd.selend.x = -1;
1950 return;
1951 }
1952
1953 w->OnPlacePresize(pt, TileVirtXY(pt.x, pt.y));
1954}
1955
1956/**
1957 * Handle dragging and dropping in mouse dragging mode (#WSM_DRAGDROP).

Callers 1

MouseLoopFunction · 0.85

Calls 4

GetTileBelowCursorFunction · 0.85
TileVirtXYFunction · 0.85
GetCallbackWndMethod · 0.80
OnPlacePresizeMethod · 0.45

Tested by

no test coverage detected