Files
ItemChecklist/UIElements/UIHoverImageButton.cs
2018-08-07 07:06:01 -06:00

24 lines
467 B
C#

using Microsoft.Xna.Framework.Graphics;
namespace ItemChecklist.UIElements
{
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;
}
}
}
}