mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-02-18 04:01:11 +00:00
fix this lol
This commit is contained in:
parent
ae28360b4a
commit
f73808fa89
1 changed files with 11 additions and 0 deletions
|
|
@ -297,6 +297,8 @@ class MarblePickerGui extends GuiImage {
|
|||
mbOpt.position = new Vector(380, yPos);
|
||||
mbOpt.extent = new Vector(815, 94);
|
||||
mbOpt.setCurrentOption(Settings.optionsSettings.marbleIndex);
|
||||
var curToken = 0;
|
||||
|
||||
mbOpt.onChangeFunc = (idx) -> {
|
||||
var selectedMarble = marbleData[idx];
|
||||
Settings.optionsSettings.marbleIndex = idx;
|
||||
|
|
@ -305,8 +307,14 @@ class MarblePickerGui extends GuiImage {
|
|||
Settings.optionsSettings.marbleModel = selectedMarble.dts;
|
||||
Settings.optionsSettings.marbleShader = selectedMarble.shader;
|
||||
ResourceLoader.load(Settings.optionsSettings.marbleModel).entry.load(() -> {
|
||||
if (changeToken + 1 != curToken)
|
||||
return;
|
||||
@:privateAccess MarbleGame.instance.previewWorld.removeMarble(myMarb);
|
||||
@:privateAccess MarbleGame.instance.previewWorld.spawnMarble(marb -> {
|
||||
if (changeToken + 1 != curToken) {
|
||||
@:privateAccess MarbleGame.instance.previewWorld.removeMarble(marb);
|
||||
return;
|
||||
}
|
||||
var spawnPos = @:privateAccess MarbleGame.instance.scene.camera.pos.add(new Vector(0, 1, 1));
|
||||
var velAdd = new Vector((1 - 2 * Math.random()) * 2, (1 - 2 * Math.random()) * 1.5, (1 - 2 * Math.random()) * 1);
|
||||
velAdd = velAdd.add(new Vector(0, 3, 0));
|
||||
|
|
@ -334,6 +342,9 @@ class MarblePickerGui extends GuiImage {
|
|||
backButton.accelerators = [hxd.Key.ENTER];
|
||||
backButton.pressedAction = (e) -> {
|
||||
this.bmp.visible = true;
|
||||
mbOpt.onChangeFunc = (e) -> {
|
||||
return false;
|
||||
}; // Fix that marbug
|
||||
MarbleGame.instance.setPreviewMission(prevPreview, () -> {
|
||||
MarbleGame.canvas.setContent(new OptionsListGui());
|
||||
}, false);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue