diff --git a/src/CameraController.hx b/src/CameraController.hx index 4905dfd6..3eb8aecf 100644 --- a/src/CameraController.hx +++ b/src/CameraController.hx @@ -27,6 +27,7 @@ import h3d.Vector; import hxsl.Types.Matrix; import h3d.scene.Scene; import src.Gamepad; +import src.MarbleGame; enum CameraMode { FreeOrbit; @@ -237,7 +238,9 @@ class CameraController extends Object { deltaX = deltaNew; // Center the pitch - if (!Settings.controlsSettings.alwaysFreeLook && !Key.isDown(Settings.controlsSettings.freelook)) { + if (!Settings.controlsSettings.alwaysFreeLook + && !Key.isDown(Settings.controlsSettings.freelook) + && !MarbleGame.instance.touchInput.cameraInput.pressed) { var rescaledY = deltaY; if (rescaledY <= 0.0) rescaledY = 0.4 - rescaledY * -0.75; diff --git a/src/gui/GuiConsoleScrollCtrl.hx b/src/gui/GuiConsoleScrollCtrl.hx index aab242c7..b4fae0e2 100644 --- a/src/gui/GuiConsoleScrollCtrl.hx +++ b/src/gui/GuiConsoleScrollCtrl.hx @@ -147,7 +147,7 @@ class GuiConsoleScrollCtrl extends GuiControl { public override function render(scene2d:Scene) { this.dirty = true; - this.scrollTrack.position = new Vector(extent.x - 18 * Settings.uiScale, 0); + this.scrollTrack.position = new Vector(extent.x - 18, 0); this.scrollTrack.extent = new Vector(18, this.extent.y); scrollUpButton.position = new Vector(this.extent.x - 18, 0); @@ -180,7 +180,6 @@ class GuiConsoleScrollCtrl extends GuiControl { var scrollBarYSize = (renderRect.extent.y * renderRect.extent.y / (maxScrollY * Settings.uiScale)); var scrollYOld = scrollY; - this.scrollTrack.bmp.scaleY = renderRect.extent.y; this.scrollY = Util.clamp(scrollY, 0, renderRect.extent.y - scrollBarYSize * Settings.uiScale); scrollBarYSize = Math.max(scrollBarYSize, 13); diff --git a/src/touch/CameraInput.hx b/src/touch/CameraInput.hx index 6c4199e6..4fa68e62 100644 --- a/src/touch/CameraInput.hx +++ b/src/touch/CameraInput.hx @@ -13,6 +13,7 @@ class CameraInput { var identifier:Int = -1; public var enabled = false; + public var pressed = false; var added = false; @@ -35,8 +36,6 @@ class CameraInput { this.collider.horizSizing = Width; this.collider.vertSizing = Height; - var pressed = false; - var prevMouse = new Vector(0, 0); interactive.onPush = (e) -> { e.propagate = true; diff --git a/src/touch/TouchInput.hx b/src/touch/TouchInput.hx index 3fc0e430..f5085884 100644 --- a/src/touch/TouchInput.hx +++ b/src/touch/TouchInput.hx @@ -34,7 +34,7 @@ class TouchEventState { } class TouchInput { - var cameraInput:CameraInput; + public var cameraInput:CameraInput; public var movementInput:MovementInput;