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 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;
}

View file

@ -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);

View file

@ -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();

View file

@ -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");

View file

@ -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"