kofi button

This commit is contained in:
RandomityGuy 2023-03-28 14:13:36 +05:30
parent 422577404f
commit 58b7c13ee9
6 changed files with 34 additions and 0 deletions

BIN
data/ui/kofi1_d.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
data/ui/kofi1_h.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
data/ui/kofi1_i.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
data/ui/kofi1_n.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View file

@ -78,5 +78,22 @@ class MainMenuGui extends GuiImage {
#end
};
homebase.addChild(exitButton);
#if js
var kofi = new GuiButton(loadButtonImages("data/ui/kofi1"));
kofi.horizSizing = Left;
kofi.vertSizing = Top;
kofi.position = new Vector(473, 424);
kofi.extent = new Vector(143, 36);
kofi.pressedAction = (sender) -> {
#if sys
hxd.System.openURL("https://ko-fi.com/H2H5FRTTL");
#end
#if js
js.Browser.window.open("https://ko-fi.com/H2H5FRTTL");
#end
}
this.addChild(kofi);
#end
}
}

View file

@ -561,6 +561,23 @@ class PlayMissionGui extends GuiImage {
}
setCategoryFunc(currentCategoryStatic, false);
#if js
var kofi = new GuiButton(loadButtonImages("data/ui/kofi1"));
kofi.horizSizing = Left;
kofi.vertSizing = Top;
kofi.position = new Vector(473, 424);
kofi.extent = new Vector(143, 36);
kofi.pressedAction = (sender) -> {
#if sys
hxd.System.openURL("https://ko-fi.com/H2H5FRTTL");
#end
#if js
js.Browser.window.open("https://ko-fi.com/H2H5FRTTL");
#end
}
this.addChild(kofi);
#end
}
public override function render(scene2d:Scene) {