Sdk/BaseWidget: Fix compilation on Linux

This commit is contained in:
Lynix
2017-11-15 01:25:33 +01:00
parent 55bbc282db
commit 14924f0e74
3 changed files with 13 additions and 12 deletions

View File

@@ -64,6 +64,18 @@ namespace Ndk
SetPosition(GetPosition(Nz::CoordSys_Local).x, (parentSize.y - mySize.y) / 2.f);
}
/*!
* \brief Destroy the widget, deleting it in the process.
*
* Calling this function immediately destroys the widget, freeing its memory.
*/
inline void BaseWidget::Destroy()
{
NazaraAssert(this != m_canvas, "Canvas cannot be destroyed by calling Destroy()");
m_widgetParent->DestroyChild(this); //< This does delete us
}
inline const Nz::Color& BaseWidget::GetBackgroundColor() const
{
return m_backgroundColor;