mbg and mbp icons on bottom right

This commit is contained in:
RandomityGuy 2026-04-01 13:38:17 +01:00
parent 31c109d89b
commit bf77631b19
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_mbp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

View file

@ -38,6 +38,13 @@ class MainMenuGui extends GuiImage {
var scene2d = MarbleGame.instance.scene2d;
#end
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];
}
MarbleGame.instance.toRecord = false;
var offsetX = (scene2d.width - 1280) / 2;
@ -199,6 +206,28 @@ class MainMenuGui extends GuiImage {
#end
}
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 mbp = new GuiButton(loadStaticButtonImages("data/ui/icon_mbp"));
mbp.horizSizing = Right;
mbp.vertSizing = Top;
mbp.position = new Vector(76, 380);
mbp.extent = new Vector(76, 76);
mbp.pressedAction = (sender) -> {
js.Browser.window.open("https://marbleblast.randomityguy.me");
}
this.addChild(mbp);
#end
}
override function onResize(width:Int, height:Int) {