recrownedgtk/Recrowned-Athenaeum/UI/Modular/Modules/Interactive/TextButton.cs

38 lines
1003 B
C#
Raw Normal View History

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using RhythmBullet.UI.Modular.Modules;
using RhythmBullet.Utilities.DataTypes;
using RhythmBullet.Utilities.UI.Modular.Modules.Interactive;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RhythmBullet.Utilities.UI.Modular.Modules.Interactive
{
internal class TextButton : Button
{
private TextLabel label;
internal TextButton(string text, SpriteFont font, NinePatch background) : base(background)
{
label = new TextLabel(font, text);
label.autoScale = true;
}
public override void Update(GameTime gameTime)
{
label.bounds = bounds;
label.Update(gameTime);
base.Update(gameTime);
}
public override void Draw(SpriteBatch batch)
{
label.Draw(batch);
base.Draw(batch);
}
}
}