summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/ProjectSettings.xml2
-rw-r--r--doc/classes/VisualShaderNodeUniform.xml8
-rw-r--r--editor/editor_spin_slider.cpp17
-rw-r--r--misc/dist/linux/org.godotengine.Godot.desktop1
-rw-r--r--scene/gui/control.cpp2
-rw-r--r--scene/gui/tree.cpp3
-rw-r--r--thirdparty/vhacd/0005-fix-scale-calculation.patch20
-rw-r--r--thirdparty/vhacd/inc/vhacdVolume.h4
8 files changed, 53 insertions, 4 deletions
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index a111b5bdde..ded72e796b 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -415,7 +415,7 @@
Position offset for tooltips, relative to the mouse cursor's hotspot.
</member>
<member name="display/window/disable_wintab_api" type="bool" setter="" getter="" default="false">
- Disables WinTab API and always use Windows Ink API for the pen input (Windows only).
+ Disables WinTab API and always use Windows Ink API for the pen input (Windows only).
</member>
<member name="display/window/dpi/allow_hidpi" type="bool" setter="" getter="" default="false">
If [code]true[/code], allows HiDPI display on Windows and macOS. This setting has no effect on desktop Linux, as DPI-awareness fallbacks are not supported there.
diff --git a/doc/classes/VisualShaderNodeUniform.xml b/doc/classes/VisualShaderNodeUniform.xml
index c4362f6f2a..1225d9c320 100644
--- a/doc/classes/VisualShaderNodeUniform.xml
+++ b/doc/classes/VisualShaderNodeUniform.xml
@@ -9,9 +9,17 @@
<methods>
</methods>
<members>
+ <member name="qualifier" type="int" setter="set_qualifier" getter="get_qualifier" enum="VisualShaderNodeUniform.Qualifier" default="0">
+ </member>
<member name="uniform_name" type="String" setter="set_uniform_name" getter="get_uniform_name" default="&quot;&quot;">
</member>
</members>
<constants>
+ <constant name="QUAL_NONE" value="0" enum="Qualifier">
+ </constant>
+ <constant name="QUAL_GLOBAL" value="1" enum="Qualifier">
+ </constant>
+ <constant name="QUAL_INSTANCE" value="2" enum="Qualifier">
+ </constant>
</constants>
</class>
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp
index 1506c574dd..2c70e16610 100644
--- a/editor/editor_spin_slider.cpp
+++ b/editor/editor_spin_slider.cpp
@@ -36,6 +36,9 @@
#include "editor_scale.h"
String EditorSpinSlider::get_tooltip(const Point2 &p_pos) const {
+ if (grabber->is_visible()) {
+ return rtos(get_value()) + "\n\n" + TTR("Hold Ctrl to round to integers. Hold Shift for more precise changes.");
+ }
return rtos(get_value());
}
@@ -111,7 +114,21 @@ void EditorSpinSlider::_gui_input(const Ref<InputEvent> &p_event) {
}
if (grabbing_spinner) {
+ // Don't make the user scroll all the way back to 'in range' if they went off the end.
+ if (pre_grab_value < get_min() && !is_lesser_allowed()) {
+ pre_grab_value = get_min();
+ }
+ if (pre_grab_value > get_max() && !is_greater_allowed()) {
+ pre_grab_value = get_max();
+ }
+
if (mm->get_control()) {
+ // If control was just pressed, don't make the value do a huge jump in magnitude.
+ if (grabbing_spinner_dist_cache != 0) {
+ pre_grab_value += grabbing_spinner_dist_cache * get_step();
+ grabbing_spinner_dist_cache = 0;
+ }
+
set_value(Math::round(pre_grab_value + get_step() * grabbing_spinner_dist_cache * 10));
} else {
set_value(pre_grab_value + get_step() * grabbing_spinner_dist_cache);
diff --git a/misc/dist/linux/org.godotengine.Godot.desktop b/misc/dist/linux/org.godotengine.Godot.desktop
index c8b99207f8..8b74234174 100644
--- a/misc/dist/linux/org.godotengine.Godot.desktop
+++ b/misc/dist/linux/org.godotengine.Godot.desktop
@@ -5,6 +5,7 @@ Comment=Multi-platform 2D and 3D game engine with a feature-rich editor
Exec=godot %f
Icon=godot
Terminal=false
+PrefersNonDefaultGPU=true
Type=Application
MimeType=application/x-godot-project;
Categories=Development;IDE;
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index b4dc37c74f..b710ba4803 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -2896,7 +2896,7 @@ void Control::_bind_methods() {
ADD_GROUP("Size Flags", "size_flags_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "size_flags_horizontal", PROPERTY_HINT_FLAGS, "Fill,Expand,Shrink Center,Shrink End"), "set_h_size_flags", "get_h_size_flags");
ADD_PROPERTY(PropertyInfo(Variant::INT, "size_flags_vertical", PROPERTY_HINT_FLAGS, "Fill,Expand,Shrink Center,Shrink End"), "set_v_size_flags", "get_v_size_flags");
- ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "size_flags_stretch_ratio", PROPERTY_HINT_RANGE, "0,128,0.01"), "set_stretch_ratio", "get_stretch_ratio");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "size_flags_stretch_ratio", PROPERTY_HINT_RANGE, "0,20,0.01,or_greater"), "set_stretch_ratio", "get_stretch_ratio");
ADD_GROUP("Theme", "");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "theme", PROPERTY_HINT_RESOURCE_TYPE, "Theme"), "set_theme", "get_theme");
ADD_GROUP("", "");
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index aad36ebf02..329c1085df 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -779,6 +779,9 @@ void TreeItem::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_text", "column", "text"), &TreeItem::set_text);
ClassDB::bind_method(D_METHOD("get_text", "column"), &TreeItem::get_text);
+ ClassDB::bind_method(D_METHOD("set_suffix", "column", "text"), &TreeItem::set_suffix);
+ ClassDB::bind_method(D_METHOD("get_suffix", "column"), &TreeItem::get_suffix);
+
ClassDB::bind_method(D_METHOD("set_icon", "column", "texture"), &TreeItem::set_icon);
ClassDB::bind_method(D_METHOD("get_icon", "column"), &TreeItem::get_icon);
diff --git a/thirdparty/vhacd/0005-fix-scale-calculation.patch b/thirdparty/vhacd/0005-fix-scale-calculation.patch
new file mode 100644
index 0000000000..4b05f64fbf
--- /dev/null
+++ b/thirdparty/vhacd/0005-fix-scale-calculation.patch
@@ -0,0 +1,20 @@
+diff --git a/thirdparty/vhacd/inc/vhacdVolume.h b/thirdparty/vhacd/inc/vhacdVolume.h
+index 8c47fa1e2c..c445f20122 100644
+--- a/thirdparty/vhacd/inc/vhacdVolume.h
++++ b/thirdparty/vhacd/inc/vhacdVolume.h
+@@ -316,13 +316,13 @@ void Volume::Voxelize(const T* const points, const uint32_t stridePoints, const
+
+ double d[3] = { m_maxBB[0] - m_minBB[0], m_maxBB[1] - m_minBB[1], m_maxBB[2] - m_minBB[2] };
+ double r;
+- if (d[0] > d[1] && d[0] > d[2]) {
++ if (d[0] >= d[1] && d[0] >= d[2]) {
+ r = d[0];
+ m_dim[0] = dim;
+ m_dim[1] = 2 + static_cast<size_t>(dim * d[1] / d[0]);
+ m_dim[2] = 2 + static_cast<size_t>(dim * d[2] / d[0]);
+ }
+- else if (d[1] > d[0] && d[1] > d[2]) {
++ else if (d[1] >= d[0] && d[1] >= d[2]) {
+ r = d[1];
+ m_dim[1] = dim;
+ m_dim[0] = 2 + static_cast<size_t>(dim * d[0] / d[1]);
diff --git a/thirdparty/vhacd/inc/vhacdVolume.h b/thirdparty/vhacd/inc/vhacdVolume.h
index 8c47fa1e2c..c445f20122 100644
--- a/thirdparty/vhacd/inc/vhacdVolume.h
+++ b/thirdparty/vhacd/inc/vhacdVolume.h
@@ -316,13 +316,13 @@ void Volume::Voxelize(const T* const points, const uint32_t stridePoints, const
double d[3] = { m_maxBB[0] - m_minBB[0], m_maxBB[1] - m_minBB[1], m_maxBB[2] - m_minBB[2] };
double r;
- if (d[0] > d[1] && d[0] > d[2]) {
+ if (d[0] >= d[1] && d[0] >= d[2]) {
r = d[0];
m_dim[0] = dim;
m_dim[1] = 2 + static_cast<size_t>(dim * d[1] / d[0]);
m_dim[2] = 2 + static_cast<size_t>(dim * d[2] / d[0]);
}
- else if (d[1] > d[0] && d[1] > d[2]) {
+ else if (d[1] >= d[0] && d[1] >= d[2]) {
r = d[1];
m_dim[1] = dim;
m_dim[0] = 2 + static_cast<size_t>(dim * d[0] / d[1]);