Widgets/ButtonWidget: Fix position

This commit is contained in:
Jérôme Leclercq 2017-09-19 15:14:24 +02:00
parent c211abd977
commit 5afe321b5c
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ namespace Ndk
m_gradientEntity->GetComponent<NodeComponent>().SetPosition(origin); m_gradientEntity->GetComponent<NodeComponent>().SetPosition(origin);
m_gradientSprite->SetSize(contentSize); m_gradientSprite->SetSize(contentSize);
Nz::Boxf textBox = m_textEntity->GetComponent<GraphicsComponent>().GetBoundingVolume().aabb; Nz::Boxf textBox = m_textEntity->GetComponent<GraphicsComponent>().GetBoundingVolume().obb.localBox;
m_textEntity->GetComponent<NodeComponent>().SetPosition(origin.x + contentSize.x / 2 - textBox.width / 2, origin.y + contentSize.y / 2 - textBox.height / 2); m_textEntity->GetComponent<NodeComponent>().SetPosition(origin.x + contentSize.x / 2 - textBox.width / 2, origin.y + contentSize.y / 2 - textBox.height / 2);
} }