rhythmbullet/RhythmBullet/Zer01HD/Utilities/UI/Book/Page.cs

36 lines
915 B
C#
Raw Normal View History

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using RhythmBullet.Zer01HD.UI.Modular;
using RhythmBullet.Zer01HD.Utilities.Camera;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RhythmBullet.Zer01HD.UI.Book
{
class Page : UIModuleGroup
{
private readonly int pageX, pageY;
public bool NeedsSizeUpdate;
public Page(int pageX, int pageY) : base(false)
{
this.pageX = pageX;
this.pageY = pageY;
NeedsSizeUpdate = true;
Name = ToString();
}
public virtual void ApplySize(int width, int height)
{
Bounds.X = pageX * width;
Bounds.Y = pageY * height;
Bounds.Width = width;
Bounds.Height = height;
NeedsSizeUpdate = false;
}
}
}