MCPcopy Create free account
hub / github.com/axmolengine/axmol / getPaddingAmount

Function getPaddingAmount

core/ui/UIRichText.cpp:2391–2403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2389namespace
2390{
2391float getPaddingAmount(const RichText::HorizontalAlignment alignment, const float leftOver)
2392{
2393 switch (alignment)
2394 {
2395 case RichText::HorizontalAlignment::CENTER:
2396 return leftOver / 2.f;
2397 case RichText::HorizontalAlignment::RIGHT:
2398 return leftOver;
2399 default:
2400 AXASSERT(false, "invalid horizontal alignment!");
2401 return 0.f;
2402 }
2403}
2404} // namespace
2405
2406void RichText::doHorizontalAlignment(const Vector<ax::Node*>& row, float rowWidth)

Callers 1

doHorizontalAlignmentMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected