Added option for running hold/toggle mode
This commit is contained in:
parent
87210c3ed6
commit
a017bb653d
|
@ -431,6 +431,7 @@
|
|||
|
||||
Public PlayerTemp As New PlayerTemp()
|
||||
|
||||
Public RunMode As Boolean = True
|
||||
Public RunToggled As Boolean = False
|
||||
|
||||
Public Structure Temp
|
||||
|
@ -822,6 +823,8 @@
|
|||
Skin = Value
|
||||
Case "battleanimations"
|
||||
ShowBattleAnimations = CInt(Value)
|
||||
Case "runmode"
|
||||
RunMode = CBool(Value)
|
||||
Case "boxamount"
|
||||
BoxAmount = CInt(Value)
|
||||
Case "lastrestplace"
|
||||
|
@ -1319,13 +1322,14 @@
|
|||
"PlayTime|" & PlayTimeString & Environment.NewLine &
|
||||
"OT|" & OT & Environment.NewLine &
|
||||
"Points|" & Points.ToString() & Environment.NewLine &
|
||||
"hasPokedex|" & hasPokedexString & Environment.NewLine &
|
||||
"hasPokegear|" & HasPokegear.ToNumberString() & Environment.NewLine &
|
||||
"freeCamera|" & freeCameraString & Environment.NewLine &
|
||||
"thirdPerson|" & c.ThirdPerson.ToNumberString() & Environment.NewLine &
|
||||
"skin|" & skin & Environment.NewLine &
|
||||
"location|" & Screen.Level.MapName & Environment.NewLine &
|
||||
"battleAnimations|" & ShowBattleAnimations.ToString() & Environment.NewLine &
|
||||
"HasPokedex|" & hasPokedexString & Environment.NewLine &
|
||||
"HasPokegear|" & HasPokegear.ToNumberString() & Environment.NewLine &
|
||||
"FreeCamera|" & freeCameraString & Environment.NewLine &
|
||||
"ThirdPerson|" & c.ThirdPerson.ToNumberString() & Environment.NewLine &
|
||||
"Skin|" & skin & Environment.NewLine &
|
||||
"Location|" & Screen.Level.MapName & Environment.NewLine &
|
||||
"BattleAnimations|" & ShowBattleAnimations.ToString() & Environment.NewLine &
|
||||
"RunMode|" & RunMode.ToNumberString() & Environment.NewLine &
|
||||
"BoxAmount|" & BoxAmount.ToString() & Environment.NewLine &
|
||||
"LastRestPlace|" & LastRestPlace & Environment.NewLine &
|
||||
"LastRestPlacePosition|" & LastRestPlacePosition & Environment.NewLine &
|
||||
|
@ -1335,7 +1339,7 @@
|
|||
"LastSavePlacePosition|" & LastSavePlacePosition & Environment.NewLine &
|
||||
"Difficulty|" & DifficultyMode.ToString() & Environment.NewLine &
|
||||
"BattleStyle|" & BattleStyle.ToString() & Environment.NewLine &
|
||||
"saveCreated|" & SaveCreated & Environment.NewLine &
|
||||
"SaveCreated|" & SaveCreated & Environment.NewLine &
|
||||
"LastPokemonPosition|" & lastPokemonPosition & Environment.NewLine &
|
||||
"DaycareSteps|" & DaycareSteps.ToString() & Environment.NewLine &
|
||||
"GameMode|" & GameMode & Environment.NewLine &
|
||||
|
@ -2017,7 +2021,14 @@
|
|||
End Function
|
||||
|
||||
Public Function IsRunning() As Boolean
|
||||
Return RunToggled
|
||||
If RunMode = True Then
|
||||
Return RunToggled
|
||||
ElseIf KeyBoardHandler.KeyDown(Keys.LeftShift) = True Or ControllerHandler.ButtonDown(Buttons.B) = True Then
|
||||
If Screen.Level.Riding = False And Screen.Level.Surfing = False And Inventory.HasRunningShoes = True Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Sub Unload()
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
Dim ShowModels As Integer = 1
|
||||
Dim Muted As Integer = 0
|
||||
Dim GamePadEnabled As Boolean = True
|
||||
Dim RunMode As Boolean = True
|
||||
Dim PreferMultiSampling As Boolean = True
|
||||
Private _subMenu As Integer = 0
|
||||
Private _screenSize As Size = New Size(CInt(windowSize.Width), CInt(windowSize.Height))
|
||||
|
@ -114,6 +115,7 @@
|
|||
Me.TextSpeed = TextBox.TextSpeed
|
||||
Me.CameraSpeed = CInt(Camera.RotationSpeed * 10000)
|
||||
Me.Difficulty = Core.Player.DifficultyMode
|
||||
Me.RunMode = Core.Player.RunMode
|
||||
End If
|
||||
Me.Music = CInt(MusicManager.MasterVolume * 100)
|
||||
Me.Sound = CInt(SoundManager.Volume * 100)
|
||||
|
@ -959,8 +961,9 @@
|
|||
d.Add(50, Localization.GetString("option_screen_controls_cameraspeed_fastest", "SPEED OF LIGHT!"))
|
||||
Me.ControlList.Add(New ScrollBar(New Vector2(Delta_X + 100, Delta_Y + 60), 400, Localization.GetString("option_screen_controls_cameraspeed", "Camera Speed"), Me.CameraSpeed, 1, 50, AddressOf ChangeCameraSpeed, d, 1))
|
||||
Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100, Delta_Y + 120), 5, 64, Localization.GetString("option_screen_controls_xboxgamepad", "Xbox Gamepad"), Me.GamePadEnabled, AddressOf ToggleXBOX360Controller, {"Disabled", "Enabled"}.ToList(), 2))
|
||||
Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 100, Delta_Y + 200), 3, 64, Localization.GetString("option_screen_controls_resetkeybindings", "Reset Key Bindings"), AddressOf ResetKeyBindings, 3))
|
||||
Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 327), 1, 48, Localization.GetString("global_back", "Back"), AddressOf SwitchToMain, 4))
|
||||
Me.ControlList.Add(New ToggleButton(New Vector2(Delta_X + 100, Delta_Y + 200), 5, 64, Localization.GetString("option_screen_controls_running", "Running"), Me.RunMode, AddressOf ToggleRunningToggle, {"Hold", "Toggle"}.ToList(), 3))
|
||||
Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 100, Delta_Y + 280), 3, 64, Localization.GetString("option_screen_controls_resetkeybindings", "Reset Key Bindings"), AddressOf ResetKeyBindings, 4))
|
||||
Me.ControlList.Add(New CommandButton(New Vector2(Delta_X + 530 + 24, Delta_Y + 327), 1, 48, Localization.GetString("global_back", "Back"), AddressOf SwitchToMain, 5))
|
||||
End If
|
||||
|
||||
Case 5 ' "Audio" from the Options menu.
|
||||
|
@ -1060,6 +1063,7 @@
|
|||
TextBox.TextSpeed = Me.TextSpeed
|
||||
Camera.RotationSpeed = CSng(Me.CameraSpeed / 10000)
|
||||
Screen.Level.World.Initialize(Screen.Level.EnvironmentType, Screen.Level.WeatherType)
|
||||
Core.Player.RunMode = Me.RunMode
|
||||
Me.PreScreen.Update()
|
||||
End If
|
||||
Core.Player.ShowBattleAnimations = Me.ShowBattleAnimations
|
||||
|
@ -1246,6 +1250,9 @@
|
|||
Private Sub ToggleXBOX360Controller(ByVal c As ToggleButton)
|
||||
Me.GamePadEnabled = Not Me.GamePadEnabled
|
||||
End Sub
|
||||
Private Sub ToggleRunningToggle(ByVal c As ToggleButton)
|
||||
Me.RunMode = Not Me.RunMode
|
||||
End Sub
|
||||
|
||||
Private Sub ChangeCameraSpeed(ByVal c As ScrollBar)
|
||||
Me.CameraSpeed = c.Value
|
||||
|
|
Loading…
Reference in New Issue