mirror of
https://github.com/OMGeeky/ItemChecklist.git
synced 2026-01-21 02:37:11 +01:00
v0.5, amazing sorts and categories, no longer ugly. 💃
This commit is contained in:
23
UIElements/UIHoverImageButton.cs
Normal file
23
UIElements/UIHoverImageButton.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user