summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/2d/cpu_particles_2d.cpp6
-rw-r--r--scene/3d/cpu_particles.cpp8
-rw-r--r--scene/3d/listener.h2
-rw-r--r--scene/gui/split_container.cpp15
-rw-r--r--scene/gui/text_edit.cpp7
-rw-r--r--scene/gui/text_edit.h1
-rw-r--r--scene/main/viewport.cpp8
7 files changed, 27 insertions, 20 deletions
diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp
index 613387bf07..93ad99272c 100644
--- a/scene/2d/cpu_particles_2d.cpp
+++ b/scene/2d/cpu_particles_2d.cpp
@@ -1305,9 +1305,9 @@ void CPUParticles2D::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angle_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANGLE);
ADD_GROUP("Scale", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE);
- ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "scale_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_amount", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_amount_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "scale_amount_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_SCALE);
ADD_GROUP("Color", "");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "color_ramp", PROPERTY_HINT_RESOURCE_TYPE, "Gradient"), "set_color_ramp", "get_color_ramp");
diff --git a/scene/3d/cpu_particles.cpp b/scene/3d/cpu_particles.cpp
index 1269cef7c2..0966a344cc 100644
--- a/scene/3d/cpu_particles.cpp
+++ b/scene/3d/cpu_particles.cpp
@@ -523,7 +523,7 @@ void CPUParticles::_particles_process(float p_delta) {
Basis velocity_xform;
if (!local_coords) {
emission_xform = get_global_transform();
- velocity_xform = emission_xform.basis.inverse().transposed();
+ velocity_xform = emission_xform.basis;
}
for (int i = 0; i < pcount; i++) {
@@ -1361,9 +1361,9 @@ void CPUParticles::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angle_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_ANGLE);
ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "angle_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_ANGLE);
ADD_GROUP("Scale", "");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE);
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE);
- ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "scale_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_amount", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::REAL, "scale_amount_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_SCALE);
+ ADD_PROPERTYI(PropertyInfo(Variant::OBJECT, "scale_amount_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_param_curve", "get_param_curve", PARAM_SCALE);
ADD_GROUP("Color", "");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "color_ramp", PROPERTY_HINT_RESOURCE_TYPE, "Gradient"), "set_color_ramp", "get_color_ramp");
diff --git a/scene/3d/listener.h b/scene/3d/listener.h
index 8047971ebd..9901f7635c 100644
--- a/scene/3d/listener.h
+++ b/scene/3d/listener.h
@@ -71,8 +71,6 @@ public:
void set_visible_layers(uint32_t p_layers);
uint32_t get_visible_layers() const;
- Vector<Plane> get_frustum() const;
-
Listener();
~Listener();
};
diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp
index 3554f04cc0..c3265d3ed5 100644
--- a/scene/gui/split_container.cpp
+++ b/scene/gui/split_container.cpp
@@ -94,12 +94,15 @@ void SplitContainer::_resort() {
}
// Compute the final middle separation
- int clamped_split_offset = CLAMP(split_offset, ms_first[axis] - no_offset_middle_sep, (get_size()[axis] - ms_second[axis] - sep) - no_offset_middle_sep);
- middle_sep = no_offset_middle_sep + clamped_split_offset;
- if (!collapsed && should_clamp_split_offset) {
- split_offset = clamped_split_offset;
- _change_notify("split_offset");
- should_clamp_split_offset = false;
+ middle_sep = no_offset_middle_sep;
+ if (!collapsed) {
+ int clamped_split_offset = CLAMP(split_offset, ms_first[axis] - no_offset_middle_sep, (get_size()[axis] - ms_second[axis] - sep) - no_offset_middle_sep);
+ middle_sep += clamped_split_offset;
+ if (should_clamp_split_offset) {
+ split_offset = clamped_split_offset;
+ _change_notify("split_offset");
+ should_clamp_split_offset = false;
+ }
}
if (vertical) {
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 51d707c28f..c339cf6374 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -6045,7 +6045,10 @@ void TextEdit::menu_option(int p_option) {
case MENU_UNDO: {
undo();
} break;
- };
+ case MENU_REDO: {
+ redo();
+ }
+ }
}
void TextEdit::set_select_identifiers_on_hover(bool p_enable) {
@@ -6221,6 +6224,7 @@ void TextEdit::_bind_methods() {
BIND_ENUM_CONSTANT(MENU_CLEAR);
BIND_ENUM_CONSTANT(MENU_SELECT_ALL);
BIND_ENUM_CONSTANT(MENU_UNDO);
+ BIND_ENUM_CONSTANT(MENU_REDO);
BIND_ENUM_CONSTANT(MENU_MAX);
GLOBAL_DEF("gui/timers/text_edit_idle_detect_sec", 3);
@@ -6349,6 +6353,7 @@ TextEdit::TextEdit() {
menu->add_item(RTR("Clear"), MENU_CLEAR);
menu->add_separator();
menu->add_item(RTR("Undo"), MENU_UNDO, KEY_MASK_CMD | KEY_Z);
+ menu->add_item(RTR("Redo"), MENU_REDO, KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_Z);
menu->connect("id_pressed", this, "menu_option");
}
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index 8a508a8738..b1a0b60442 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -444,6 +444,7 @@ public:
MENU_CLEAR,
MENU_SELECT_ALL,
MENU_UNDO,
+ MENU_REDO,
MENU_MAX
};
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 9ceac0d7b0..3e27c86c67 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1747,7 +1747,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
mb->set_position(pos);
#ifdef DEBUG_ENABLED
- if (ScriptDebugger::get_singleton()) {
+ if (ScriptDebugger::get_singleton() && gui.mouse_focus) {
Array arr;
arr.push_back(gui.mouse_focus->get_path());
@@ -1780,7 +1780,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
}
}
- if (gui.mouse_focus->can_process()) {
+ if (gui.mouse_focus && gui.mouse_focus->can_process()) {
_gui_call_input(gui.mouse_focus, mb);
}
@@ -1850,7 +1850,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
gui.mouse_focus = NULL;
}
- if (mouse_focus->can_process()) {
+ if (mouse_focus && mouse_focus->can_process()) {
_gui_call_input(mouse_focus, mb);
}
@@ -2065,7 +2065,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
OS::get_singleton()->set_cursor_shape((OS::CursorShape)cursor_shape);
- if (over->can_process()) {
+ if (over && over->can_process()) {
_gui_call_input(over, mm);
}