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

Method GetWidgetFromPos

src/widget.cpp:1293–1296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1291}
1292
1293NWidgetCore *NWidgetCore::GetWidgetFromPos(int x, int y)
1294{
1295 return (IsInsideBS(x, this->pos_x, this->current_x) && IsInsideBS(y, this->pos_y, this->current_y)) ? this : nullptr;
1296}
1297
1298NWidgetBase *NWidgetContainer::GetWidgetOfType(WidgetType tp)
1299{

Callers 6

DispatchLeftClickEventFunction · 0.45
DispatchRightClickEventFunction · 0.45
DispatchHoverEventFunction · 0.45
HandleMouseOverFunction · 0.45
MouseLoopFunction · 0.45
GetWidgetFromPosFunction · 0.45

Calls 5

GetScrollOffsetsMethod · 0.95
IsInsideBSFunction · 0.85
sizeMethod · 0.45
getMethod · 0.45
AssignSizePositionMethod · 0.45

Tested by

no test coverage detected