summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/canvas_layer.h2
-rwxr-xr-xscene/main/node.cpp3
-rw-r--r--scene/main/node.h8
-rw-r--r--scene/main/scene_tree.cpp41
-rw-r--r--scene/main/viewport.cpp4
5 files changed, 30 insertions, 28 deletions
diff --git a/scene/main/canvas_layer.h b/scene/main/canvas_layer.h
index 1be6f8be24..b14a915fe8 100644
--- a/scene/main/canvas_layer.h
+++ b/scene/main/canvas_layer.h
@@ -55,7 +55,7 @@ class CanvasLayer : public Node {
int sort_index;
// Deprecated, should be removed in a future version.
- void _set_rotationd(real_t p_rotation);
+ void _set_rotationd(real_t p_degrees);
real_t _get_rotationd() const;
void _update_xform();
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 0d872d906e..0474c6fd26 100755
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -1301,8 +1301,9 @@ String Node::_generate_serial_child_name(Node *p_child) {
}
}
+ int num_places = nums.length();
for (;;) {
- String attempt = (name + (num > 0 || explicit_zero ? nnsep + itos(num) : "")).strip_edges();
+ String attempt = (name + (num > 0 || explicit_zero ? nnsep + itos(num).pad_zeros(num_places) : "")).strip_edges();
bool found = false;
for (int i = 0; i < data.children.size(); i++) {
if (data.children[i] == p_child)
diff --git a/scene/main/node.h b/scene/main/node.h
index 0447deccc1..bb8d80a0c8 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -32,8 +32,8 @@
#include "class_db.h"
#include "map.h"
-#include "object.h"
#include "node_path.h"
+#include "object.h"
#include "project_settings.h"
#include "scene/main/scene_tree.h"
#include "script_language.h"
@@ -303,14 +303,14 @@ public:
float get_fixed_process_delta_time() const;
bool is_fixed_processing() const;
- void set_process(bool p_process);
+ void set_process(bool p_idle_process);
float get_process_delta_time() const;
bool is_processing() const;
- void set_fixed_process_internal(bool p_process);
+ void set_fixed_process_internal(bool p_process_internal);
bool is_fixed_processing_internal() const;
- void set_process_internal(bool p_process);
+ void set_process_internal(bool p_idle_process_internal);
bool is_processing_internal() const;
void set_process_input(bool p_enable);
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 067bcbff3e..66eafa1070 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -801,11 +801,11 @@ Ref<Material> SceneTree::get_debug_navigation_material() {
return navigation_material;
Ref<SpatialMaterial> line_material = Ref<SpatialMaterial>(memnew(SpatialMaterial));
- /* line_material->set_flag(Material::FLAG_UNSHADED, true);
- line_material->set_line_width(3.0);
- line_material->set_fixed_flag(SpatialMaterial::FLAG_USE_ALPHA, true);
- line_material->set_fixed_flag(SpatialMaterial::FLAG_USE_COLOR_ARRAY, true);
- line_material->set_parameter(SpatialMaterial::PARAM_DIFFUSE,get_debug_navigation_color());*/
+ line_material->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
+ line_material->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
+ line_material->set_flag(SpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true);
+ line_material->set_flag(SpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
+ line_material->set_albedo(get_debug_navigation_color());
navigation_material = line_material;
@@ -818,11 +818,11 @@ Ref<Material> SceneTree::get_debug_navigation_disabled_material() {
return navigation_disabled_material;
Ref<SpatialMaterial> line_material = Ref<SpatialMaterial>(memnew(SpatialMaterial));
- /* line_material->set_flag(Material::FLAG_UNSHADED, true);
- line_material->set_line_width(3.0);
- line_material->set_fixed_flag(SpatialMaterial::FLAG_USE_ALPHA, true);
- line_material->set_fixed_flag(SpatialMaterial::FLAG_USE_COLOR_ARRAY, true);
- line_material->set_parameter(SpatialMaterial::PARAM_DIFFUSE,get_debug_navigation_disabled_color());*/
+ line_material->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
+ line_material->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
+ line_material->set_flag(SpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true);
+ line_material->set_flag(SpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
+ line_material->set_albedo(get_debug_navigation_disabled_color());
navigation_disabled_material = line_material;
@@ -834,11 +834,11 @@ Ref<Material> SceneTree::get_debug_collision_material() {
return collision_material;
Ref<SpatialMaterial> line_material = Ref<SpatialMaterial>(memnew(SpatialMaterial));
- /*line_material->set_flag(Material::FLAG_UNSHADED, true);
- line_material->set_line_width(3.0);
- line_material->set_fixed_flag(SpatialMaterial::FLAG_USE_ALPHA, true);
- line_material->set_fixed_flag(SpatialMaterial::FLAG_USE_COLOR_ARRAY, true);
- line_material->set_parameter(SpatialMaterial::PARAM_DIFFUSE,get_debug_collisions_color());*/
+ line_material->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
+ line_material->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
+ line_material->set_flag(SpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true);
+ line_material->set_flag(SpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
+ line_material->set_albedo(get_debug_collisions_color());
collision_material = line_material;
@@ -852,11 +852,12 @@ Ref<ArrayMesh> SceneTree::get_debug_contact_mesh() {
debug_contact_mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
- Ref<SpatialMaterial> mat = memnew(SpatialMaterial);
- /*mat->set_flag(Material::FLAG_UNSHADED,true);
- mat->set_flag(Material::FLAG_DOUBLE_SIDED,true);
- mat->set_fixed_flag(SpatialMaterial::FLAG_USE_ALPHA,true);
- mat->set_parameter(SpatialMaterial::PARAM_DIFFUSE,get_debug_collision_contact_color());*/
+ Ref<SpatialMaterial> mat = Ref<SpatialMaterial>(memnew(SpatialMaterial));
+ mat->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
+ mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
+ mat->set_flag(SpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true);
+ mat->set_flag(SpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
+ mat->set_albedo(get_debug_collision_contact_color());
Vector3 diamond[6] = {
Vector3(-1, 0, 0),
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 4f27231050..a22d897669 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1473,8 +1473,8 @@ void Viewport::_gui_show_tooltip() {
gui.tooltip_label->set_anchor_and_margin(MARGIN_LEFT, Control::ANCHOR_BEGIN, ttp->get_margin(MARGIN_LEFT));
gui.tooltip_label->set_anchor_and_margin(MARGIN_TOP, Control::ANCHOR_BEGIN, ttp->get_margin(MARGIN_TOP));
- gui.tooltip_label->set_anchor_and_margin(MARGIN_RIGHT, Control::ANCHOR_END, ttp->get_margin(MARGIN_RIGHT));
- gui.tooltip_label->set_anchor_and_margin(MARGIN_BOTTOM, Control::ANCHOR_END, ttp->get_margin(MARGIN_BOTTOM));
+ gui.tooltip_label->set_anchor_and_margin(MARGIN_RIGHT, Control::ANCHOR_END, -ttp->get_margin(MARGIN_RIGHT));
+ gui.tooltip_label->set_anchor_and_margin(MARGIN_BOTTOM, Control::ANCHOR_END, -ttp->get_margin(MARGIN_BOTTOM));
gui.tooltip_label->set_text(tooltip);
Rect2 r(gui.tooltip_pos + Point2(10, 10), gui.tooltip_label->get_combined_minimum_size() + ttp->get_minimum_size());
Rect2 vr = gui.tooltip_label->get_viewport_rect();