Many refactors and minor changes. idk.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user