Move billboard state into LabelDrawableSettings

This commit is contained in:
Georg Hagen
2025-01-05 23:44:01 +01:00
parent 92b9fb597f
commit 6cfd760034
3 changed files with 13 additions and 15 deletions

View File

@@ -63,11 +63,11 @@ namespace OpenVulkano
}
else
{
labelSettings.hasRoundedCorners = i % 2 == 0 ? 0 : 1;
labelSettings.hasArrow = i % 2 == 0 ? 1 : 0;
labelSettings.hasRoundedCorners = i & 1;
labelSettings.hasArrow = i % 2 == 0;
}
bool isBillboard = i % 2 == 0 ? 1 : 0;
LabelDrawable& label = m_drawablesPool.emplace_back(textDrawable.GetAtlasData(), labelSettings, isBillboard);
labelSettings.isBillboard = i % 2 == 0;
LabelDrawable& label = m_drawablesPool.emplace_back(textDrawable.GetAtlasData(), labelSettings);
label.AddText(texts[i]);
if (i == 2)
{
@@ -88,8 +88,7 @@ namespace OpenVulkano
m_camController.SetPosition({ 0, 0, 10 });
m_camController.SetBoostFactor(5);
std::shared_ptr<UI::PerformanceInfo> m_perfInfo =
std::make_shared<UI::PerformanceInfo>();
std::shared_ptr<UI::PerformanceInfo> m_perfInfo = std::make_shared<UI::PerformanceInfo>();
m_ui.AddElement(m_perfInfo);
GetGraphicsAppManager()->GetRenderer()->SetActiveUi(&m_ui);
}