mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-04-26 20:51:38 +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.position = new Vector(380, yPos);
|
||||||
mbOpt.extent = new Vector(815, 94);
|
mbOpt.extent = new Vector(815, 94);
|
||||||
mbOpt.setCurrentOption(Settings.optionsSettings.marbleIndex);
|
mbOpt.setCurrentOption(Settings.optionsSettings.marbleIndex);
|
||||||
|
var curToken = 0;
|
||||||
|
|
||||||
mbOpt.onChangeFunc = (idx) -> {
|
mbOpt.onChangeFunc = (idx) -> {
|
||||||
var selectedMarble = marbleData[idx];
|
var selectedMarble = marbleData[idx];
|
||||||
Settings.optionsSettings.marbleIndex = idx;
|
Settings.optionsSettings.marbleIndex = idx;
|
||||||
|
|
@ -305,8 +307,14 @@ class MarblePickerGui extends GuiImage {
|
||||||
Settings.optionsSettings.marbleModel = selectedMarble.dts;
|
Settings.optionsSettings.marbleModel = selectedMarble.dts;
|
||||||
Settings.optionsSettings.marbleShader = selectedMarble.shader;
|
Settings.optionsSettings.marbleShader = selectedMarble.shader;
|
||||||
ResourceLoader.load(Settings.optionsSettings.marbleModel).entry.load(() -> {
|
ResourceLoader.load(Settings.optionsSettings.marbleModel).entry.load(() -> {
|
||||||
|
if (changeToken + 1 != curToken)
|
||||||
|
return;
|
||||||
@:privateAccess MarbleGame.instance.previewWorld.removeMarble(myMarb);
|
@:privateAccess MarbleGame.instance.previewWorld.removeMarble(myMarb);
|
||||||
@:privateAccess MarbleGame.instance.previewWorld.spawnMarble(marb -> {
|
@: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 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);
|
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));
|
velAdd = velAdd.add(new Vector(0, 3, 0));
|
||||||
|
|
@ -334,6 +342,9 @@ class MarblePickerGui extends GuiImage {
|
||||||
backButton.accelerators = [hxd.Key.ENTER];
|
backButton.accelerators = [hxd.Key.ENTER];
|
||||||
backButton.pressedAction = (e) -> {
|
backButton.pressedAction = (e) -> {
|
||||||
this.bmp.visible = true;
|
this.bmp.visible = true;
|
||||||
|
mbOpt.onChangeFunc = (e) -> {
|
||||||
|
return false;
|
||||||
|
}; // Fix that marbug
|
||||||
MarbleGame.instance.setPreviewMission(prevPreview, () -> {
|
MarbleGame.instance.setPreviewMission(prevPreview, () -> {
|
||||||
MarbleGame.canvas.setContent(new OptionsListGui());
|
MarbleGame.canvas.setContent(new OptionsListGui());
|
||||||
}, false);
|
}, false);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue