diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/line_edit.cpp | 7 | ||||
-rw-r--r-- | scene/resources/style_box.cpp | 1 | ||||
-rw-r--r-- | scene/resources/texture.h | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 14167531a5..162949fd69 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -1281,7 +1281,12 @@ void LineEdit::delete_text(int p_from_column, int p_to_column) { void LineEdit::set_text(String p_text) { clear_internal(); - append_at_cursor(p_text); + + if (p_text.length() > max_length) { + append_at_cursor(p_text.substr(0, max_length)); + } else { + append_at_cursor(p_text); + } if (expand_to_text_length) { minimum_size_changed(); diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index eb65f10ec9..7328fbdb10 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -245,6 +245,7 @@ void StyleBoxTexture::set_region_rect(const Rect2 &p_region_rect) { region_rect = p_region_rect; emit_changed(); + _change_notify("region"); } Rect2 StyleBoxTexture::get_region_rect() const { diff --git a/scene/resources/texture.h b/scene/resources/texture.h index d439d34c95..fd213859b7 100644 --- a/scene/resources/texture.h +++ b/scene/resources/texture.h @@ -632,11 +632,12 @@ class AnimatedTexture : public Texture2D { //use readers writers lock for this, since its far more times read than written to RWLock *rw_lock; -private: +public: enum { MAX_FRAMES = 256 }; +private: RID proxy_ph; RID proxy; |