refactored field names, organized classes, text ui module now can scale and wrap.

This commit is contained in:
2018-11-20 18:12:02 -06:00
parent 1edebdd223
commit 88baab37db
10 changed files with 117 additions and 45 deletions

View File

@@ -42,7 +42,7 @@ namespace RhythmBullet.Zer01HD.UI.Book
if (targetPage != null)
{
Vector2 position;
Rectangle targetBounds = targetPage.Bounds;
Rectangle targetBounds = targetPage.bounds;
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);
@@ -85,7 +85,7 @@ namespace RhythmBullet.Zer01HD.UI.Book
public void GoToPage(Page page)
{
Rectangle targetBounds = page.Bounds;
Rectangle targetBounds = page.bounds;
camera.Position.X = targetBounds.X + (targetBounds.Width * 0.5f);
camera.Position.Y = targetBounds.Y + (targetBounds.Height * 0.5f);
}

View File

@@ -25,10 +25,10 @@ namespace RhythmBullet.Zer01HD.UI.Book
public virtual void ApplySize(int width, int height)
{
Bounds.X = pageX * width;
Bounds.Y = pageY * height;
Bounds.Width = width;
Bounds.Height = height;
bounds.X = pageX * width;
bounds.Y = pageY * height;
bounds.Width = width;
bounds.Height = height;
NeedsSizeUpdate = false;
}
}