Many refactors and minor changes. idk.

This commit is contained in:
2019-04-08 23:58:27 -05:00
parent 4d4d46ad1b
commit 3e5b838abe
13 changed files with 465 additions and 60 deletions

View File

@@ -97,7 +97,7 @@ namespace RecrownedAthenaeum.UI.BookSystem
if (targetPage != null)
{
Vector2 position;
Rectangle targetBounds = targetPage.situation;
Rectangle targetBounds = targetPage.Boundaries;
position.X = targetBounds.X + (targetBounds.Width * 0.5f);
position.Y = targetBounds.Y + (targetBounds.Height * 0.5f);
camera.LinearInterpolationToPosition(0.4f, position, (float)gameTime.ElapsedGameTime.TotalSeconds);
@@ -173,7 +173,7 @@ namespace RecrownedAthenaeum.UI.BookSystem
/// <param name="page">Page to go to.</param>
public void GoToPage(Page page)
{
Rectangle targetBounds = page.situation;
Rectangle targetBounds = page.Boundaries;
camera.position.X = targetBounds.X + (targetBounds.Width * 0.5f);
camera.position.Y = targetBounds.Y + (targetBounds.Height * 0.5f);
}

View File

@@ -36,10 +36,10 @@ namespace RecrownedAthenaeum.UI.BookSystem
/// <param name="height">New Height</param>
public virtual void ApplySize(int width, int height)
{
situation.X = pageX * width;
situation.Y = pageY * height;
situation.Width = width;
situation.Height = height;
X = pageX * width;
Y = pageY * height;
Width = width;
Height = height;
requiresSizeUpdate = false;
}