summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorPoommetee Ketson <poommetee@protonmail.com>2018-01-27 02:38:08 +0700
committerPoommetee Ketson <poommetee@protonmail.com>2018-01-27 02:40:23 +0700
commit2bdd8f86e72dae5ca823779c114ac1b30a352501 (patch)
tree5a09657b2f787a3a23ba617a60a0d650d97c2690 /editor
parenta98e9496eb71554656c7c1eed9a69d20aed9886c (diff)
TemplateManager: hold shift to open link in browser
Diffstat (limited to 'editor')
-rw-r--r--editor/export_template_manager.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp
index 6cbca3f733..c4ecf3c098 100644
--- a/editor/export_template_manager.cpp
+++ b/editor/export_template_manager.cpp
@@ -30,6 +30,8 @@
#include "export_template_manager.h"
+#include "core/os/input.h"
+#include "core/os/keyboard.h"
#include "editor_node.h"
#include "editor_scale.h"
#include "io/json.h"
@@ -422,6 +424,11 @@ void ExportTemplateManager::_http_download_templates_completed(int p_status, int
void ExportTemplateManager::_begin_template_download(const String &p_url) {
+ if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) {
+ OS::get_singleton()->shell_open(p_url);
+ return;
+ }
+
for (int i = 0; i < template_list->get_child_count(); i++) {
BaseButton *b = Object::cast_to<BaseButton>(template_list->get_child(0));
if (b) {
@@ -576,7 +583,7 @@ ExportTemplateManager::ExportTemplateManager() {
template_downloader->add_child(vbc);
ScrollContainer *sc = memnew(ScrollContainer);
sc->set_custom_minimum_size(Size2(400, 200) * EDSCALE);
- vbc->add_margin_child(TTR("Select mirror from list: "), sc);
+ vbc->add_margin_child(TTR("Select mirror from list: (Shift+Click: Open in Browser)"), sc);
template_list = memnew(VBoxContainer);
sc->add_child(template_list);
sc->set_enable_v_scroll(true);