mbg and mbu icons on bottom right

This commit is contained in:
RandomityGuy 2026-04-01 13:38:17 +01:00
parent 6fcbbb6edb
commit cbfafdb63f
3 changed files with 29 additions and 0 deletions

BIN
data/ui/icon_mbg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
data/ui/icon_mbu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -47,6 +47,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 siteButton = new GuiButton(loadButtonImages('data/ui/menu/site'));
siteButton.horizSizing = Right;
siteButton.vertSizing = Top;
@ -232,6 +239,28 @@ class MainMenuGui extends GuiImage {
}
this.addChild(github);
#if js
var mbg = new GuiButton(loadStaticButtonImages("data/ui/icon_mbg"));
mbg.horizSizing = Right;
mbg.vertSizing = Top;
mbg.position = new Vector(0, 380);
mbg.extent = new Vector(76, 76);
mbg.pressedAction = (sender) -> {
js.Browser.window.open("https://marbleblastgold.randomityguy.me");
}
this.addChild(mbg);
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);
#end
#if js
var urlParams = new js.html.URLSearchParams(js.Browser.window.location.search);
var playParam = urlParams.get("app");