summaryrefslogtreecommitdiffstats
path: root/platform/android/java/src/org/godotengine/godot/Godot.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/java/src/org/godotengine/godot/Godot.java')
-rw-r--r--platform/android/java/src/org/godotengine/godot/Godot.java21
1 files changed, 20 insertions, 1 deletions
diff --git a/platform/android/java/src/org/godotengine/godot/Godot.java b/platform/android/java/src/org/godotengine/godot/Godot.java
index 4b80db7e33..d2533378dc 100644
--- a/platform/android/java/src/org/godotengine/godot/Godot.java
+++ b/platform/android/java/src/org/godotengine/godot/Godot.java
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -295,6 +295,25 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
});
}
}
+
+ public void alert(final String message, final String title) {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ AlertDialog.Builder builder = new AlertDialog.Builder(getInstance());
+ builder.setMessage(message).setTitle(title);
+ builder.setPositiveButton(
+ "OK",
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int id) {
+ dialog.cancel();
+ }
+ });
+ AlertDialog dialog = builder.create();
+ dialog.show();
+ }
+ });
+ }
private static Godot _self;