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

@@ -91,6 +91,8 @@ namespace PortabilityLayer
int16_t ExecuteModal(DialogFilterFunc_t filterFunc) override;
bool ReplaceWidget(unsigned int itemIndex, Widget *widget) override;
bool Populate(DialogTemplate *tmpl, const DialogTextSubstitutions *substitutions);
void DrawControls(bool redraw);
@@ -390,6 +392,19 @@ namespace PortabilityLayer
}
}
bool DialogImpl::ReplaceWidget(unsigned int itemIndex, Widget *widget)
{
DialogItem &item = m_items[itemIndex];
Widget *oldWidget = item.GetWidget();
if (!m_window->ReplaceWidget(oldWidget, widget))
return false;
m_items[itemIndex].m_widget = widget;
return true;
}
bool DialogImpl::Populate(DialogTemplate *tmpl, const DialogTextSubstitutions *substitutions)
{
Window *window = this->GetWindow();