diff options
| author | Yuri Sizov <11782833+YuriSizov@users.noreply.github.com> | 2023-01-13 23:33:43 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-13 23:33:43 +0300 |
| commit | d6ca14593698ae0b33424e931daab767bb207344 (patch) | |
| tree | 7d7427f0b4cd0b19aa427ff2a99692767cb8f0a0 /scene/gui/texture_rect.cpp | |
| parent | bdb3543c2a1bf417686f261dc00b7e54190458c8 (diff) | |
| parent | 54abd5b56045536b7ef48f6178b2d6a5308edb0f (diff) | |
Merge pull request #71347 from KoBeWi/CompatRect
Add expand mode compat to TextureRect
Diffstat (limited to 'scene/gui/texture_rect.cpp')
| -rw-r--r-- | scene/gui/texture_rect.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scene/gui/texture_rect.cpp b/scene/gui/texture_rect.cpp index 5a3f4af106..20472ab46e 100644 --- a/scene/gui/texture_rect.cpp +++ b/scene/gui/texture_rect.cpp @@ -178,6 +178,16 @@ void TextureRect::_bind_methods() { BIND_ENUM_CONSTANT(STRETCH_KEEP_ASPECT_COVERED); } +#ifndef DISABLE_DEPRECATED +bool TextureRect::_set(const StringName &p_name, const Variant &p_value) { + if ((p_name == SNAME("expand") || p_name == SNAME("ignore_texture_size")) && p_value.operator bool()) { + expand_mode = EXPAND_IGNORE_SIZE; + return true; + } + return false; +} +#endif + void TextureRect::_texture_changed() { if (texture.is_valid()) { queue_redraw(); |