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

Function getSlotAtPosition

game/ui/components/equipscreen.cpp:87–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87static const EquipmentLayoutSlot *getSlotAtPosition(Vec2<int> pos,
88 const std::list<EquipmentLayoutSlot> &slots)
89{
90 for (auto &slot : slots)
91 {
92 if (slot.bounds.within(pos))
93 {
94 return &slot;
95 }
96 }
97 return nullptr;
98}
99
100void EquipmentPaperDoll::onRender()
101{

Callers 1

onRenderMethod · 0.85

Calls 1

withinMethod · 0.80

Tested by

no test coverage detected