summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/gpu_particles_collision_3d.cpp4
-rw-r--r--scene/gui/base_button.cpp15
-rw-r--r--scene/gui/base_button.h4
-rw-r--r--scene/gui/code_edit.cpp3
-rw-r--r--scene/gui/link_button.cpp1
-rw-r--r--scene/gui/menu_button.cpp1
-rw-r--r--scene/gui/tree.cpp3
7 files changed, 10 insertions, 21 deletions
diff --git a/scene/3d/gpu_particles_collision_3d.cpp b/scene/3d/gpu_particles_collision_3d.cpp
index af737b058c..baaaa23185 100644
--- a/scene/3d/gpu_particles_collision_3d.cpp
+++ b/scene/3d/gpu_particles_collision_3d.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "gpu_particles_collision_3d.h"
+
#include "core/thread_work_pool.h"
#include "mesh_instance_3d.h"
#include "scene/3d/camera_3d.h"
@@ -663,6 +664,9 @@ void GPUParticlesCollisionHeightField::_bind_methods() {
BIND_ENUM_CONSTANT(RESOLUTION_4096);
BIND_ENUM_CONSTANT(RESOLUTION_8192);
BIND_ENUM_CONSTANT(RESOLUTION_MAX);
+
+ BIND_ENUM_CONSTANT(UPDATE_MODE_WHEN_MOVED);
+ BIND_ENUM_CONSTANT(UPDATE_MODE_ALWAYS);
}
void GPUParticlesCollisionHeightField::set_follow_camera_push_ratio(float p_follow_camera_push_ratio) {
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index 2e77d20d4e..a759e329da 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -307,17 +307,6 @@ int BaseButton::get_button_mask() const {
return button_mask;
}
-void BaseButton::set_enabled_focus_mode(FocusMode p_mode) {
- enabled_focus_mode = p_mode;
- if (!status.disabled) {
- set_focus_mode(p_mode);
- }
-}
-
-Control::FocusMode BaseButton::get_enabled_focus_mode() const {
- return enabled_focus_mode;
-}
-
void BaseButton::set_keep_pressed_outside(bool p_on) {
keep_pressed_outside = p_on;
}
@@ -388,8 +377,6 @@ void BaseButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_button_mask", "mask"), &BaseButton::set_button_mask);
ClassDB::bind_method(D_METHOD("get_button_mask"), &BaseButton::get_button_mask);
ClassDB::bind_method(D_METHOD("get_draw_mode"), &BaseButton::get_draw_mode);
- ClassDB::bind_method(D_METHOD("set_enabled_focus_mode", "mode"), &BaseButton::set_enabled_focus_mode);
- ClassDB::bind_method(D_METHOD("get_enabled_focus_mode"), &BaseButton::get_enabled_focus_mode);
ClassDB::bind_method(D_METHOD("set_keep_pressed_outside", "enabled"), &BaseButton::set_keep_pressed_outside);
ClassDB::bind_method(D_METHOD("is_keep_pressed_outside"), &BaseButton::is_keep_pressed_outside);
@@ -412,7 +399,6 @@ void BaseButton::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed");
ADD_PROPERTY(PropertyInfo(Variant::INT, "action_mode", PROPERTY_HINT_ENUM, "Button Press,Button Release"), "set_action_mode", "get_action_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "button_mask", PROPERTY_HINT_FLAGS, "Mouse Left, Mouse Right, Mouse Middle"), "set_button_mask", "get_button_mask");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "enabled_focus_mode", PROPERTY_HINT_ENUM, "None,Click,All"), "set_enabled_focus_mode", "get_enabled_focus_mode");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "keep_pressed_outside"), "set_keep_pressed_outside", "is_keep_pressed_outside");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shortcut", PROPERTY_HINT_RESOURCE_TYPE, "Shortcut"), "set_shortcut", "get_shortcut");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "group", PROPERTY_HINT_RESOURCE_TYPE, "ButtonGroup"), "set_button_group", "get_button_group");
@@ -437,7 +423,6 @@ BaseButton::BaseButton() {
status.pressing_inside = false;
status.disabled = false;
set_focus_mode(FOCUS_ALL);
- enabled_focus_mode = FOCUS_ALL;
action_mode = ACTION_MODE_BUTTON_RELEASE;
button_mask = BUTTON_MASK_LEFT;
}
diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h
index 8e71931f8b..33f19949cd 100644
--- a/scene/gui/base_button.h
+++ b/scene/gui/base_button.h
@@ -49,7 +49,6 @@ private:
bool toggle_mode;
bool shortcut_in_tooltip;
bool keep_pressed_outside;
- FocusMode enabled_focus_mode;
Ref<Shortcut> shortcut;
ActionMode action_mode;
@@ -115,9 +114,6 @@ public:
void set_button_mask(int p_mask);
int get_button_mask() const;
- void set_enabled_focus_mode(FocusMode p_mode);
- FocusMode get_enabled_focus_mode() const;
-
void set_shortcut(const Ref<Shortcut> &p_shortcut);
Ref<Shortcut> get_shortcut() const;
diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp
index 56cf432b38..1eb45d7fc6 100644
--- a/scene/gui/code_edit.cpp
+++ b/scene/gui/code_edit.cpp
@@ -132,6 +132,7 @@ void CodeEdit::set_line_as_breakpoint(int p_line, bool p_breakpointed) {
breakpointed_lines.erase(p_line);
}
emit_signal("breakpoint_toggled", p_line);
+ update();
}
bool CodeEdit::is_line_breakpointed(int p_line) const {
@@ -160,6 +161,7 @@ Array CodeEdit::get_breakpointed_lines() const {
void CodeEdit::set_line_as_bookmarked(int p_line, bool p_bookmarked) {
int mask = get_line_gutter_metadata(p_line, main_gutter);
set_line_gutter_metadata(p_line, main_gutter, p_bookmarked ? mask | MAIN_GUTTER_BOOKMARK : mask & ~MAIN_GUTTER_BOOKMARK);
+ update();
}
bool CodeEdit::is_line_bookmarked(int p_line) const {
@@ -188,6 +190,7 @@ Array CodeEdit::get_bookmarked_lines() const {
void CodeEdit::set_line_as_executing(int p_line, bool p_executing) {
int mask = get_line_gutter_metadata(p_line, main_gutter);
set_line_gutter_metadata(p_line, main_gutter, p_executing ? mask | MAIN_GUTTER_EXECUTING : mask & ~MAIN_GUTTER_EXECUTING);
+ update();
}
bool CodeEdit::is_line_executing(int p_line) const {
diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp
index f8c8bd4caf..27a60945c8 100644
--- a/scene/gui/link_button.cpp
+++ b/scene/gui/link_button.cpp
@@ -127,6 +127,5 @@ void LinkButton::_bind_methods() {
LinkButton::LinkButton() {
underline_mode = UNDERLINE_MODE_ALWAYS;
- set_enabled_focus_mode(FOCUS_NONE);
set_default_cursor_shape(CURSOR_POINTING_HAND);
}
diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp
index aa69fb39e7..9b1738ec79 100644
--- a/scene/gui/menu_button.cpp
+++ b/scene/gui/menu_button.cpp
@@ -130,7 +130,6 @@ MenuButton::MenuButton() {
set_flat(true);
set_toggle_mode(true);
set_disable_shortcuts(false);
- set_enabled_focus_mode(FOCUS_NONE);
set_process_unhandled_key_input(true);
set_action_mode(ACTION_MODE_BUTTON_PRESS);
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 2f5ee20373..318496df70 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -1173,6 +1173,9 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
if (p_item->cells[i].text.size() > 0) {
float icon_width = p_item->cells[i].get_icon_size().width;
+ if (p_item->get_icon_max_width(i) > 0) {
+ icon_width = p_item->get_icon_max_width(i);
+ }
r.position.x += icon_width;
r.size.x -= icon_width;
}