we do a little bit of jni

This commit is contained in:
RandomityGuy 2023-10-08 22:53:48 +05:30
parent f0b6171b83
commit 472f868e64
4 changed files with 8 additions and 6 deletions

View file

@ -9,6 +9,8 @@
<!-- Tell the system this app requires OpenGL ES 3.0. -->
<uses-feature android:glEsVersion="0x00030000" android:required="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"

View file

@ -177,6 +177,8 @@ class Settings {
@:hlNative static function get_storage_path():hl.Bytes {
return null;
}
@:hlNative public static function open_url(url:String):Void {}
#end
public static function applySettings() {

View file

@ -87,7 +87,7 @@ class MainMenuGui extends GuiImage {
kofi.extent = new Vector(143, 36);
kofi.pressedAction = (sender) -> {
#if sys
hxd.System.openURL("https://ko-fi.com/H2H5FRTTL");
Settings.open_url("https://ko-fi.com/H2H5FRTTL");
#end
#if js
js.Browser.window.open("https://ko-fi.com/H2H5FRTTL");
@ -102,7 +102,7 @@ class MainMenuGui extends GuiImage {
github.extent = new Vector(94, 38);
github.pressedAction = (sender) -> {
#if sys
hxd.System.openURL("https://github.com/RandomityGuy/MBHaxe");
Settings.open_url("https://github.com/RandomityGuy/MBHaxe");
#end
#if js
js.Browser.window.open("https://github.com/RandomityGuy/MBHaxe");

View file

@ -103,7 +103,7 @@ class PlayMissionGui extends GuiImage {
var mbo = new MessageBoxYesNoDlg("The custom level browser is not available in this game.\n Please play Marble Blast Platinum to get access to 5000+ cummunity made customs of both Marble Blast Gold and Marble Blast Platinum. Visit download link?",
() -> {
#if sys
hxd.System.openURL("https://github.com/RandomityGuy/MBHaxe");
Settings.open_url("https://github.com/RandomityGuy/MBHaxe");
#end
#if js
js.Browser.window.open("https://github.com/RandomityGuy/MBHaxe");
@ -578,7 +578,6 @@ class PlayMissionGui extends GuiImage {
setCategoryFunc(currentCategoryStatic, false);
#if js
var kofi = new GuiButton(loadButtonImages("data/ui/kofi1"));
kofi.horizSizing = Left;
kofi.vertSizing = Top;
@ -586,14 +585,13 @@ class PlayMissionGui extends GuiImage {
kofi.extent = new Vector(143, 36);
kofi.pressedAction = (sender) -> {
#if sys
hxd.System.openURL("https://ko-fi.com/H2H5FRTTL");
Settings.open_url("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) {