summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_node.cpp2
-rw-r--r--editor/import/resource_importer_scene.cpp4
-rw-r--r--editor/project_export.cpp2
-rw-r--r--editor/script_create_dialog.cpp26
-rw-r--r--editor/script_create_dialog.h4
5 files changed, 34 insertions, 4 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 368b7e6ab3..dc175a3148 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -6882,10 +6882,12 @@ EditorNode::EditorNode() {
file_export_lib->connect("file_selected", callable_mp(this, &EditorNode::_dialog_action));
file_export_lib_merge = memnew(CheckBox);
file_export_lib_merge->set_text(TTR("Merge With Existing"));
+ file_export_lib_merge->set_h_size_flags(Control::SIZE_SHRINK_CENTER);
file_export_lib_merge->set_pressed(true);
file_export_lib->get_vbox()->add_child(file_export_lib_merge);
file_export_lib_apply_xforms = memnew(CheckBox);
file_export_lib_apply_xforms->set_text(TTR("Apply MeshInstance Transforms"));
+ file_export_lib_apply_xforms->set_h_size_flags(Control::SIZE_SHRINK_CENTER);
file_export_lib_apply_xforms->set_pressed(false);
file_export_lib->get_vbox()->add_child(file_export_lib_apply_xforms);
gui_base->add_child(file_export_lib);
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index ab3479b7ce..a25b694a60 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -1237,7 +1237,7 @@ void ResourceImporterScene::get_internal_import_options(InternalImportCategory p
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "use_external/path", PROPERTY_HINT_FILE, "*.material,*.res,*.tres"), ""));
} break;
case INTERNAL_IMPORT_CATEGORY_ANIMATION: {
- r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "settings/loop_mode"), 0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "settings/loop_mode", PROPERTY_HINT_ENUM, "None,Linear,Pingpong"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "save_to_file/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "save_to_file/path", PROPERTY_HINT_SAVE_FILE, "*.res,*.tres"), ""));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "save_to_file/keep_custom_tracks"), ""));
@@ -1259,7 +1259,7 @@ void ResourceImporterScene::get_internal_import_options(InternalImportCategory p
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "slice_" + itos(i + 1) + "/name"), ""));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slice_" + itos(i + 1) + "/start_frame"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slice_" + itos(i + 1) + "/end_frame"), 0));
- r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slice_" + itos(i + 1) + "/loop_mode"), 0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "slice_" + itos(i + 1) + "/loop_mode", PROPERTY_HINT_ENUM, "None,Linear,Pingpong"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "slice_" + itos(i + 1) + "/save_to_file/enabled", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "slice_" + itos(i + 1) + "/save_to_file/path", PROPERTY_HINT_SAVE_FILE, ".res,*.tres"), ""));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "slice_" + itos(i + 1) + "/save_to_file/keep_custom_tracks"), false));
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index d48d45d848..a97d38323e 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -1277,11 +1277,13 @@ ProjectExportDialog::ProjectExportDialog() {
export_debug = memnew(CheckBox);
export_debug->set_text(TTR("Export With Debug"));
export_debug->set_pressed(true);
+ export_debug->set_h_size_flags(Control::SIZE_SHRINK_CENTER);
export_project->get_vbox()->add_child(export_debug);
export_pck_zip_debug = memnew(CheckBox);
export_pck_zip_debug->set_text(TTR("Export With Debug"));
export_pck_zip_debug->set_pressed(true);
+ export_pck_zip_debug->set_h_size_flags(Control::SIZE_SHRINK_CENTER);
export_pck_zip->get_vbox()->add_child(export_pck_zip_debug);
set_hide_on_ok(false);
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index 1e19d9bd47..fb1575ad8c 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -315,7 +315,9 @@ void ScriptCreateDialog::_create_new() {
}
}
- if (!is_built_in) {
+ if (is_built_in) {
+ scr->set_name(internal_name->get_text());
+ } else {
String lpath = ProjectSettings::get_singleton()->localize_path(file_path->get_text());
scr->set_path(lpath);
Error err = ResourceSaver::save(lpath, scr, ResourceSaver::FLAG_CHANGE_PATH);
@@ -686,6 +688,11 @@ void ScriptCreateDialog::_update_dialog() {
builtin_warning_label->set_visible(is_built_in);
+ path_controls[0]->set_visible(!is_built_in);
+ path_controls[1]->set_visible(!is_built_in);
+ name_controls[0]->set_visible(is_built_in);
+ name_controls[1]->set_visible(is_built_in);
+
// Check if the script name is the same as the parent class.
// This warning isn't relevant if the script is built-in.
script_name_warning_label->set_visible(!is_built_in && _get_class_name() == parent_name->get_text());
@@ -868,9 +875,24 @@ ScriptCreateDialog::ScriptCreateDialog() {
path_button = memnew(Button);
path_button->connect("pressed", callable_mp(this, &ScriptCreateDialog::_browse_path), varray(false, true));
hb->add_child(path_button);
- gc->add_child(memnew(Label(TTR("Path:"))));
+ Label *label = memnew(Label(TTR("Path:")));
+ gc->add_child(label);
gc->add_child(hb);
re_check_path = false;
+ path_controls[0] = label;
+ path_controls[1] = hb;
+
+ /* Name */
+
+ internal_name = memnew(LineEdit);
+ internal_name->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ label = memnew(Label(TTR("Name:")));
+ gc->add_child(label);
+ gc->add_child(internal_name);
+ name_controls[0] = label;
+ name_controls[1] = internal_name;
+ label->hide();
+ internal_name->hide();
/* Dialog Setup */
diff --git a/editor/script_create_dialog.h b/editor/script_create_dialog.h
index 7c2ef1e150..dba798eea7 100644
--- a/editor/script_create_dialog.h
+++ b/editor/script_create_dialog.h
@@ -57,6 +57,7 @@ class ScriptCreateDialog : public ConfirmationDialog {
OptionButton *language_menu;
OptionButton *template_menu;
LineEdit *file_path;
+ LineEdit *internal_name;
Button *path_button;
EditorFileDialog *file_browse;
CheckBox *internal;
@@ -81,6 +82,9 @@ class ScriptCreateDialog : public ConfirmationDialog {
int default_language;
bool re_check_path;
+ Control *path_controls[2];
+ Control *name_controls[2];
+
enum ScriptOrigin {
SCRIPT_ORIGIN_PROJECT,
SCRIPT_ORIGIN_EDITOR,