diff --git a/P3D/Input/ControllerHandler.vb b/P3D/Input/ControllerHandler.vb index 93afc228c..9ff9444a3 100644 --- a/P3D/Input/ControllerHandler.vb +++ b/P3D/Input/ControllerHandler.vb @@ -53,7 +53,7 @@ Return (GamePad.GetState(CType(index, PlayerIndex)).IsConnected = True And Core.GameOptions.GamePadEnabled = True) End Function - Public Shared Function HasControlerInput(Optional ByVal index As Integer = 0) As Boolean + Public Shared Function HasControllerInput(Optional ByVal index As Integer = 0) As Boolean If IsConnected() = False Then Return False End If diff --git a/P3D/Input/Controls.vb b/P3D/Input/Controls.vb index a0e6c3073..726b40ed3 100644 --- a/P3D/Input/Controls.vb +++ b/P3D/Input/Controls.vb @@ -350,7 +350,7 @@ Core.GameInstance.IsMouseVisible = True End If ElseIf Core.GameInstance.IsMouseVisible = True Then - If ControllerHandler.HasControlerInput() = True Or Controls.HasKeyboardInput() = True Then + If ControllerHandler.HasControllerInput() = True Or Controls.HasKeyboardInput() = True Then Core.GameInstance.IsMouseVisible = False End If End If diff --git a/P3D/Network/GameJolt/GTS/WonderTradeScreen.vb b/P3D/Network/GameJolt/GTS/WonderTradeScreen.vb index bdb589bc1..682f39a5b 100644 --- a/P3D/Network/GameJolt/GTS/WonderTradeScreen.vb +++ b/P3D/Network/GameJolt/GTS/WonderTradeScreen.vb @@ -222,7 +222,7 @@ End If End If Case ScreenStates.Stopped - If KeyBoardHandler.GetPressedKeys().Count > 0 Or ControllerHandler.HasControlerInput() = True Or Controls.Accept() = True Or Controls.Dismiss() = True Then + If KeyBoardHandler.GetPressedKeys().Count > 0 Or ControllerHandler.HasControllerInput() = True Or Controls.Accept() = True Or Controls.Dismiss() = True Then SoundManager.PlaySound("select") CloseScreen() End If diff --git a/P3D/Network/Servers/DirectTradeScreen.vb b/P3D/Network/Servers/DirectTradeScreen.vb index de4c6d399..b537d5875 100644 --- a/P3D/Network/Servers/DirectTradeScreen.vb +++ b/P3D/Network/Servers/DirectTradeScreen.vb @@ -229,7 +229,7 @@ Case ScreenStates.Idle Me.UpdateIdle() Case ScreenStates.Stopped - If KeyBoardHandler.GetPressedKeys().Count > 0 Or ControllerHandler.HasControlerInput() = True Or Controls.Accept() = True Or Controls.Dismiss() = True Then + If KeyBoardHandler.GetPressedKeys().Count > 0 Or ControllerHandler.HasControllerInput() = True Or Controls.Accept() = True Or Controls.Dismiss() = True Then SoundManager.PlaySound("select") Core.SetScreen(Me.PreScreen) End If diff --git a/P3D/Network/Servers/PVPLobbyScreen.vb b/P3D/Network/Servers/PVPLobbyScreen.vb index 57ca4ebf9..a92e359ee 100644 --- a/P3D/Network/Servers/PVPLobbyScreen.vb +++ b/P3D/Network/Servers/PVPLobbyScreen.vb @@ -133,7 +133,7 @@ Case ScreenStates.Idle Me.UpdateIdle() Case ScreenStates.Stopped - If KeyBoardHandler.GetPressedKeys().Count > 0 Or ControllerHandler.HasControlerInput() = True Or Controls.Accept() = True Or Controls.Dismiss() = True Then + If KeyBoardHandler.GetPressedKeys().Count > 0 Or ControllerHandler.HasControllerInput() = True Or Controls.Accept() = True Or Controls.Dismiss() = True Then SoundManager.PlaySound("select") Core.SetScreen(Me.PreScreen) End If diff --git a/P3D/Overworld/OverworldCamera.vb b/P3D/Overworld/OverworldCamera.vb index 87f4f398d..e5d6b314c 100644 --- a/P3D/Overworld/OverworldCamera.vb +++ b/P3D/Overworld/OverworldCamera.vb @@ -221,7 +221,7 @@ Public Class OverworldCamera Dim dy As Single = mState.Y - oldY If gState.ThumbSticks.Right.Y <> 0.0F And Core.GameOptions.GamePadEnabled = True Then - dy = gState.ThumbSticks.Right.Y * 40.0F * -1.0F + dy = gState.ThumbSticks.Right.Y * 35.0F * -1.0F End If If _isFixed = False AndAlso (dx <> 0 OrElse dy <> 0) Then @@ -274,7 +274,14 @@ Public Class OverworldCamera _scrollDirection = 1 _scrollSpeed += _scrollSpeed.Clamp(0, 0.01) End If + If ControllerHandler.ButtonDown(Buttons.LeftTrigger) = True Then + If _scrollSpeed = 0.0F Or _scrollDirection <> 1 Then + _scrollSpeed = 0.002F + End If + _scrollDirection = 1 + _scrollSpeed += _scrollSpeed.Clamp(0, 0.002F) + End If If Controls.Up(True, False, True, False, False, False) = True Then If _scrollSpeed = 0.0F Or _scrollDirection <> -1 Then _scrollSpeed = 0.01F @@ -283,6 +290,14 @@ Public Class OverworldCamera _scrollDirection = -1 _scrollSpeed += _scrollSpeed.Clamp(0, 0.01) End If + If ControllerHandler.ButtonDown(Buttons.RightTrigger) = True Then + If _scrollSpeed = 0.0F Or _scrollDirection <> -1 Then + _scrollSpeed = 0.002F + End If + + _scrollDirection = -1 + _scrollSpeed += _scrollSpeed.Clamp(0, 0.002F) + End If _scrollSpeed = _scrollSpeed.Clamp(0, 0.08)