MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / isPointInsideControlBounds

Method isPointInsideControlBounds

forms/control.cpp:75–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75bool Control::isPointInsideControlBounds(int x, int y) const
76{
77 const Vec2<int> &Size =
78 (SelectionSize.x == 0 || SelectionSize.y == 0) ? this->Size : SelectionSize;
79
80 return x >= resolvedLocation.x && x < resolvedLocation.x + Size.x && y >= resolvedLocation.y &&
81 y < resolvedLocation.y + Size.y;
82}
83
84bool Control::isPointInsideControlBounds(Event *e, sp<Control> c) const
85{

Callers 1

initMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected