summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/doc/doc_dump.cpp2
-rw-r--r--editor/editor_export.cpp1
-rw-r--r--editor/editor_inspector.cpp16
-rw-r--r--editor/editor_settings.cpp1
-rw-r--r--editor/editor_themes.cpp2
-rw-r--r--editor/plugin_config_dialog.cpp7
-rw-r--r--editor/scene_tree_dock.cpp31
-rw-r--r--editor/scene_tree_dock.h1
8 files changed, 46 insertions, 15 deletions
diff --git a/editor/doc/doc_dump.cpp b/editor/doc/doc_dump.cpp
index 86fd9b436b..f1c337605e 100644
--- a/editor/doc/doc_dump.cpp
+++ b/editor/doc/doc_dump.cpp
@@ -223,7 +223,7 @@ void DocDump::dump(const String &p_file) {
hint = "Values: ";
for (int j = 0; j < arginfo.hint_string.get_slice_count(","); j++) {
if (j > 0) hint += ", ";
- hint += arginfo.hint_string.get_slice(",", j) + "=" + itos(1 << j);
+ hint += arginfo.hint_string.get_slice(",", j) + "=" + itos((uint64_t)1 << j);
}
break;
case PROPERTY_HINT_FILE: hint = "A file:"; break;
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 455c889224..1a6188862f 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -1097,6 +1097,7 @@ Ref<EditorExportPreset> EditorExport::get_export_preset(int p_idx) {
void EditorExport::remove_export_preset(int p_idx) {
export_presets.remove(p_idx);
+ save_presets();
}
void EditorExport::add_export_plugin(const Ref<EditorExportPlugin> &p_plugin) {
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 2c4168f1a0..c6258c8493 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -484,6 +484,17 @@ void EditorProperty::update_reload_status() {
}
bool EditorProperty::use_keying_next() const {
+ List<PropertyInfo> plist;
+ object->get_property_list(&plist, true);
+
+ for (List<PropertyInfo>::Element *I = plist.front(); I; I = I->next()) {
+ PropertyInfo &p = I->get();
+
+ if (p.name == property) {
+ return p.hint == PROPERTY_HINT_SPRITE_FRAME;
+ }
+ }
+
return false;
}
void EditorProperty::set_checkable(bool p_checkable) {
@@ -618,6 +629,11 @@ void EditorProperty::_gui_input(const Ref<InputEvent> &p_event) {
if (keying_rect.has_point(mb->get_position())) {
emit_signal("property_keyed", property);
+
+ if (use_keying_next()) {
+ call_deferred("emit_signal", "property_changed", property, object->get(property).operator int64_t() + 1);
+ call_deferred("update_property");
+ }
}
if (revert_rect.has_point(mb->get_position())) {
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 2dec21fffb..1e97920f7e 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -531,7 +531,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("docks/property_editor/texture_preview_width", 48);
_initial_set("docks/property_editor/auto_refresh_interval", 0.3);
- _initial_set("text_editor/help/doc_path", "");
_initial_set("text_editor/help/show_help_index", true);
_initial_set("filesystem/import/ask_save_before_reimport", false);
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 9e81051dc2..3cdbc4f188 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -376,7 +376,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
//Register icons + font
// the resolution and the icon color (dark_theme bool) has not changed, so we do not regenerate the icons
- if (p_theme != NULL && fabs(p_theme->get_constant("scale", "Editor") - EDSCALE) < 0.00001 && p_theme->get_constant("dark_theme", "Editor") == dark_theme) {
+ if (p_theme != NULL && fabs(p_theme->get_constant("scale", "Editor") - EDSCALE) < 0.00001 && (bool)p_theme->get_constant("dark_theme", "Editor") == dark_theme) {
// register already generated icons
for (int i = 0; i < editor_icons_count; i++) {
theme->set_icon(editor_icons_names[i], "EditorIcons", p_theme->get_icon(editor_icons_names[i], "EditorIcons"));
diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp
index 93bed035a5..a334f79f5a 100644
--- a/editor/plugin_config_dialog.cpp
+++ b/editor/plugin_config_dialog.cpp
@@ -76,7 +76,10 @@ void PluginConfigDialog::_on_confirmed() {
"extends EditorPlugin\n"
"\n"
"func _enter_tree():\n"
- "\tpass");
+ "\tpass\n"
+ "\n"
+ "func _exit_tree():\n"
+ "\tpass\n");
String script_path = path.plus_file(script_edit->get_text());
gdscript->set_path(script_path);
ResourceSaver::save(script_path, gdscript);
@@ -84,7 +87,7 @@ void PluginConfigDialog::_on_confirmed() {
}
//TODO: other languages
- emit_signal("plugin_ready", script.operator->(), active_edit->is_pressed() ? name_edit->get_text() : "");
+ emit_signal("plugin_ready", script.operator->(), active_edit->is_pressed() ? subfolder_edit->get_text() : "");
} else {
EditorNode::get_singleton()->get_project_settings()->update_plugins();
}
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 11a0a42b9e..f2c04d7326 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -689,6 +689,13 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
}
}
} break;
+ case TOOL_OPEN_DOCUMENTATION: {
+ List<Node *> selection = editor_selection->get_selected_node_list();
+ for (int i = 0; i < selection.size(); i++) {
+ ScriptEditor::get_singleton()->goto_help("class_name:" + selection[i]->get_class());
+ }
+ EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT);
+ } break;
case TOOL_SCENE_EDITABLE_CHILDREN: {
List<Node *> selection = editor_selection->get_selected_node_list();
List<Node *>::Element *e = selection.front();
@@ -2027,6 +2034,7 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
menu->clear();
+ Ref<Script> existing_script;
if (selection.size() == 1) {
Node *selected = selection[0];
@@ -2041,16 +2049,20 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
menu->add_icon_shortcut(get_icon("Add", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/add_child_node"), TOOL_NEW);
menu->add_icon_shortcut(get_icon("Instance", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/instance_scene"), TOOL_INSTANCE);
menu->add_separator();
+ existing_script = selected->get_script();
+ }
- menu->add_icon_shortcut(get_icon("ScriptCreate", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/attach_script"), TOOL_ATTACH_SCRIPT);
- Ref<Script> existing = selected->get_script();
- if (existing.is_valid()) {
- menu->add_icon_shortcut(get_icon("ScriptRemove", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/clear_script"), TOOL_CLEAR_SCRIPT);
- }
- menu->add_separator();
+ menu->add_icon_shortcut(get_icon("ScriptCreate", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/attach_script"), TOOL_ATTACH_SCRIPT);
+ if (selection.size() > 1 || existing_script.is_valid()) {
+ menu->add_icon_shortcut(get_icon("ScriptRemove", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/clear_script"), TOOL_CLEAR_SCRIPT);
+ }
+
+ menu->add_separator();
+ if (selection.size() == 1) {
menu->add_icon_shortcut(get_icon("Rename", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/rename"), TOOL_RENAME);
}
menu->add_icon_shortcut(get_icon("Reload", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/change_node_type"), TOOL_REPLACE);
+
if (scene_tree->get_selected() != edited_scene) {
menu->add_separator();
menu->add_icon_shortcut(get_icon("MoveUp", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/move_up"), TOOL_MOVE_UP);
@@ -2086,10 +2098,6 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
menu->set_item_checked(menu->get_item_idx_from_text(TTR("Load As Placeholder")), placeholder);
}
}
- } else {
- menu->add_separator();
- menu->add_icon_shortcut(get_icon("ScriptCreate", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/attach_script"), TOOL_ATTACH_SCRIPT);
- menu->add_icon_shortcut(get_icon("ScriptRemove", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/clear_script"), TOOL_CLEAR_SCRIPT);
}
if (selection.size() > 1) {
@@ -2098,6 +2106,9 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
menu->add_icon_shortcut(get_icon("Rename", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/batch_rename"), TOOL_BATCH_RENAME);
}
menu->add_separator();
+ menu->add_icon_item(get_icon("Help", "EditorIcons"), TTR("Open documentation"), TOOL_OPEN_DOCUMENTATION);
+
+ menu->add_separator();
menu->add_icon_shortcut(get_icon("Remove", "EditorIcons"), ED_SHORTCUT("scene_tree/delete", TTR("Delete Node(s)"), KEY_DELETE), TOOL_ERASE);
menu->set_size(Size2(1, 1));
menu->set_position(p_menu_pos);
diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h
index 269b0b69db..eea34a3ec5 100644
--- a/editor/scene_tree_dock.h
+++ b/editor/scene_tree_dock.h
@@ -75,6 +75,7 @@ class SceneTreeDock : public VBoxContainer {
TOOL_ERASE,
TOOL_COPY_NODE_PATH,
TOOL_BUTTON_MAX,
+ TOOL_OPEN_DOCUMENTATION,
TOOL_SCENE_EDITABLE_CHILDREN,
TOOL_SCENE_USE_PLACEHOLDER,
TOOL_SCENE_MAKE_LOCAL,