2018-09-15 18:15:32 +00:00
|
|
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
|
|
|
using RhythmBullet.Zer01HD.UI.Modular;
|
2018-11-12 06:33:40 +00:00
|
|
|
|
using RhythmBullet.Zer01HD.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;
|
|
|
|
|
|
|
|
|
|
namespace RhythmBullet.Zer01HD.UI.Book
|
|
|
|
|
{
|
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-13 00:50:00 +00:00
|
|
|
|
private GraphicsDevice graphicsDevice;
|
2018-09-15 18:15:32 +00:00
|
|
|
|
|
2018-11-13 00:50:00 +00:00
|
|
|
|
public Page(int pageX, int pageY, GraphicsDevice graphicsDevice)
|
2018-09-15 18:15:32 +00:00
|
|
|
|
{
|
2018-11-13 00:50:00 +00:00
|
|
|
|
this.graphicsDevice = graphicsDevice;
|
2018-09-15 18:15:32 +00:00
|
|
|
|
this.pageX = pageX;
|
|
|
|
|
this.pageY = pageY;
|
2018-11-13 00:50:00 +00:00
|
|
|
|
ApplySize(graphicsDevice.Viewport.Width, graphicsDevice.Viewport.Height);
|
2018-09-15 18:15:32 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public virtual void ApplySize(int width, int height)
|
|
|
|
|
{
|
2018-11-10 00:17:30 +00:00
|
|
|
|
Bounds.X = pageX * width;
|
|
|
|
|
Bounds.Y = pageY * height;
|
|
|
|
|
Bounds.Width = width;
|
|
|
|
|
Bounds.Height = height;
|
2018-09-15 18:15:32 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|