2018-11-30 02:41:06 +00:00
|
|
|
|
using Microsoft.Xna.Framework;
|
|
|
|
|
using Microsoft.Xna.Framework.Graphics;
|
2018-12-04 13:45:09 +00:00
|
|
|
|
using RecrownedAthenaeum.UI.Modular;
|
|
|
|
|
using RecrownedAthenaeum.Camera;
|
2018-11-30 02:41:06 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2018-12-04 13:45:09 +00:00
|
|
|
|
namespace RecrownedAthenaeum.UI.Book
|
2018-11-30 02:41:06 +00:00
|
|
|
|
{
|
2018-12-04 13:45:09 +00:00
|
|
|
|
public class Page : UIModuleGroup
|
2018-11-30 02:41:06 +00:00
|
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|