summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/Area2D.xml1
-rw-r--r--doc/classes/CanvasItem.xml1
-rw-r--r--doc/classes/Spatial.xml1
-rw-r--r--editor/editor_help.cpp19
-rw-r--r--editor/editor_node.cpp9
-rw-r--r--editor/editor_node.h2
-rw-r--r--editor/scene_tree_dock.cpp3
-rw-r--r--scene/gui/dialogs.cpp12
-rw-r--r--scene/gui/dialogs.h5
-rw-r--r--thirdparty/README.md2
10 files changed, 44 insertions, 11 deletions
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
index e1cb9056da..9a5870c73d 100644
--- a/doc/classes/Area2D.xml
+++ b/doc/classes/Area2D.xml
@@ -7,6 +7,7 @@
2D area that detects [CollisionObject2D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping).
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/physics/using_area_2d.html</link>
</tutorials>
<methods>
<method name="get_collision_layer_bit" qualifiers="const">
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index a920001de4..8372d15324 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -363,6 +363,7 @@
<return type="void">
</return>
<description>
+ Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations.
</description>
</method>
<method name="get_canvas" qualifiers="const">
diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml
index 128aa93f15..0309e73eec 100644
--- a/doc/classes/Spatial.xml
+++ b/doc/classes/Spatial.xml
@@ -15,6 +15,7 @@
<return type="void">
</return>
<description>
+ Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations.
</description>
</method>
<method name="get_parent_spatial" qualifiers="const">
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index d2306abfd7..dd49e38d7f 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -1224,11 +1224,18 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
Ref<Font> doc_font = p_rt->get_font("doc", "EditorFonts");
Ref<Font> doc_bold_font = p_rt->get_font("doc_bold", "EditorFonts");
Ref<Font> doc_code_font = p_rt->get_font("doc_source", "EditorFonts");
+
Color font_color_hl = p_rt->get_color("headline_color", "EditorHelp");
- Color link_color = p_rt->get_color("accent_color", "Editor").linear_interpolate(font_color_hl, 0.8);
+ Color accent_color = p_rt->get_color("accent_color", "Editor");
+ Color link_color = accent_color.linear_interpolate(font_color_hl, 0.8);
+ Color code_color = accent_color.linear_interpolate(font_color_hl, 0.6);
String bbcode = p_bbcode.dedent().replace("\t", "").replace("\r", "").strip_edges();
+ // remove extra new lines around code blocks
+ bbcode = bbcode.replace("[codeblock]\n", "[codeblock]");
+ bbcode = bbcode.replace("\n[/codeblock]", "[/codeblock]");
+
List<String> tag_stack;
bool code_tag = false;
@@ -1276,9 +1283,14 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
tag_stack.pop_front();
pos = brk_end + 1;
- code_tag = false;
- if (tag != "/img")
+ if (tag != "/img") {
p_rt->pop();
+ if (code_tag) {
+ p_rt->pop();
+ }
+ }
+ code_tag = false;
+
} else if (code_tag) {
p_rt->add_text("[");
@@ -1323,6 +1335,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) {
//use monospace font
p_rt->push_font(doc_code_font);
+ p_rt->push_color(code_color);
code_tag = true;
pos = brk_end + 1;
tag_stack.push_front(tag);
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 9fa33044e1..d42345d9a2 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -5171,14 +5171,20 @@ void EditorNode::_open_imported() {
}
void EditorNode::dim_editor(bool p_dimming, bool p_force_dim) {
- // Dimming can be forced regardless of the editor setting, which is useful when quitting the editor
+ // Dimming can be forced regardless of the editor setting, which is useful when quitting the editor.
if ((p_force_dim || EditorSettings::get_singleton()->get("interface/editor/dim_editor_on_dialog_popup")) && p_dimming) {
+ dimmed = true;
gui_base->set_modulate(Color(0.5, 0.5, 0.5));
} else {
+ dimmed = false;
gui_base->set_modulate(Color(1, 1, 1));
}
}
+bool EditorNode::is_editor_dimmed() const {
+ return dimmed;
+}
+
void EditorNode::open_export_template_manager() {
export_template_manager->popup_manager();
@@ -5487,6 +5493,7 @@ EditorNode::EditorNode() {
singleton = this;
exiting = false;
+ dimmed = false;
last_checked_version = 0;
changing_scene = false;
_initializing_addons = false;
diff --git a/editor/editor_node.h b/editor/editor_node.h
index fb7e81d2d2..b7775b5e83 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -260,6 +260,7 @@ private:
int tab_closing;
bool exiting;
+ bool dimmed;
int old_split_ofs;
VSplitContainer *top_split;
@@ -850,6 +851,7 @@ public:
void restart_editor();
void dim_editor(bool p_dimming, bool p_force_dim = false);
+ bool is_editor_dimmed() const;
void edit_current() { _edit_current(); };
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 0884620e5d..beead9e7f1 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -340,8 +340,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
if (!profile_allow_editing) {
break;
}
- Tree *tree = scene_tree->get_scene_tree();
- if (tree->is_anything_selected()) {
+ if (editor_selection->get_selected_node_list().size() > 1) {
rename_dialog->popup_centered();
}
} break;
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index 062089d80b..19bac5e5ac 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -239,13 +239,15 @@ void WindowDialog::_notification(int p_what) {
#ifdef TOOLS_ENABLED
case NOTIFICATION_POST_POPUP: {
- if (get_tree() && Engine::get_singleton()->is_editor_hint() && EditorNode::get_singleton())
+ if (get_tree() && Engine::get_singleton()->is_editor_hint() && EditorNode::get_singleton()) {
+ was_editor_dimmed = EditorNode::get_singleton()->is_editor_dimmed();
EditorNode::get_singleton()->dim_editor(true);
+ }
} break;
case NOTIFICATION_POPUP_HIDE: {
- if (get_tree() && Engine::get_singleton()->is_editor_hint() && EditorNode::get_singleton() && !get_viewport()->gui_has_modal_stack())
- EditorNode::get_singleton()->dim_editor(false);
+ if (get_tree() && Engine::get_singleton()->is_editor_hint() && EditorNode::get_singleton())
+ EditorNode::get_singleton()->dim_editor(was_editor_dimmed);
} break;
#endif
}
@@ -345,6 +347,10 @@ WindowDialog::WindowDialog() {
close_button = memnew(TextureButton);
add_child(close_button);
close_button->connect("pressed", this, "_closed");
+
+#ifdef TOOLS_ENABLED
+ was_editor_dimmed = false;
+#endif
}
WindowDialog::~WindowDialog() {
diff --git a/scene/gui/dialogs.h b/scene/gui/dialogs.h
index afd1173f28..2eb0978e9b 100644
--- a/scene/gui/dialogs.h
+++ b/scene/gui/dialogs.h
@@ -59,6 +59,10 @@ class WindowDialog : public Popup {
Point2 drag_offset_far;
bool resizable;
+#ifdef TOOLS_ENABLED
+ bool was_editor_dimmed;
+#endif
+
void _gui_input(const Ref<InputEvent> &p_event);
void _closed();
int _drag_hit_test(const Point2 &pos) const;
@@ -106,7 +110,6 @@ class AcceptDialog : public WindowDialog {
HBoxContainer *hbc;
Label *label;
Button *ok;
- //Button *cancel; no more cancel (there is X on that titlebar)
bool hide_on_ok;
void _custom_action(const String &p_action);
diff --git a/thirdparty/README.md b/thirdparty/README.md
index 434e0c8a36..6f0d4da958 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -162,7 +162,7 @@ Files extracted from upstream source:
Files extracted from upstream source:
-- `src/*.c`
+- `src/*.{c,h}`
- `include/ogg/*.h` in ogg/
- COPYING