MCPcopy Create free account
hub / github.com/diasurgical/devilution / AlignXOffset

Function AlignXOffset

SourceX/DiabloUI/text_draw.cpp:25–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25int AlignXOffset(int flags, const SDL_Rect &dest, int w)
26{
27 if (flags & UIS_CENTER)
28 return (dest.w - w) / 2;
29 if (flags & UIS_RIGHT)
30 return dest.w - w;
31 return 0;
32}
33
34} // namespace
35

Callers 2

DrawTTFFunction · 0.85
DrawArtStrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected