summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authorL. Krause <eska@eska.me>2017-05-25 20:57:13 +0200
committerL. Krause <eska@eska.me>2017-06-27 21:06:26 +0200
commit92367968e7f1416f33eebfa06c60cacf5c757f65 (patch)
tree3aeb61b8e0347446891e11859dd9ae230773b3d7 /platform/android
parent90592ccf03521cda14ee3a9576b671136da2021d (diff)
Use custom native-run icons for Android and HTML5
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/export/export.cpp12
-rw-r--r--platform/android/run_icon.pngbin0 -> 636 bytes
2 files changed, 11 insertions, 1 deletions
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index d6ed234669..a72e8aa90e 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -37,6 +37,7 @@
#include "os/file_access.h"
#include "os/os.h"
#include "platform/android/logo.gen.h"
+#include "platform/android/run_icon.gen.h"
#include "version.h"
#include <string.h>
#if 0
@@ -2042,6 +2043,7 @@ class EditorExportAndroid : public EditorExportPlatform {
GDCLASS(EditorExportAndroid, EditorExportPlatform)
Ref<ImageTexture> logo;
+ Ref<ImageTexture> run_icon;
struct Device {
@@ -3036,6 +3038,10 @@ public:
return OK;
}
+ virtual Ref<Texture> get_run_icon() const {
+ return run_icon;
+ }
+
virtual bool can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
r_missing_templates = find_export_template("android_debug.apk") == String() || find_export_template("android_release.apk") == String();
@@ -3524,9 +3530,13 @@ public:
EditorExportAndroid() {
Ref<Image> img = memnew(Image(_android_logo));
- logo = Ref<ImageTexture>(memnew(ImageTexture));
+ logo.instance();
logo->create_from_image(img);
+ img = Ref<Image>(memnew(Image(_android_run_icon)));
+ run_icon.instance();
+ run_icon->create_from_image(img);
+
device_lock = Mutex::create();
device_thread = Thread::create(_device_poll_thread, this);
devices_changed = true;
diff --git a/platform/android/run_icon.png b/platform/android/run_icon.png
new file mode 100644
index 0000000000..e53f8e9da5
--- /dev/null
+++ b/platform/android/run_icon.png
Binary files differ