summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/Font.xml2
-rw-r--r--doc/classes/KinematicBody.xml2
-rw-r--r--doc/classes/KinematicBody2D.xml2
-rw-r--r--doc/classes/SpotLight.xml2
-rw-r--r--editor/editor_file_dialog.cpp19
-rw-r--r--editor/filesystem_dock.cpp35
-rw-r--r--editor/filesystem_dock.h2
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp3
-rw-r--r--platform/javascript/export/export.cpp2
-rw-r--r--scene/audio/audio_stream_player.cpp4
-rw-r--r--scene/gui/file_dialog.cpp3
11 files changed, 31 insertions, 45 deletions
diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml
index 3e47b167ef..6cb5e0b17a 100644
--- a/doc/classes/Font.xml
+++ b/doc/classes/Font.xml
@@ -4,7 +4,7 @@
Internationalized font and text drawing support.
</brief_description>
<description>
- Font contains a unicode compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. TODO check wikipedia for graph of ascent/baseline/descent/height/etc.
+ Font contains a unicode compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml
index a4fade6ab2..83abd723d0 100644
--- a/doc/classes/KinematicBody.xml
+++ b/doc/classes/KinematicBody.xml
@@ -91,7 +91,7 @@
Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody[/code] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
[code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
[code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games.
- [i]TODO: Update for new stop_on_slode argument.[/i] If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes.
+ If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes.
If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops.
[code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees.
Returns the movement that remained when the body stopped. To get more detailed information about collisions that occurred, use [method get_slide_collision].
diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml
index f1aac2c765..d5bfc91f66 100644
--- a/doc/classes/KinematicBody2D.xml
+++ b/doc/classes/KinematicBody2D.xml
@@ -91,7 +91,7 @@
Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody2D[/code] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
[code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
[code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games.
- [i]TODO: Update for stop_on_slope argument.[/i] If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes.
+ If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes.
If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops.
[code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees.
Returns the [code]linear_velocity[/code] vector, rotated and/or scaled if a slide collision occurred. To get more detailed information about collisions that occurred, use [method get_slide_collision].
diff --git a/doc/classes/SpotLight.xml b/doc/classes/SpotLight.xml
index 11f914aac2..56ba2fc5b9 100644
--- a/doc/classes/SpotLight.xml
+++ b/doc/classes/SpotLight.xml
@@ -4,7 +4,7 @@
Spotlight [Light], such as a reflector spotlight or a lantern.
</brief_description>
<description>
- A SpotLight light is a type of [Light] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. TODO: Image of a spotlight.
+ A SpotLight light is a type of [Light] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light].
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link>
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index cdc06503e9..da16c16966 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -1205,8 +1205,10 @@ void EditorFileDialog::_update_favorites() {
if (name == current)
setthis = true;
name = "/";
+
+ favorites->add_item(name, folder_icon);
} else if (name.ends_with("/")) {
- if (name == current)
+ if (name == current || name == current + "/")
setthis = true;
name = name.substr(0, name.length() - 1);
name = name.get_file();
@@ -1229,6 +1231,8 @@ void EditorFileDialog::_favorite_toggled(bool p_toggle) {
bool res = access == ACCESS_RESOURCES;
String cd = get_current_dir();
+ if (!cd.ends_with("/"))
+ cd += "/";
Vector<String> favorited = EditorSettings::get_singleton()->get_favorites();
@@ -1244,13 +1248,10 @@ void EditorFileDialog::_favorite_toggled(bool p_toggle) {
}
}
- if (found) {
+ if (found)
favorited.erase(cd);
- favorite->set_pressed(false);
- } else {
+ else
favorited.push_back(cd);
- favorite->set_pressed(true);
- }
EditorSettings::get_singleton()->set_favorites(favorited);
@@ -1494,7 +1495,9 @@ EditorFileDialog::EditorFileDialog() {
HBoxContainer *pathhb = memnew(HBoxContainer);
dir_prev = memnew(ToolButton);
+ dir_prev->set_tooltip(TTR("Previous Folder"));
dir_next = memnew(ToolButton);
+ dir_next->set_tooltip(TTR("Next Folder"));
dir_up = memnew(ToolButton);
dir_up->set_tooltip(TTR("Go to parent folder"));
@@ -1513,12 +1516,14 @@ EditorFileDialog::EditorFileDialog() {
dir->set_h_size_flags(SIZE_EXPAND_FILL);
refresh = memnew(ToolButton);
+ refresh->set_tooltip(TTR("Refresh"));
refresh->connect("pressed", this, "_update_file_list");
pathhb->add_child(refresh);
favorite = memnew(ToolButton);
favorite->set_flat(true);
favorite->set_toggle_mode(true);
+ favorite->set_tooltip(TTR("(Un)favorite current folder."));
favorite->connect("toggled", this, "_favorite_toggled");
pathhb->add_child(favorite);
@@ -1532,6 +1537,7 @@ EditorFileDialog::EditorFileDialog() {
mode_thumbnails->set_toggle_mode(true);
mode_thumbnails->set_pressed(display_mode == DISPLAY_THUMBNAILS);
mode_thumbnails->set_button_group(view_mode_group);
+ mode_thumbnails->set_tooltip(TTR("View items as a grid of thumbnails."));
pathhb->add_child(mode_thumbnails);
mode_list = memnew(ToolButton);
@@ -1539,6 +1545,7 @@ EditorFileDialog::EditorFileDialog() {
mode_list->set_toggle_mode(true);
mode_list->set_pressed(display_mode == DISPLAY_LIST);
mode_list->set_button_group(view_mode_group);
+ mode_list->set_tooltip(TTR("View items as a list."));
pathhb->add_child(mode_list);
drives = memnew(OptionButton);
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 66deb42c11..0eabd6e731 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -283,7 +283,7 @@ void FileSystemDock::_notification(int p_what) {
String ei = "EditorIcons";
button_reload->set_icon(get_icon("Reload", ei));
button_toggle_display_mode->set_icon(get_icon("Panels2", ei));
- button_file_list_display_mode->connect("toggled", this, "_toggle_file_display");
+ button_file_list_display_mode->connect("pressed", this, "_toggle_file_display");
files->connect("item_activated", this, "_file_list_activate_file");
button_hist_next->connect("pressed", this, "_fw_history");
@@ -350,7 +350,7 @@ void FileSystemDock::_notification(int p_what) {
button_toggle_display_mode->set_icon(get_icon("Panels2", ei));
button_hist_next->set_icon(get_icon("Forward", ei));
button_hist_prev->set_icon(get_icon("Back", ei));
- if (button_file_list_display_mode->is_pressed()) {
+ if (file_list_display_mode == FILE_LIST_DISPLAY_THUMBNAILS) {
button_file_list_display_mode->set_icon(get_icon("FileThumbnail", "EditorIcons"));
} else {
button_file_list_display_mode->set_icon(get_icon("FileList", "EditorIcons"));
@@ -501,8 +501,8 @@ void FileSystemDock::_tree_thumbnail_done(const String &p_path, const Ref<Textur
}
}
-void FileSystemDock::_toggle_file_display(bool p_active) {
- _set_file_display(p_active);
+void FileSystemDock::_toggle_file_display() {
+ _set_file_display(file_list_display_mode != FILE_LIST_DISPLAY_LIST);
emit_signal("display_mode_changed");
}
@@ -1692,8 +1692,7 @@ void FileSystemDock::set_file_list_display_mode(FileListDisplayMode p_mode) {
if (p_mode == file_list_display_mode)
return;
- button_file_list_display_mode->set_pressed(p_mode == FILE_LIST_DISPLAY_LIST);
- _toggle_file_display(p_mode == FILE_LIST_DISPLAY_LIST);
+ _toggle_file_display();
}
Variant FileSystemDock::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
@@ -2377,29 +2376,6 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
tree_search_box->connect("text_changed", this, "_search_changed", varray(tree_search_box));
toolbar2_hbc->add_child(tree_search_box);
- //toolbar_hbc->add_spacer();
-
- //Control *spacer = memnew( Control);
-
- /*
- button_open = memnew( Button );
- button_open->set_flat(true);
- button_open->connect("pressed",this,"_tree_toggle_collapsed");
- toolbar_hbc->add_child(button_open);
- button_open->hide();
- button_open->set_focus_mode(FOCUS_NONE);
- button_open->set_tooltip("Open the selected file.\nOpen as scene if a scene, or as resource otherwise.");
-
-
- button_instance = memnew( Button );
- button_instance->set_flat(true);
- button_instance->connect("pressed",this,"_instance_pressed");
- toolbar_hbc->add_child(button_instance);
- button_instance->hide();
- button_instance->set_focus_mode(FOCUS_NONE);
- button_instance->set_tooltip(TTR("Instance the selected scene(s) as child of the selected node."));
-
-*/
file_list_popup = memnew(PopupMenu);
file_list_popup->set_hide_on_window_lose_focus(true);
add_child(file_list_popup);
@@ -2441,7 +2417,6 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
path_hb->add_child(file_list_search_box);
button_file_list_display_mode = memnew(ToolButton);
- button_file_list_display_mode->set_toggle_mode(true);
path_hb->add_child(button_file_list_display_mode);
files = memnew(ItemList);
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h
index 7cf37a7634..cd052f9700 100644
--- a/editor/filesystem_dock.h
+++ b/editor/filesystem_dock.h
@@ -181,7 +181,7 @@ private:
void _tree_gui_input(Ref<InputEvent> p_event);
void _update_file_list(bool p_keep_selection);
- void _toggle_file_display(bool p_active);
+ void _toggle_file_display();
void _set_file_display(bool p_active);
void _fs_changed();
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index 97380a9172..5b54384ee0 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -2918,7 +2918,8 @@ void TileSetEditor::update_texture_list_icon() {
for (int current_idx = 0; current_idx < texture_list->get_item_count(); current_idx++) {
RID rid = texture_list->get_item_metadata(current_idx);
texture_list->set_item_icon(current_idx, texture_map[rid]);
- texture_list->set_item_icon_region(current_idx, Rect2(0, 0, 150, 100));
+ Size2 texture_size = texture_map[rid]->get_size();
+ texture_list->set_item_icon_region(current_idx, Rect2(0, 0, MIN(texture_size.x, 150), MIN(texture_size.y, 100)));
}
texture_list->update();
}
diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp
index 5704433650..ec610a70fd 100644
--- a/platform/javascript/export/export.cpp
+++ b/platform/javascript/export/export.cpp
@@ -360,7 +360,7 @@ Error EditorExportPlatformJavaScript::run(const Ref<EditorExportPreset> &p_prese
if (err) {
return err;
}
- OS::get_singleton()->shell_open(path);
+ OS::get_singleton()->shell_open(String("file://") + path);
return OK;
}
diff --git a/scene/audio/audio_stream_player.cpp b/scene/audio/audio_stream_player.cpp
index 5c95cf4279..2688041d18 100644
--- a/scene/audio/audio_stream_player.cpp
+++ b/scene/audio/audio_stream_player.cpp
@@ -91,8 +91,10 @@ void AudioStreamPlayer::_mix_internal(bool p_fadeout) {
void AudioStreamPlayer::_mix_audio() {
- if (!stream_playback.is_valid() || !active)
+ if (!stream_playback.is_valid() || !active ||
+ (stream_paused && !stream_fade)) {
return;
+ }
if (stream_fade) {
_mix_internal(true);
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 5599c64daa..059e59ea21 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -861,7 +861,7 @@ FileDialog::FileDialog() {
HBoxContainer *hbc = memnew(HBoxContainer);
dir_up = memnew(ToolButton);
- dir_up->set_tooltip(RTR("Go to parent folder"));
+ dir_up->set_tooltip(RTR("Go to parent folder."));
hbc->add_child(dir_up);
dir_up->connect("pressed", this, "_go_up");
@@ -871,6 +871,7 @@ FileDialog::FileDialog() {
dir->set_h_size_flags(SIZE_EXPAND_FILL);
refresh = memnew(ToolButton);
+ refresh->set_tooltip(RTR("Refresh"));
refresh->connect("pressed", this, "_update_file_list");
hbc->add_child(refresh);