recrownedathenaeum/RecrownedAthenaeum/UI/Book/Page.cs

28 lines
686 B
C#
Raw Normal View History

2019-01-13 20:22:53 +00:00
using RecrownedAthenaeum.UI.Modular;
namespace RecrownedAthenaeum.UI.Book
{
public class Page : UIModuleGroup
{
private readonly int pageX, pageY;
public bool NeedsSizeUpdate;
public Page(int pageX, int pageY) : base(false)
{
this.pageX = pageX;
this.pageY = pageY;
NeedsSizeUpdate = true;
Name = ToString();
}
public virtual void ApplySize(int width, int height)
{
bounds.X = pageX * width;
bounds.Y = pageY * height;
bounds.Width = width;
bounds.Height = height;
NeedsSizeUpdate = false;
}
}
}