summaryrefslogtreecommitdiff
path: root/tools/editor/script_create_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/script_create_dialog.cpp')
-rw-r--r--tools/editor/script_create_dialog.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/editor/script_create_dialog.cpp b/tools/editor/script_create_dialog.cpp
index d7fc87167b..d1095271fc 100644
--- a/tools/editor/script_create_dialog.cpp
+++ b/tools/editor/script_create_dialog.cpp
@@ -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 */
@@ -133,7 +133,7 @@ void ScriptCreateDialog::_create_new() {
scr->set_name(cname);
if (!internal->is_pressed()) {
- String lpath = Globals::get_singleton()->localize_path(file_path->get_text());
+ String lpath = GlobalConfig::get_singleton()->localize_path(file_path->get_text());
scr->set_path(lpath);
if (!path_valid) {
alert->set_text(TTR("Invalid path!"));
@@ -243,7 +243,7 @@ void ScriptCreateDialog::_browse_path() {
void ScriptCreateDialog::_file_selected(const String& p_file) {
- String p = Globals::get_singleton()->localize_path(p_file);
+ String p = GlobalConfig::get_singleton()->localize_path(p_file);
file_path->set_text(p);
_path_changed(p);
@@ -262,7 +262,7 @@ void ScriptCreateDialog::_path_changed(const String& p_path) {
}
- p = Globals::get_singleton()->localize_path(p);
+ p = GlobalConfig::get_singleton()->localize_path(p);
if (!p.begins_with("res://")) {
path_error_label->set_text(TTR("Path is not local"));
@@ -338,12 +338,12 @@ void ScriptCreateDialog::_update_controls() {
void ScriptCreateDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_class_name_changed",&ScriptCreateDialog::_class_name_changed);
- ObjectTypeDB::bind_method("_lang_changed",&ScriptCreateDialog::_lang_changed);
- ObjectTypeDB::bind_method("_built_in_pressed",&ScriptCreateDialog::_built_in_pressed);
- ObjectTypeDB::bind_method("_browse_path",&ScriptCreateDialog::_browse_path);
- ObjectTypeDB::bind_method("_file_selected",&ScriptCreateDialog::_file_selected);
- ObjectTypeDB::bind_method("_path_changed",&ScriptCreateDialog::_path_changed);
+ ClassDB::bind_method("_class_name_changed",&ScriptCreateDialog::_class_name_changed);
+ ClassDB::bind_method("_lang_changed",&ScriptCreateDialog::_lang_changed);
+ ClassDB::bind_method("_built_in_pressed",&ScriptCreateDialog::_built_in_pressed);
+ ClassDB::bind_method("_browse_path",&ScriptCreateDialog::_browse_path);
+ ClassDB::bind_method("_file_selected",&ScriptCreateDialog::_file_selected);
+ ClassDB::bind_method("_path_changed",&ScriptCreateDialog::_path_changed);
ADD_SIGNAL(MethodInfo("script_created",PropertyInfo(Variant::OBJECT,"script",PROPERTY_HINT_RESOURCE_TYPE,"Script")));
}
@@ -353,7 +353,7 @@ ScriptCreateDialog::ScriptCreateDialog() {
VBoxContainer *vb = memnew( VBoxContainer );
add_child(vb);
- set_child_rect(vb);
+ //set_child_rect(vb);
class_name = memnew( LineEdit );