Do move memo cursor even when tile = flipped

This commit is contained in:
JappaWakka 2023-05-27 15:14:35 +02:00
parent bd38e5c2ab
commit 4aeecc99d1

View File

@ -870,11 +870,13 @@ TryAgain:
End If End If
'Adding currently selected Memo to Tile that the mouse is on 'Adding currently selected Memo to Tile that the mouse is on
If Controls.Accept(True, False, False) AndAlso GameState = States.Memo AndAlso MouseHandler.IsInRectangle(New Rectangle(CInt(BoardOrigin.X), CInt(BoardOrigin.Y), BoardSize.Width, BoardSize.Height)) AndAlso Board(CInt(GetTileUnderMouse.Y))(CInt(GetTileUnderMouse.X)).Flipped = False AndAlso Delay = 0 Then If Controls.Accept(True, False, False) AndAlso GameState = States.Memo AndAlso MouseHandler.IsInRectangle(New Rectangle(CInt(BoardOrigin.X), CInt(BoardOrigin.Y), BoardSize.Width, BoardSize.Height)) AndAlso Delay = 0 Then
Dim TileUnderMouse As Vector2 = GetTileUnderMouse() Dim TileUnderMouse As Vector2 = GetTileUnderMouse()
BoardCursorDestination = GetCursorOffset(CInt(TileUnderMouse.X), CInt(TileUnderMouse.Y)) BoardCursorDestination = GetCursorOffset(CInt(TileUnderMouse.X), CInt(TileUnderMouse.Y))
If Board(CInt(GetTileUnderMouse.Y))(CInt(GetTileUnderMouse.X)).Flipped = False Then
Board(CInt(TileUnderMouse.Y))(CInt(TileUnderMouse.X)).SetMemo(MemoIndex, True) Board(CInt(TileUnderMouse.Y))(CInt(TileUnderMouse.X)).SetMemo(MemoIndex, True)
End If End If
End If
'Removing currently selected Memo from currently selected Tile 'Removing currently selected Memo from currently selected Tile
If Controls.Dismiss(False, True, True) AndAlso GameState = States.Memo AndAlso Board(CInt(GetCurrentTile.Y))(CInt(GetCurrentTile.X)).Flipped = False AndAlso Delay = 0 Then If Controls.Dismiss(False, True, True) AndAlso GameState = States.Memo AndAlso Board(CInt(GetCurrentTile.Y))(CInt(GetCurrentTile.X)).Flipped = False AndAlso Delay = 0 Then
@ -882,13 +884,15 @@ TryAgain:
End If End If
'Removing currently selected Memo from Tile that the mouse is on 'Removing currently selected Memo from Tile that the mouse is on
If Controls.Dismiss(True, False, False) AndAlso GameState = States.Memo AndAlso Board(CInt(GetCurrentTile.Y))(CInt(GetCurrentTile.X)).Flipped = False AndAlso MouseHandler.IsInRectangle(New Rectangle(CInt(BoardOrigin.X), CInt(BoardOrigin.Y), BoardSize.Width, BoardSize.Height)) AndAlso Board(CInt(GetTileUnderMouse.Y))(CInt(GetTileUnderMouse.X)).Flipped = False AndAlso Delay = 0 Then If Controls.Dismiss(True, False, False) AndAlso GameState = States.Memo AndAlso MouseHandler.IsInRectangle(New Rectangle(CInt(BoardOrigin.X), CInt(BoardOrigin.Y), BoardSize.Width, BoardSize.Height)) AndAlso Delay = 0 Then
Dim TileUnderMouse As Vector2 = GetTileUnderMouse() Dim TileUnderMouse As Vector2 = GetTileUnderMouse()
BoardCursorDestination = GetCursorOffset(CInt(TileUnderMouse.X), CInt(TileUnderMouse.Y)) BoardCursorDestination = GetCursorOffset(CInt(TileUnderMouse.X), CInt(TileUnderMouse.Y))
If Board(CInt(GetTileUnderMouse.Y))(CInt(GetTileUnderMouse.X)).Flipped = False Then
Board(CInt(TileUnderMouse.Y))(CInt(TileUnderMouse.X)).SetMemo(MemoIndex, False) Board(CInt(TileUnderMouse.Y))(CInt(TileUnderMouse.X)).SetMemo(MemoIndex, False)
End If End If
End If End If
End If End If
End If
'Level complete! 'Level complete!
If CurrentCoins >= MaxCoins AndAlso GameState = States.Game Then If CurrentCoins >= MaxCoins AndAlso GameState = States.Game Then