Files
ItemChecklist/UIHoverImageButton.cs
2016-12-19 07:54:28 -07:00

26 lines
520 B
C#

using ItemChecklist.UI;
using Microsoft.Xna.Framework.Graphics;
using Terraria.GameContent.UI.Elements;
namespace ItemChecklist
{
internal class UIHoverImageButton : UIImageButton
{
internal string hoverText;
public UIHoverImageButton(Texture2D texture, string hoverText) : base(texture)
{
this.hoverText = hoverText;
}
protected override void DrawSelf(SpriteBatch spriteBatch)
{
base.DrawSelf(spriteBatch);
if (IsMouseHovering)
{
ItemChecklistUI.hoverText = hoverText;
}
}
}
}