mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
fix this
This commit is contained in:
parent
4241792a1e
commit
b10f071d87
4 changed files with 7 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class TouchEventState {
|
|||
}
|
||||
|
||||
class TouchInput {
|
||||
var cameraInput:CameraInput;
|
||||
public var cameraInput:CameraInput;
|
||||
|
||||
public var movementInput:MovementInput;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue