Add name of items on hover in windows
This commit is contained in:
parent
0c6a973a69
commit
26e8e9108b
@ -114,6 +114,21 @@ namespace TrueCraft.Client.Modules
|
|||||||
Font.DrawText(SpriteBatch, mouse.X, mouse.Y, HeldItem.Count.ToString(), Game.ScaleFactor);
|
Font.DrawText(SpriteBatch, mouse.X, mouse.Y, HeldItem.Count.ToString(), Game.ScaleFactor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (SelectedSlot >= 0)
|
||||||
|
{
|
||||||
|
var item = Game.Client.CurrentWindow[SelectedSlot];
|
||||||
|
if (!item.Empty)
|
||||||
|
{
|
||||||
|
var p = Game.ItemRepository.GetItemProvider(item.ID);
|
||||||
|
var size = Font.MeasureText(p.DisplayName);
|
||||||
|
mouse = Mouse.GetState().Position.ToVector2().ToPoint();
|
||||||
|
mouse += new Point(10, 10);
|
||||||
|
SpriteBatch.Draw(Game.White1x1, new Rectangle(mouse,
|
||||||
|
new Point(size.X + 10, size.Y + 15)),
|
||||||
|
new Color(Color.Black, 200));
|
||||||
|
Font.DrawText(SpriteBatch, mouse.X + 5, mouse.Y, p.DisplayName);
|
||||||
|
}
|
||||||
|
}
|
||||||
SpriteBatch.End();
|
SpriteBatch.End();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user