diff --git a/src/Settings.hx b/src/Settings.hx index 401d1596..2f4b81c4 100644 --- a/src/Settings.hx +++ b/src/Settings.hx @@ -44,6 +44,7 @@ typedef OptionsSettings = { var marbleShader:String; var cameraDistance:Float; var rewindEnabled:Bool; + var rewindTimescale:Float; } typedef ControlsSettings = { @@ -127,6 +128,7 @@ class Settings { marbleShader: "Default", cameraDistance: 2.5, rewindEnabled: false, + rewindTimescale: 1.0, vsync: #if js true #end #if hl false @@ -394,6 +396,8 @@ class Settings { if (gamepadSettings.rewind == null) { gamepadSettings.rewind = ["Y"]; } + if (optionsSettings.rewindTimescale == 0) + optionsSettings.rewindTimescale = 1; if (json.stats != null) { playStatistics = json.stats; } diff --git a/src/gui/GuiConsoleScrollCtrl.hx b/src/gui/GuiConsoleScrollCtrl.hx index 91f2dbb1..5e3b36bd 100644 --- a/src/gui/GuiConsoleScrollCtrl.hx +++ b/src/gui/GuiConsoleScrollCtrl.hx @@ -57,7 +57,6 @@ class GuiConsoleScrollCtrl extends GuiControl { var scrollDownPressedTile = scrollBar.sub(19, 19, 18, 17); var scrollUpDisabledTile = scrollBar.sub(38, 1, 18, 17); var scrollDownDisabledTile = scrollBar.sub(38, 19, 18, 17); - this._manualScroll = true; this.scrollTrack = new GuiImage(scrollTrackTile); this.addChild(this.scrollTrack); diff --git a/src/gui/GuiScrollCtrl.hx b/src/gui/GuiScrollCtrl.hx index 26bb7cd6..2bb4e489 100644 --- a/src/gui/GuiScrollCtrl.hx +++ b/src/gui/GuiScrollCtrl.hx @@ -93,8 +93,7 @@ class GuiScrollCtrl extends GuiControl { public override function getRenderRectangle():Rect { var rrec = super.getRenderRectangle(); - if (!this.childrenHandleScroll) - rrec.scroll.y = scrollY * this.maxScrollY / rrec.extent.y; + rrec.scroll.y = scrollY * this.maxScrollY / rrec.extent.y; return rrec; } @@ -197,7 +196,6 @@ class GuiScrollCtrl extends GuiControl { if (Util.isTouchDevice()) { this.pressed = false; this.dirty = true; - deltaY = 0; this.updateScrollVisual(); } } @@ -206,8 +204,7 @@ class GuiScrollCtrl extends GuiControl { if (Util.isTouchDevice()) { super.onMouseMove(mouseState); if (this.pressed) { - var dy = (mouseState.position.y - this.prevMousePos.y) * scrollSpeed / this.maxScrollY; - deltaY = -dy; + var dy = mouseState.position.y - this.prevMousePos.y; this.scrollY -= dy; this.prevMousePos = mouseState.position; this.updateScrollVisual(); diff --git a/src/gui/HelpCreditsGui.hx b/src/gui/HelpCreditsGui.hx index 8cf2704b..277f346f 100644 --- a/src/gui/HelpCreditsGui.hx +++ b/src/gui/HelpCreditsGui.hx @@ -81,7 +81,6 @@ class HelpCreditsGui extends GuiImage { .toTile()); scrollCtrl2.position = new Vector(219, 28); scrollCtrl2.extent = new Vector(386, 342); - scrollCtrl2.childrenHandleScroll = true; wnd.addChild(scrollCtrl2); var arial14fontdata = ResourceLoader.getFileEntry("data/font/arial.fnt"); diff --git a/src/gui/PlayMissionGui.hx b/src/gui/PlayMissionGui.hx index d9bc46df..f681eb4c 100644 --- a/src/gui/PlayMissionGui.hx +++ b/src/gui/PlayMissionGui.hx @@ -912,7 +912,7 @@ class PlayMissionGui extends GuiImage { } pmPreview.addChild(pmEgg); - pmEgg.render(MarbleGame.canvas.scene2d, @:privateAccess pmPreview._flow); + pmEgg.render(MarbleGame.canvas.scene2d); } // if (currentCategory != "custom"