SDK/BaseWidget: Add OnParentResized method
This commit is contained in:
@@ -63,8 +63,9 @@ namespace Ndk
|
||||
|
||||
inline void BaseWidget::SetContentSize(const Nz::Vector2f& size)
|
||||
{
|
||||
NotifyParentResized(size);
|
||||
m_contentSize = size;
|
||||
|
||||
|
||||
Layout();
|
||||
}
|
||||
|
||||
@@ -78,6 +79,12 @@ namespace Ndk
|
||||
Layout();
|
||||
}
|
||||
|
||||
inline void BaseWidget::NotifyParentResized(const Nz::Vector2f& newSize)
|
||||
{
|
||||
for (const auto& widgetPtr : m_children)
|
||||
widgetPtr->OnParentResized(newSize);
|
||||
}
|
||||
|
||||
inline void BaseWidget::UpdateCanvasIndex(std::size_t index)
|
||||
{
|
||||
m_canvasIndex = index;
|
||||
|
||||
Reference in New Issue
Block a user