Options Freezing fix

Fixed OptionsScreen freezing in-game & when clicking Pack Information in ContentPack Menu in the Main Menu
This commit is contained in:
JappaWakka 2021-09-29 15:57:29 +02:00
parent 7583e5d97c
commit 0e8b60cfc4

View File

@ -657,8 +657,8 @@
Me.PreScreen.Update() Me.PreScreen.Update()
'New stuff 'New stuff
If _opening Then If _opening Then
InitializeControls()
LastControl = 0 LastControl = 0
InitializeControls()
_opening = False _opening = False
End If End If
@ -717,16 +717,14 @@
End If End If
If _pageClosing = True Then If _pageClosing = True Then
If PreScreen.Identification = Identifications.MainMenuScreen Then If _pageFade >= 0F Then
If _pageFade >= 0F Then _pageFade -= 0.07F
_pageFade -= 0.07F If _pageFade <= 0F Then
If _pageFade <= 0F Then _pageFade = 0F
_pageFade = 0F _pageClosing = False
_pageClosing = False _pageOpening = True
_pageOpening = True ScreenIndex = _nextIndex
ScreenIndex = _nextIndex InitializeControls()
InitializeControls()
End If
End If End If
End If End If
End If End If
@ -1030,11 +1028,7 @@
Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 336), 1, 48, "Back", AddressOf SwitchToContentPacks, 2)) Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 336), 1, 48, "Back", AddressOf SwitchToContentPacks, 2))
End Select End Select
If ScreenIndex <> 7 Then _cursorDestPosition = ControlList(LastControl)._position
_cursorDestPosition = ControlList(LastControl)._position
Else
_cursorDestPosition = ControlList(4)._position
End If
End Sub End Sub
Private Sub Apply() Private Sub Apply()
@ -1183,8 +1177,10 @@
End If End If
End Sub End Sub
Private Sub SwitchToPackInformation() Private Sub SwitchToPackInformation()
Me._nextIndex = 8 If PackNames.Count > 0 Then
Me._pageClosing = True Me._nextIndex = 8
Me._pageClosing = True
End If
ButtonPackInformation() ButtonPackInformation()
End Sub End Sub