|
|
|
@ -493,13 +493,13 @@ namespace olc::QuickGUI |
|
|
|
|
switch (nAlign) |
|
|
|
|
{ |
|
|
|
|
case Alignment::Left: |
|
|
|
|
pge->DrawStringProp(olc::vf2d( vPos.x + 2.0f, vPos.y + (vSize.y - vText.y) * 0.5f ), sText, m_manager.colText); |
|
|
|
|
pge->DrawStringProp(olc::vf2d( vPos.x + 2.0f, vPos.y + (vSize.y - vText.y) * 0.5f ), sText, bHasBackground?olc::YELLOW:m_manager.colText); |
|
|
|
|
break; |
|
|
|
|
case Alignment::Centre: |
|
|
|
|
pge->DrawStringProp(vPos + (vSize - vText) * 0.5f, sText, m_manager.colText); |
|
|
|
|
pge->DrawStringProp(vPos + (vSize - vText) * 0.5f, sText, bHasBackground?olc::YELLOW:m_manager.colText); |
|
|
|
|
break; |
|
|
|
|
case Alignment::Right: |
|
|
|
|
pge->DrawStringProp(olc::vf2d{ vPos.x + vSize.x - vText.x - 2.0f, vPos.y + (vSize.y - vText.y) * 0.5f }, sText, m_manager.colText); |
|
|
|
|
pge->DrawStringProp(olc::vf2d{ vPos.x + vSize.x - vText.x - 2.0f, vPos.y + (vSize.y - vText.y) * 0.5f }, sText, bHasBackground?olc::YELLOW:m_manager.colText); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -646,7 +646,7 @@ namespace olc::QuickGUI |
|
|
|
|
|
|
|
|
|
// Draw Text
|
|
|
|
|
olc::vf2d vText = pge->GetTextSizeProp(sText); |
|
|
|
|
pge->DrawStringProp(olc::vf2d(vPos.x + 2.0f, vPos.y + (vSize.y - vText.y) * 0.5f), sText, m_manager.colText); |
|
|
|
|
pge->DrawStringProp(olc::vf2d(vPos.x + 2.0f, vPos.y + (vSize.y - vText.y) * 0.5f), sText, bHasBackground?olc::GREEN:m_manager.colText); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|