Add helper methods to create and execute save level dialogs
Changes in this commit : - Added AreDirtyTemplatesPresent() method to PrefabSystemComponentInterface - Added ConstructSaveLevelDialog() helper method to create the save level dialog - Added ExecuteSavePrefabsDialog() helper method to create and execute the save prefabs dialog Signed-off-by: srikappa-amzn <srikappa@amazon.com>
This commit is contained in:
@@ -753,6 +753,18 @@ namespace AzToolsFramework
|
||||
}
|
||||
}
|
||||
|
||||
bool PrefabSystemComponent::AreDirtyTemplatesPresent()
|
||||
{
|
||||
for (const auto& [id, templateObject] : m_templateIdMap)
|
||||
{
|
||||
if (IsTemplateDirty(id))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void PrefabSystemComponent::SaveAllDirtyTemplates()
|
||||
{
|
||||
for (auto& [id, templateObject] : m_templateIdMap)
|
||||
|
||||
@@ -183,6 +183,8 @@ namespace AzToolsFramework
|
||||
*/
|
||||
void SetTemplateDirtyFlag(const TemplateId& templateId, bool dirty) override;
|
||||
|
||||
bool AreDirtyTemplatesPresent() override;
|
||||
|
||||
void SaveAllDirtyTemplates() override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
+1
@@ -49,6 +49,7 @@ namespace AzToolsFramework
|
||||
|
||||
virtual bool IsTemplateDirty(const TemplateId& templateId) = 0;
|
||||
virtual void SetTemplateDirtyFlag(const TemplateId& templateId, bool dirty) = 0;
|
||||
virtual bool AreDirtyTemplatesPresent() = 0;
|
||||
virtual void SaveAllDirtyTemplates() = 0;
|
||||
|
||||
virtual PrefabDom& FindTemplateDom(TemplateId templateId) = 0;
|
||||
|
||||
Reference in New Issue
Block a user