the last changes
|
|
@ -1,5 +1,5 @@
|
||||||
# 1.1.13
|
# 1.1.13
|
||||||
This update brings to bring feature and bugfix parity with the latest MBP version:
|
This update brings feature and bugfix parity with the latest MBP version:
|
||||||
- Fixed a ton of bugs that were fixed in MBP since the last update.
|
- Fixed a ton of bugs that were fixed in MBP since the last update.
|
||||||
- Updated the options menu to have more meaningful options and add more options for touch controls.
|
- Updated the options menu to have more meaningful options and add more options for touch controls.
|
||||||
- Added Import and Export Progress to Options menu to transfer game progress between devices.
|
- Added Import and Export Progress to Options menu to transfer game progress between devices.
|
||||||
|
|
|
||||||
BIN
data/ui/discord.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
data/ui/icon_mbp.png
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
data/ui/icon_mbu.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 15 KiB |
|
|
@ -73,15 +73,8 @@ class MarbleGame {
|
||||||
|
|
||||||
js.Browser.document.addEventListener('pointerlockchange', () -> {
|
js.Browser.document.addEventListener('pointerlockchange', () -> {
|
||||||
if (!paused && world != null) {
|
if (!paused && world != null) {
|
||||||
if (world.finishTime == null && world._ready && @:privateAccess !world.playGui.isChatFocused()) {
|
if (world.finishTime == null && world._ready) {
|
||||||
if (js.Browser.document.pointerLockElement != @:privateAccess Window.getInstance().canvas) {
|
if (js.Browser.document.pointerLockElement != @:privateAccess Window.getInstance().canvas) {
|
||||||
if (MarbleGame.canvas.children[MarbleGame.canvas.children.length - 1] is MPPreGameDlg
|
|
||||||
|| (Net.isMP
|
|
||||||
&& paused
|
|
||||||
&& !(MarbleGame.canvas.children[MarbleGame.canvas.children.length - 1] is MPExitGameDlg))) {
|
|
||||||
return; // don't pause
|
|
||||||
}
|
|
||||||
|
|
||||||
handlePauseGame();
|
handlePauseGame();
|
||||||
// Focus the shit again
|
// Focus the shit again
|
||||||
var jsCanvas = @:privateAccess Window.getInstance().canvas;
|
var jsCanvas = @:privateAccess Window.getInstance().canvas;
|
||||||
|
|
@ -150,22 +143,12 @@ class MarbleGame {
|
||||||
js.Browser.window.addEventListener('keydown', (e:js.html.KeyboardEvent) -> {
|
js.Browser.window.addEventListener('keydown', (e:js.html.KeyboardEvent) -> {
|
||||||
var buttonCode = (e.keyCode);
|
var buttonCode = (e.keyCode);
|
||||||
@:privateAccess Key.keyPressed[buttonCode] = Key.getFrame();
|
@:privateAccess Key.keyPressed[buttonCode] = Key.getFrame();
|
||||||
if (world != null && @:privateAccess world.playGui.isChatFocused()) {
|
|
||||||
@:privateAccess Window.getInstance().onKeyDown(e);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
js.Browser.window.addEventListener('keyup', (e:js.html.KeyboardEvent) -> {
|
js.Browser.window.addEventListener('keyup', (e:js.html.KeyboardEvent) -> {
|
||||||
var buttonCode = (e.keyCode);
|
var buttonCode = (e.keyCode);
|
||||||
@:privateAccess Key.keyPressed[buttonCode] = -Key.getFrame();
|
@:privateAccess Key.keyPressed[buttonCode] = -Key.getFrame();
|
||||||
if (world != null && @:privateAccess world.playGui.isChatFocused()) {
|
|
||||||
@:privateAccess Window.getInstance().onKeyUp(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
js.Browser.window.addEventListener('keypress', (e:js.html.KeyboardEvent) -> {
|
|
||||||
if (world != null && @:privateAccess world.playGui.isChatFocused()) {
|
|
||||||
@:privateAccess Window.getInstance().onKeyPress(e);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
js.Browser.window.addEventListener('keypress', (e:js.html.KeyboardEvent) -> {});
|
||||||
|
|
||||||
pointercontainer.addEventListener('touchstart', (e:js.html.TouchEvent) -> {
|
pointercontainer.addEventListener('touchstart', (e:js.html.TouchEvent) -> {
|
||||||
@:privateAccess Key.keyPressed[Key.MOUSE_LEFT] = Key.getFrame();
|
@:privateAccess Key.keyPressed[Key.MOUSE_LEFT] = Key.getFrame();
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ class ResourceLoader {
|
||||||
|
|
||||||
static function preloadMusic(onFinish:Void->Void) {
|
static function preloadMusic(onFinish:Void->Void) {
|
||||||
var worker = new ResourceLoaderWorker(onFinish);
|
var worker = new ResourceLoaderWorker(onFinish);
|
||||||
worker.loadFile("sound/music/shell.ogg");
|
worker.loadFile("sound/shell.ogg");
|
||||||
worker.loadFile("sound/groovepolice.ogg");
|
worker.loadFile("sound/groovepolice.ogg");
|
||||||
worker.loadFile("sound/classic vibe.ogg");
|
worker.loadFile("sound/classic vibe.ogg");
|
||||||
worker.loadFile("sound/beach party.ogg");
|
worker.loadFile("sound/beach party.ogg");
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,13 @@ class MainMenuGui extends GuiImage {
|
||||||
return [normal, hover, pressed];
|
return [normal, hover, pressed];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function loadStaticButtonImages(path:String) {
|
||||||
|
var normal = ResourceLoader.getResource('${path}.png', ResourceLoader.getImage, this.imageResources).toTile();
|
||||||
|
var hover = ResourceLoader.getResource('${path}.png', ResourceLoader.getImage, this.imageResources).toTile();
|
||||||
|
var pressed = ResourceLoader.getResource('${path}.png', ResourceLoader.getImage, this.imageResources).toTile();
|
||||||
|
return [normal, hover, pressed];
|
||||||
|
}
|
||||||
|
|
||||||
var playButton = new GuiButton(loadButtonImages("data/ui/home/play"));
|
var playButton = new GuiButton(loadButtonImages("data/ui/home/play"));
|
||||||
playButton.position = new Vector(50, 113);
|
playButton.position = new Vector(50, 113);
|
||||||
playButton.extent = new Vector(270, 95);
|
playButton.extent = new Vector(270, 95);
|
||||||
|
|
@ -98,6 +105,38 @@ class MainMenuGui extends GuiImage {
|
||||||
}
|
}
|
||||||
this.addChild(changelogButton);
|
this.addChild(changelogButton);
|
||||||
|
|
||||||
|
#if js
|
||||||
|
var mbp = new GuiButton(loadStaticButtonImages("data/ui/icon_mbp"));
|
||||||
|
mbp.horizSizing = Right;
|
||||||
|
mbp.vertSizing = Top;
|
||||||
|
mbp.position = new Vector(0, 380);
|
||||||
|
mbp.extent = new Vector(76, 76);
|
||||||
|
mbp.pressedAction = (sender) -> {
|
||||||
|
js.Browser.window.open("https://marbleblast.randomityguy.me");
|
||||||
|
}
|
||||||
|
this.addChild(mbp);
|
||||||
|
|
||||||
|
var mbu = new GuiButton(loadStaticButtonImages("data/ui/icon_mbu"));
|
||||||
|
mbu.horizSizing = Right;
|
||||||
|
mbu.vertSizing = Top;
|
||||||
|
mbu.position = new Vector(76, 380);
|
||||||
|
mbu.extent = new Vector(76, 76);
|
||||||
|
mbu.pressedAction = (sender) -> {
|
||||||
|
js.Browser.window.open("https://marbleblastultra.randomityguy.me");
|
||||||
|
}
|
||||||
|
this.addChild(mbu);
|
||||||
|
|
||||||
|
var discord = new GuiButton(loadStaticButtonImages("data/ui/discord"));
|
||||||
|
discord.horizSizing = Right;
|
||||||
|
discord.vertSizing = Top;
|
||||||
|
discord.position = new Vector(0, 320);
|
||||||
|
discord.extent = new Vector(152, 60);
|
||||||
|
discord.pressedAction = (sender) -> {
|
||||||
|
js.Browser.window.open("https://discord.gg/q4JdnRbVhF");
|
||||||
|
}
|
||||||
|
this.addChild(discord);
|
||||||
|
#end
|
||||||
|
|
||||||
var kofi = new GuiButton(loadButtonImages("data/ui/kofi1"));
|
var kofi = new GuiButton(loadButtonImages("data/ui/kofi1"));
|
||||||
kofi.horizSizing = Left;
|
kofi.horizSizing = Left;
|
||||||
kofi.vertSizing = Top;
|
kofi.vertSizing = Top;
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ class PlayMissionGui extends GuiImage {
|
||||||
tabCustom.extent = new Vector(52, 198);
|
tabCustom.extent = new Vector(52, 198);
|
||||||
tabCustom.pressedAction = (sender) -> {
|
tabCustom.pressedAction = (sender) -> {
|
||||||
#if (js || android)
|
#if (js || android)
|
||||||
var mbo = new MessageBoxYesNoDlg("The custom level browser is not available in this game.\n Please play Marble Blast Platinum to get access to 7000+ cummunity made customs of both Marble Blast Gold and Marble Blast Platinum. Visit download link?",
|
var mbo = new MessageBoxYesNoDlg("The custom level browser is not available in this game.\n Please play Marble Blast Platinum to get access to 7000+ community made customs of both Marble Blast Gold and Marble Blast Platinum. Visit download link?",
|
||||||
() -> {
|
() -> {
|
||||||
#if sys
|
#if sys
|
||||||
hxd.System.openURL("https://github.com/RandomityGuy/MBHaxe");
|
hxd.System.openURL("https://github.com/RandomityGuy/MBHaxe");
|
||||||
|
|
|
||||||