37 lines
909 B
C#
37 lines
909 B
C#
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)
|
|
{
|
|
Position.X = pageX * width;
|
|
Position.Y = pageY * height;
|
|
this.Width = width;
|
|
this.Height = height;
|
|
}
|
|
|
|
public void DisplayWithViewport(Viewport viewport)
|
|
{
|
|
viewport.X = (int) Position.X;
|
|
viewport.Y = (int) Position.Y;
|
|
}
|
|
}
|
|
}
|