private void UpdateCursorSourceRectangle(IMapCellState cellState)
        {
            _shouldDrawCursor = true;
            _cursorIndex      = CursorIndex.Standard;
            if (cellState.Character.HasValue || cellState.NPC.HasValue)
            {
                _cursorIndex = CursorIndex.HoverNormal;
            }
            else if (cellState.Sign.HasValue)
            {
                _shouldDrawCursor = false;
            }
            else if (cellState.Items.Any())
            {
                _cursorIndex = CursorIndex.HoverItem;
                UpdateMapItemLabel(new Optional <IItem>(cellState.Items.Last()));
            }
            else if (cellState.TileSpec != TileSpec.None)
            {
                UpdateCursorIndexForTileSpec(cellState.TileSpec);
            }

            if (!cellState.Items.Any())
            {
                UpdateMapItemLabel(Optional <IItem> .Empty);
            }
        }
        private void UpdateCursorIndexForTileSpec(TileSpec tileSpec)
        {
            switch (tileSpec)
            {
            case TileSpec.Wall:
            case TileSpec.JammedDoor:
            case TileSpec.MapEdge:
            case TileSpec.FakeWall:
            case TileSpec.NPCBoundary:
                _shouldDrawCursor = false;
                break;

            case TileSpec.Chest:
            case TileSpec.BankVault:
            case TileSpec.ChairDown:
            case TileSpec.ChairLeft:
            case TileSpec.ChairRight:
            case TileSpec.ChairUp:
            case TileSpec.ChairDownRight:
            case TileSpec.ChairUpLeft:
            case TileSpec.ChairAll:
            case TileSpec.Board1:
            case TileSpec.Board2:
            case TileSpec.Board3:
            case TileSpec.Board4:
            case TileSpec.Board5:
            case TileSpec.Board6:
            case TileSpec.Board7:
            case TileSpec.Board8:
            case TileSpec.Jukebox:
                _cursorIndex = CursorIndex.HoverNormal;
                break;

            case TileSpec.Jump:
            case TileSpec.Water:
            case TileSpec.Arena:
            case TileSpec.AmbientSource:
            case TileSpec.SpikesStatic:
            case TileSpec.SpikesTrap:
            case TileSpec.SpikesTimed:
            case TileSpec.None:
                _cursorIndex = CursorIndex.Standard;
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(tileSpec), tileSpec, null);
            }
        }