MCPcopy Create free account
hub / github.com/Phobos-developers/Phobos / GetFootSelectBracketPosition

Method GetFootSelectBracketPosition

src/Ext/Techno/Body.Visuals.cpp:210–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210Point2D TechnoExt::GetFootSelectBracketPosition(TechnoClass* pThis, Anchor anchor)
211{
212 int length = 17;
213 Point2D position = GetScreenLocation(pThis);
214
215 if (pThis->WhatAmI() == AbstractType::Infantry)
216 length = 8;
217
218 RectangleStruct bracketRect =
219 {
220 position.X - length + (length == 8) + 1,
221 position.Y - 28 + (length == 8),
222 length * 2,
223 length * 3
224 };
225
226 return anchor.OffsetPosition(bracketRect);
227}
228
229Point2D TechnoExt::GetBuildingSelectBracketPosition(TechnoClass* pThis, BuildingSelectBracketPosition bracketPosition)
230{

Callers

nothing calls this directly

Calls 1

OffsetPositionMethod · 0.80

Tested by

no test coverage detected