SDK/ImageWidget: Fixed sprite not following widget position
This commit is contained in:
@@ -12,7 +12,7 @@ namespace Ndk
|
|||||||
BaseWidget(parent)
|
BaseWidget(parent)
|
||||||
{
|
{
|
||||||
m_entity = CreateEntity();
|
m_entity = CreateEntity();
|
||||||
m_entity->AddComponent<NodeComponent>();
|
m_entity->AddComponent<NodeComponent>().SetParent(this);
|
||||||
auto& gfx = m_entity->AddComponent<GraphicsComponent>();
|
auto& gfx = m_entity->AddComponent<GraphicsComponent>();
|
||||||
|
|
||||||
m_sprite = Nz::Sprite::New();
|
m_sprite = Nz::Sprite::New();
|
||||||
|
|||||||
Reference in New Issue
Block a user