fix compile bugs

This commit is contained in:
RandomityGuy 2023-05-29 21:37:32 +05:30
parent 70081be3cb
commit 5e487c9b70
5 changed files with 7 additions and 8 deletions

View file

@ -44,6 +44,7 @@ typedef OptionsSettings = {
var marbleShader:String; var marbleShader:String;
var cameraDistance:Float; var cameraDistance:Float;
var rewindEnabled:Bool; var rewindEnabled:Bool;
var rewindTimescale:Float;
} }
typedef ControlsSettings = { typedef ControlsSettings = {
@ -127,6 +128,7 @@ class Settings {
marbleShader: "Default", marbleShader: "Default",
cameraDistance: 2.5, cameraDistance: 2.5,
rewindEnabled: false, rewindEnabled: false,
rewindTimescale: 1.0,
vsync: #if js true #end vsync: #if js true #end
#if hl #if hl
false false
@ -394,6 +396,8 @@ class Settings {
if (gamepadSettings.rewind == null) { if (gamepadSettings.rewind == null) {
gamepadSettings.rewind = ["Y"]; gamepadSettings.rewind = ["Y"];
} }
if (optionsSettings.rewindTimescale == 0)
optionsSettings.rewindTimescale = 1;
if (json.stats != null) { if (json.stats != null) {
playStatistics = json.stats; playStatistics = json.stats;
} }

View file

@ -57,7 +57,6 @@ class GuiConsoleScrollCtrl extends GuiControl {
var scrollDownPressedTile = scrollBar.sub(19, 19, 18, 17); var scrollDownPressedTile = scrollBar.sub(19, 19, 18, 17);
var scrollUpDisabledTile = scrollBar.sub(38, 1, 18, 17); var scrollUpDisabledTile = scrollBar.sub(38, 1, 18, 17);
var scrollDownDisabledTile = scrollBar.sub(38, 19, 18, 17); var scrollDownDisabledTile = scrollBar.sub(38, 19, 18, 17);
this._manualScroll = true;
this.scrollTrack = new GuiImage(scrollTrackTile); this.scrollTrack = new GuiImage(scrollTrackTile);
this.addChild(this.scrollTrack); this.addChild(this.scrollTrack);

View file

@ -93,7 +93,6 @@ class GuiScrollCtrl extends GuiControl {
public override function getRenderRectangle():Rect { public override function getRenderRectangle():Rect {
var rrec = super.getRenderRectangle(); 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; return rrec;
} }
@ -197,7 +196,6 @@ class GuiScrollCtrl extends GuiControl {
if (Util.isTouchDevice()) { if (Util.isTouchDevice()) {
this.pressed = false; this.pressed = false;
this.dirty = true; this.dirty = true;
deltaY = 0;
this.updateScrollVisual(); this.updateScrollVisual();
} }
} }
@ -206,8 +204,7 @@ class GuiScrollCtrl extends GuiControl {
if (Util.isTouchDevice()) { if (Util.isTouchDevice()) {
super.onMouseMove(mouseState); super.onMouseMove(mouseState);
if (this.pressed) { if (this.pressed) {
var dy = (mouseState.position.y - this.prevMousePos.y) * scrollSpeed / this.maxScrollY; var dy = mouseState.position.y - this.prevMousePos.y;
deltaY = -dy;
this.scrollY -= dy; this.scrollY -= dy;
this.prevMousePos = mouseState.position; this.prevMousePos = mouseState.position;
this.updateScrollVisual(); this.updateScrollVisual();

View file

@ -81,7 +81,6 @@ class HelpCreditsGui extends GuiImage {
.toTile()); .toTile());
scrollCtrl2.position = new Vector(219, 28); scrollCtrl2.position = new Vector(219, 28);
scrollCtrl2.extent = new Vector(386, 342); scrollCtrl2.extent = new Vector(386, 342);
scrollCtrl2.childrenHandleScroll = true;
wnd.addChild(scrollCtrl2); wnd.addChild(scrollCtrl2);
var arial14fontdata = ResourceLoader.getFileEntry("data/font/arial.fnt"); var arial14fontdata = ResourceLoader.getFileEntry("data/font/arial.fnt");

View file

@ -912,7 +912,7 @@ class PlayMissionGui extends GuiImage {
} }
pmPreview.addChild(pmEgg); pmPreview.addChild(pmEgg);
pmEgg.render(MarbleGame.canvas.scene2d, @:privateAccess pmPreview._flow); pmEgg.render(MarbleGame.canvas.scene2d);
} }
// if (currentCategory != "custom" // if (currentCategory != "custom"