refactored field names, organized classes, text ui module now can scale and wrap.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user