2018-11-30 02:41:06 +00:00
|
|
|
|
using Microsoft.Xna.Framework;
|
|
|
|
|
using Microsoft.Xna.Framework.Graphics;
|
2018-12-04 13:45:09 +00:00
|
|
|
|
using RecrownedAthenaeum.UI.Modular.Modules;
|
|
|
|
|
using RecrownedAthenaeum.DataTypes;
|
|
|
|
|
using RecrownedAthenaeum.UI.Modular.Modules.Interactive;
|
2018-11-30 02:41:06 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2018-12-04 13:45:09 +00:00
|
|
|
|
namespace RecrownedAthenaeum.UI.Modular.Modules.Interactive
|
2018-11-30 02:41:06 +00:00
|
|
|
|
{
|
2018-12-04 13:45:09 +00:00
|
|
|
|
public class TextButton : Button
|
2018-11-30 02:41:06 +00:00
|
|
|
|
{
|
2018-12-11 07:12:25 +00:00
|
|
|
|
private Text label;
|
2018-11-30 02:41:06 +00:00
|
|
|
|
|
2018-12-04 13:45:09 +00:00
|
|
|
|
public TextButton(string text, SpriteFont font, NinePatch background) : base(background)
|
2018-11-30 02:41:06 +00:00
|
|
|
|
{
|
2018-12-11 07:12:25 +00:00
|
|
|
|
label = new Text(font, text);
|
2018-11-30 02:41:06 +00:00
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|