diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-06-28 07:51:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-28 07:51:36 +0200 |
commit | f59430beef2fa0d34670b4533167f03018454b00 (patch) | |
tree | a15ad2c9dd78cf3d00cbe55ae187d9e12924f1d3 /platform/android/export/export.cpp | |
parent | 7fad30fb9ab0ea19d67b2640668cbb88ebb1747c (diff) | |
parent | a2fd89bbe20d95bffe57c331bd43aff947c55d5e (diff) | |
download | redot-engine-f59430beef2fa0d34670b4533167f03018454b00.tar.gz |
Merge pull request #9419 from eska014/native-run
Subtle native-run buttons
Diffstat (limited to 'platform/android/export/export.cpp')
-rw-r--r-- | platform/android/export/export.cpp | 12 |
1 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; |