2018-11-15 01:22:19 -06:00
|
|
|
|
using Microsoft.Xna.Framework;
|
|
|
|
|
using Microsoft.Xna.Framework.Graphics;
|
2018-09-15 13:15:32 -05:00
|
|
|
|
using RhythmBullet.Zer01HD.UI.Modular;
|
2018-11-12 00:33:40 -06:00
|
|
|
|
using RhythmBullet.Zer01HD.Utilities.Camera;
|
2018-09-15 13:15:32 -05:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace RhythmBullet.Zer01HD.UI.Book
|
|
|
|
|
{
|
2018-11-08 23:49:42 -06:00
|
|
|
|
class Page : UIModuleGroup
|
2018-09-15 13:15:32 -05:00
|
|
|
|
{
|
|
|
|
|
private readonly int pageX, pageY;
|
2018-11-15 01:22:19 -06:00
|
|
|
|
public bool NeedsSizeUpdate;
|
2018-09-15 13:15:32 -05:00
|
|
|
|
|
2018-11-15 01:22:19 -06:00
|
|
|
|
public Page(int pageX, int pageY) : base(false)
|
2018-09-15 13:15:32 -05:00
|
|
|
|
{
|
|
|
|
|
this.pageX = pageX;
|
|
|
|
|
this.pageY = pageY;
|
2018-11-15 01:22:19 -06:00
|
|
|
|
NeedsSizeUpdate = true;
|
|
|
|
|
Name = ToString();
|
2018-09-15 13:15:32 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public virtual void ApplySize(int width, int height)
|
|
|
|
|
{
|
2018-11-09 18:17:30 -06:00
|
|
|
|
Bounds.X = pageX * width;
|
|
|
|
|
Bounds.Y = pageY * height;
|
|
|
|
|
Bounds.Width = width;
|
|
|
|
|
Bounds.Height = height;
|
2018-11-15 01:22:19 -06:00
|
|
|
|
NeedsSizeUpdate = false;
|
2018-09-15 13:15:32 -05:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|