summaryrefslogtreecommitdiffstats
path: root/scene/gui/label.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-01-04 16:39:04 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-01-04 16:39:04 +0100
commit8c48e99c179552c08707209c7dd4e57a2c711a69 (patch)
treef762b24ab0a62baab7f8d39aa7a0f468ad8da02b /scene/gui/label.cpp
parent2bffa3cbc568045bcbf9ae28914126978854d8bb (diff)
parent0be873bed22315e296bfb18ad90c39c74d52a687 (diff)
downloadredot-engine-8c48e99c179552c08707209c7dd4e57a2c711a69.tar.gz
Merge pull request #82894 from Quimisagi/label-align-values-discarded
Add compatibility rename of `(v)align` properties of `Label`
Diffstat (limited to 'scene/gui/label.cpp')
-rw-r--r--scene/gui/label.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 1b1905e793..56da1332e7 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -813,6 +813,19 @@ Size2 Label::get_minimum_size() const {
}
}
+#ifndef DISABLE_DEPRECATED
+bool Label::_set(const StringName &p_name, const Variant &p_value) {
+ if (p_name == SNAME("valign")) {
+ set_vertical_alignment((VerticalAlignment)p_value.operator int());
+ return true;
+ } else if (p_name == SNAME("align")) {
+ set_horizontal_alignment((HorizontalAlignment)p_value.operator int());
+ return true;
+ }
+ return false;
+}
+#endif
+
int Label::get_line_count() const {
if (!is_inside_tree()) {
return 1;