Skip to content

Commit

Permalink
Fix mouse cursor not showing properly on NPC wall tilespecs
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed Mar 25, 2022
1 parent 44420e8 commit 5343f80
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions EndlessClient/Rendering/MouseCursorRenderer.cs
Expand Up @@ -211,11 +211,13 @@ private void UpdateMapItemLabel(Option<IItem> item)
item.Match(
some: i =>
{
if (!_mapItemText.Visible)
var data = _eifFileProvider.EIFFile[i.ItemID];
var text = _itemStringService.GetStringForMapDisplay(data, i.Amount);
if (!_mapItemText.Visible || _mapItemText.Text != text)
{
var data = _eifFileProvider.EIFFile[i.ItemID];
_mapItemText.Visible = true;
_mapItemText.Text = _itemStringService.GetStringForMapDisplay(data, i.Amount);
_mapItemText.Text = text;
_mapItemText.ResizeBasedOnText();
_mapItemText.ForeColor = GetColorForMapDisplay(data);
Expand All @@ -239,7 +241,6 @@ private void UpdateCursorIndexForTileSpec(TileSpec tileSpec)
case TileSpec.JammedDoor:
case TileSpec.MapEdge:
case TileSpec.FakeWall:
case TileSpec.NPCBoundary:
case TileSpec.VultTypo:
_shouldDrawCursor = false;
break;
Expand All @@ -263,6 +264,7 @@ private void UpdateCursorIndexForTileSpec(TileSpec tileSpec)
case TileSpec.Jukebox:
_cursorIndex = CursorIndex.HoverNormal;
break;
case TileSpec.NPCBoundary:
case TileSpec.Jump:
case TileSpec.Water:
case TileSpec.Arena:
Expand Down

0 comments on commit 5343f80

Please sign in to comment.