summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-06-27 10:59:37 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-06-27 10:59:37 -0300
commitd41b7a66e9e01b55310d68e216139d6b6cc712f1 (patch)
tree76e6d425265022761feb474a43a2f327fd93e513 /tools
parente2d208f1226f802b941d099c2f16223e7446cb07 (diff)
Properly complain when a scene file has not be selected, closes #3811
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/editor_node.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index f6278e350a..3ba9f3b799 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -1856,6 +1856,28 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
return;
}
+ if (!FileAccess::exists(run_filename)) {
+
+ current_option=-1;
+ //accept->get_cancel()->hide();
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("Selected scene '"+run_filename+"' does not exist.\nSelect one from \"Project Settings\" under the 'application' category."));
+ accept->popup_centered_minsize();
+ return;
+
+ }
+
+ if (ResourceLoader::get_resource_type(run_filename)!="PackedScene") {
+
+ current_option=-1;
+ //accept->get_cancel()->hide();
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("Selected scene '"+run_filename+"' is not a scene file.\nSelect a scene from \"Project Settings\" under the 'application' category."));
+ accept->popup_centered_minsize();
+ return;
+
+ }
+
}