Fixed MainMenu not resetting or applying Textures
After quitting a gamemode or after applying contentpacks
This commit is contained in:
parent
3cab6f3b82
commit
8a8e8fe8c3
|
@ -15,7 +15,6 @@
|
|||
Public MaxOffsetLevel As Integer = 0
|
||||
Public UpdateDisabled As Boolean = False
|
||||
Public Extras As New List(Of String)
|
||||
Public ChangedPack As Boolean = False
|
||||
|
||||
Public Sub LoadOptions()
|
||||
KeyBindings.CreateKeySave(False)
|
||||
|
|
|
@ -429,11 +429,6 @@ Public Class OverworldScreen
|
|||
c.ResetCursor()
|
||||
Player.Temp.IsInBattle = False
|
||||
|
||||
If Core.GameOptions.ChangedPack = True Then
|
||||
Screen.Level.Load(Screen.Level.LevelFile)
|
||||
Core.GameOptions.ChangedPack = False
|
||||
End If
|
||||
|
||||
'Set to correct music:
|
||||
If TrainerEncountered = False Then
|
||||
Dim x = 0
|
||||
|
|
|
@ -112,6 +112,7 @@
|
|||
SoundManager.Clear()
|
||||
ModelManager.Clear()
|
||||
TextureManager.TextureList.Clear()
|
||||
TextureManager.TextureRectList.Clear()
|
||||
Water.ClearAnimationResources()
|
||||
Whirlpool.LoadedWaterTemp = False
|
||||
Waterfall.ClearAnimationResources()
|
||||
|
|
|
@ -712,7 +712,8 @@ Public Class MusicManager
|
|||
{"union_cave", "IlexForest"},
|
||||
{"mt_mortar", "IlexForest"},
|
||||
{"whirlpool_islands", "IlexForest"},
|
||||
{"tohjo_falls", "IlexForest"}
|
||||
{"tohjo_falls", "IlexForest"},
|
||||
{"NO_MUSIC", NO_MUSIC}
|
||||
}
|
||||
End Get
|
||||
End Property
|
||||
|
|
|
@ -298,6 +298,12 @@
|
|||
GameModeManager.SetGameModePointer("Kolben")
|
||||
Localization.LocalizationTokens.Clear()
|
||||
Localization.LoadTokenFile(GameMode.DefaultLocalizationsPath, False)
|
||||
Core.OffsetMaps.Clear()
|
||||
TextureManager.TextureList.Clear()
|
||||
TextureManager.TextureRectList.Clear()
|
||||
Water.ClearAnimationResources()
|
||||
Whirlpool.LoadedWaterTemp = False
|
||||
Waterfall.ClearAnimationResources()
|
||||
Core.SetScreen(New PressStartScreen())
|
||||
Core.Player.loadedSave = False
|
||||
End Sub
|
||||
|
|
|
@ -8,7 +8,7 @@ Public Class PressStartScreen
|
|||
|
||||
Inherits Screen
|
||||
|
||||
Private _fadeInMain As Single = 1.0F
|
||||
Public _fadeInMain As Single = 1.0F
|
||||
Private _introDelay As Single = 4.0F
|
||||
Private _logoFade As Single = 1.0F
|
||||
|
||||
|
@ -251,21 +251,21 @@ Public Class NewMainMenuScreen
|
|||
|
||||
Inherits Screen
|
||||
|
||||
Private _screenOffset As Vector2 = New Vector2(0, 0) 'Position of the top row relative to the _screenOrigin
|
||||
Private _screenOffsetTarget As Vector2 = New Vector2(0, 0) 'Target where the top needs to move to
|
||||
Private _screenOrigin As Vector2 = New Vector2(CSng(windowSize.Width / 2 - 80 - 180), CInt(windowSize.Height / 4)) 'Center of the game window. It's adjusted when resizing the window.
|
||||
Public _screenOffset As Vector2 = New Vector2(0, 0) 'Position of the top row relative to the _screenOrigin
|
||||
Public _screenOffsetTarget As Vector2 = New Vector2(0, 0) 'Target where the top needs to move to
|
||||
Public _screenOrigin As Vector2 = New Vector2(CSng(windowSize.Width / 2 - 80 - 180), CInt(windowSize.Height / 4)) 'Center of the game window. It's adjusted when resizing the window.
|
||||
Private _mainOffset As Vector2 = _screenOffset
|
||||
|
||||
Private _optionsOffset As Vector2 = New Vector2(0, 0) 'Position of the options row relative to the _screenOrigin
|
||||
Private _optionsOffsetTarget As Vector2 = New Vector2(0, 0) 'Target where the options row needs to move to
|
||||
Public _optionsOffset As Vector2 = New Vector2(0, 0) 'Position of the options row relative to the _screenOrigin
|
||||
Public _optionsOffsetTarget As Vector2 = New Vector2(0, 0) 'Target where the options row needs to move to
|
||||
|
||||
Private _gameJoltOffset As Vector2 = New Vector2(0, 0) 'Position of the gamejolt row relative to the _screenOrigin
|
||||
Private _gameJoltOffsetTarget As Vector2 = New Vector2(0, 0) 'Target where the gamejolt needs to move to
|
||||
|
||||
|
||||
Private _loading As Boolean = True
|
||||
Private _fadeInMain As Single = 0F
|
||||
Private _fadeInOptions As Single = 0F
|
||||
Public _fadeInMain As Single = 0F
|
||||
Public _fadeInOptions As Single = 0F
|
||||
Private _fadeInGameJolt As Single = 0F
|
||||
Private _GameJoltOpacity As Single = 0F
|
||||
Private _expandDisplay As Single = 0F
|
||||
|
|
|
@ -515,9 +515,26 @@
|
|||
For Each s As String In Core.GameOptions.ContentPackNames
|
||||
ContentPackManager.Load(GameController.GamePath & "\ContentPacks\" & s & "\exceptions.dat")
|
||||
Next
|
||||
SoundManager.PlaySound("save", False)
|
||||
Core.GameOptions.ChangedPack = True
|
||||
Core.OffsetMaps.Clear()
|
||||
|
||||
Dim PressStart = Me.PreScreen.PreScreen
|
||||
Me.PreScreen = New NewMainMenuScreen(PressStart)
|
||||
Dim MainMenu As NewMainMenuScreen = CType(Me.PreScreen, NewMainMenuScreen)
|
||||
SetScreen(New NewOptionScreen(Me.PreScreen, 4))
|
||||
MainMenu._fadeInMain = 1.0F
|
||||
MainMenu._fadeInOptions = 1.0F
|
||||
MainMenu._screenOffsetTarget.Y = 0 - 180 - 32
|
||||
MainMenu._screenOffset.Y = MainMenu._screenOffsetTarget.Y
|
||||
MainMenu._screenOffsetTarget.X = 180
|
||||
MainMenu._screenOffset.X = MainMenu._screenOffsetTarget.X
|
||||
MainMenu._optionsOffsetTarget.X = -360
|
||||
MainMenu._optionsOffset.X = MainMenu._optionsOffsetTarget.X
|
||||
|
||||
NewMainMenuScreen._selectedProfileTemp = 0
|
||||
NewMainMenuScreen._selectedProfile = 3
|
||||
NewMainMenuScreen._menuIndex = 2
|
||||
|
||||
SoundManager.PlaySound("save", False)
|
||||
MusicManager.Play("title")
|
||||
End If
|
||||
End Sub
|
||||
|
|
Loading…
Reference in New Issue