Most remaining level editor work

This commit is contained in:
elasota
2020-03-01 17:01:35 -05:00
parent abd4f1a978
commit 7b27d6c6b5
48 changed files with 1211 additions and 945 deletions

View File

@@ -72,6 +72,7 @@ namespace PortabilityLayer
virtual void SetHighlightStyle(int16_t style);
virtual bool HandlesTickEvents() const;
virtual Rect GetExpandedRect() const;
const Rect &GetRect() const;
Window *GetWindow() const;
@@ -118,7 +119,7 @@ namespace PortabilityLayer
void Destroy() override
{
static_cast<T*>(this)->~T();
this->~WidgetSpec();
Widget::BaseRelease(static_cast<T*>(this));
}
@@ -141,7 +142,7 @@ namespace PortabilityLayer
return nullptr;
}
if (!static_cast<Window*>(state.m_window)->AddWidget(widget))
if (state.m_window != nullptr && !static_cast<Window*>(state.m_window)->AddWidget(widget))
{
widget->Destroy();
return nullptr;