2018-09-15 18:15:32 +00:00
|
|
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
|
|
|
using RhythmBullet.Zer01HD.UI.Modular;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace RhythmBullet.Zer01HD.UI.Book
|
|
|
|
|
{
|
|
|
|
|
class Page : ModuleGroup
|
|
|
|
|
{
|
|
|
|
|
private readonly int pageX, pageY;
|
|
|
|
|
|
|
|
|
|
public Page(int pageX, int pageY, int width, int height)
|
|
|
|
|
{
|
|
|
|
|
this.pageX = pageX;
|
|
|
|
|
this.pageY = pageY;
|
|
|
|
|
ApplySize(width, height);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public virtual void ApplySize(int width, int height)
|
|
|
|
|
{
|
2018-09-15 19:05:14 +00:00
|
|
|
|
Position.X = pageX * width;
|
|
|
|
|
Position.Y = pageY * height;
|
2018-09-15 18:15:32 +00:00
|
|
|
|
this.Width = width;
|
|
|
|
|
this.Height = height;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void DisplayWithViewport(Viewport viewport)
|
|
|
|
|
{
|
2018-09-15 19:05:14 +00:00
|
|
|
|
viewport.X = (int) Position.X;
|
|
|
|
|
viewport.Y = (int) Position.Y;
|
2018-09-15 18:15:32 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|