Fix Trade Screen crash

This commit is contained in:
JappaWakka 2024-04-19 15:08:36 +02:00
parent 11001f69d0
commit 045a299826

View File

@ -579,7 +579,6 @@ Public Class TradeScreen
End If End If
End If End If
Next Next
' Item description: ' Item description:
If New Rectangle(736, 160, 256, 256).Contains(MouseHandler.MousePosition) = True Then If New Rectangle(736, 160, 256, 256).Contains(MouseHandler.MousePosition) = True Then
Me.BuyItemsShowDescription = Not Me.BuyItemsShowDescription Me.BuyItemsShowDescription = Not Me.BuyItemsShowDescription
@ -600,6 +599,10 @@ Public Class TradeScreen
End If End If
End If End If
If Me.Cursor > Me.BuyItemsList.Count - 1 Then
Me.Cursor = Me.BuyItemsList.Count - 1
End If
If ControllerHandler.ButtonPressed(Buttons.Y) = True Or KeyBoardHandler.KeyPressed(KeyBindings.SpecialKey) = True Then If ControllerHandler.ButtonPressed(Buttons.Y) = True Or KeyBoardHandler.KeyPressed(KeyBindings.SpecialKey) = True Then
Me.BuyItemsShowDescription = Not Me.BuyItemsShowDescription Me.BuyItemsShowDescription = Not Me.BuyItemsShowDescription
End If End If