2018-11-15 07:22:19 +00:00
|
|
|
|
using Microsoft.Xna.Framework;
|
|
|
|
|
using Microsoft.Xna.Framework.Graphics;
|
2018-11-21 00:56:41 +00:00
|
|
|
|
using RhythmBullet.UI.Modular;
|
|
|
|
|
using RhythmBullet.Utilities.Camera;
|
2018-09-15 18:15:32 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2018-11-21 00:56:41 +00:00
|
|
|
|
namespace RhythmBullet.UI.Book
|
2018-09-15 18:15:32 +00:00
|
|
|
|
{
|
2018-11-09 05:49:42 +00:00
|
|
|
|
class Page : UIModuleGroup
|
2018-09-15 18:15:32 +00:00
|
|
|
|
{
|
|
|
|
|
private readonly int pageX, pageY;
|
2018-11-15 07:22:19 +00:00
|
|
|
|
public bool NeedsSizeUpdate;
|
2018-09-15 18:15:32 +00:00
|
|
|
|
|
2018-11-15 07:22:19 +00:00
|
|
|
|
public Page(int pageX, int pageY) : base(false)
|
2018-09-15 18:15:32 +00:00
|
|
|
|
{
|
|
|
|
|
this.pageX = pageX;
|
|
|
|
|
this.pageY = pageY;
|
2018-11-15 07:22:19 +00:00
|
|
|
|
NeedsSizeUpdate = true;
|
|
|
|
|
Name = ToString();
|
2018-09-15 18:15:32 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public virtual void ApplySize(int width, int height)
|
|
|
|
|
{
|
2018-11-21 00:12:02 +00:00
|
|
|
|
bounds.X = pageX * width;
|
|
|
|
|
bounds.Y = pageY * height;
|
|
|
|
|
bounds.Width = width;
|
|
|
|
|
bounds.Height = height;
|
2018-11-15 07:22:19 +00:00
|
|
|
|
NeedsSizeUpdate = false;
|
2018-09-15 18:15:32 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|