added initialize function to pages.

This commit is contained in:
Harrison Deng 2019-01-27 14:57:47 -06:00
parent 69d8e59e8b
commit 449ac58c6f
2 changed files with 9 additions and 0 deletions

View File

@ -76,6 +76,7 @@ namespace RecrownedAthenaeum.UI.Book
{
foreach (Page page in pages)
{
page.Initialize();
this.pages.Add(page.Name, page);
}
}

View File

@ -39,5 +39,13 @@ namespace RecrownedAthenaeum.UI.Book
bounds.Height = height;
requiresSizeUpdate = false;
}
/// <summary>
/// Called only once after a page is added to a <see cref="Book"/>. Generally used to instantiate the modules of the page.
/// </summary>
protected internal virtual void Initialize()
{
}
}
}