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

Method getSlotPositionFromScreenPosition

game/ui/components/equipscreen.cpp:20–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20Vec2<int>
21EquipmentPaperDoll::getSlotPositionFromScreenPosition(const Vec2<int> &screenPosition) const
22{
23 auto pos = screenPosition - this->resolvedLocation;
24 return pos / slotSizePixels;
25}
26
27Vec2<int> EquipmentPaperDoll::getScreenPositionFromSlotPosition(const Vec2<int> &slot) const
28{

Callers 3

eventOccurredMethod · 0.80
handleItemPickupMethod · 0.80
eventOccurredMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected