diff --git a/CHANGELOG.md b/CHANGELOG.md index 23fcdbc5..4d611913 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # 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. - 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. diff --git a/data/ui/discord.png b/data/ui/discord.png new file mode 100644 index 00000000..095aa8e3 Binary files /dev/null and b/data/ui/discord.png differ diff --git a/data/ui/icon_mbp.png b/data/ui/icon_mbp.png new file mode 100644 index 00000000..60fe4ae4 Binary files /dev/null and b/data/ui/icon_mbp.png differ diff --git a/data/ui/icon_mbu.png b/data/ui/icon_mbu.png new file mode 100644 index 00000000..03957b58 Binary files /dev/null and b/data/ui/icon_mbu.png differ diff --git a/data/ui/motd/motd_buttn_textless_d.png b/data/ui/motd/motd_buttn_textless_d.png index 8d36b2ac..2800a6e3 100644 Binary files a/data/ui/motd/motd_buttn_textless_d.png and b/data/ui/motd/motd_buttn_textless_d.png differ diff --git a/data/ui/motd/motd_buttn_textless_h.png b/data/ui/motd/motd_buttn_textless_h.png index 4d231b79..04c3bbc2 100644 Binary files a/data/ui/motd/motd_buttn_textless_h.png and b/data/ui/motd/motd_buttn_textless_h.png differ diff --git a/data/ui/motd/motd_buttn_textless_n.png b/data/ui/motd/motd_buttn_textless_n.png index a73ac2a3..c5ee11ef 100644 Binary files a/data/ui/motd/motd_buttn_textless_n.png and b/data/ui/motd/motd_buttn_textless_n.png differ diff --git a/src/MarbleGame.hx b/src/MarbleGame.hx index 79eb3c32..3bbfff71 100644 --- a/src/MarbleGame.hx +++ b/src/MarbleGame.hx @@ -73,15 +73,8 @@ class MarbleGame { js.Browser.document.addEventListener('pointerlockchange', () -> { 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 (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(); // Focus the shit again var jsCanvas = @:privateAccess Window.getInstance().canvas; @@ -150,22 +143,12 @@ class MarbleGame { js.Browser.window.addEventListener('keydown', (e:js.html.KeyboardEvent) -> { var buttonCode = (e.keyCode); @: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) -> { var buttonCode = (e.keyCode); @: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) -> { @:privateAccess Key.keyPressed[Key.MOUSE_LEFT] = Key.getFrame(); diff --git a/src/ResourceLoader.hx b/src/ResourceLoader.hx index 4e6b6d3e..6219d28b 100644 --- a/src/ResourceLoader.hx +++ b/src/ResourceLoader.hx @@ -181,7 +181,7 @@ class ResourceLoader { static function preloadMusic(onFinish:Void->Void) { var worker = new ResourceLoaderWorker(onFinish); - worker.loadFile("sound/music/shell.ogg"); + worker.loadFile("sound/shell.ogg"); worker.loadFile("sound/groovepolice.ogg"); worker.loadFile("sound/classic vibe.ogg"); worker.loadFile("sound/beach party.ogg"); diff --git a/src/gui/MainMenuGui.hx b/src/gui/MainMenuGui.hx index 46c83c90..8a862313 100644 --- a/src/gui/MainMenuGui.hx +++ b/src/gui/MainMenuGui.hx @@ -50,6 +50,13 @@ class MainMenuGui extends GuiImage { 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")); playButton.position = new Vector(50, 113); playButton.extent = new Vector(270, 95); @@ -98,6 +105,38 @@ class MainMenuGui extends GuiImage { } 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")); kofi.horizSizing = Left; kofi.vertSizing = Top; diff --git a/src/gui/PlayMissionGui.hx b/src/gui/PlayMissionGui.hx index e7ae0eac..0c148dae 100644 --- a/src/gui/PlayMissionGui.hx +++ b/src/gui/PlayMissionGui.hx @@ -101,7 +101,7 @@ class PlayMissionGui extends GuiImage { tabCustom.extent = new Vector(52, 198); tabCustom.pressedAction = (sender) -> { #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 hxd.System.openURL("https://github.com/RandomityGuy/MBHaxe");