summaryrefslogtreecommitdiff
path: root/scene/gui/aspect_ratio_container.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/aspect_ratio_container.cpp')
-rw-r--r--scene/gui/aspect_ratio_container.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/scene/gui/aspect_ratio_container.cpp b/scene/gui/aspect_ratio_container.cpp
index fb6fa9dec9..9526c5e793 100644
--- a/scene/gui/aspect_ratio_container.cpp
+++ b/scene/gui/aspect_ratio_container.cpp
@@ -60,12 +60,12 @@ void AspectRatioContainer::set_stretch_mode(StretchMode p_mode) {
queue_sort();
}
-void AspectRatioContainer::set_alignment_horizontal(AlignMode p_alignment_horizontal) {
+void AspectRatioContainer::set_alignment_horizontal(AlignmentMode p_alignment_horizontal) {
alignment_horizontal = p_alignment_horizontal;
queue_sort();
}
-void AspectRatioContainer::set_alignment_vertical(AlignMode p_alignment_vertical) {
+void AspectRatioContainer::set_alignment_vertical(AlignmentMode p_alignment_vertical) {
alignment_vertical = p_alignment_vertical;
queue_sort();
}
@@ -107,25 +107,25 @@ void AspectRatioContainer::_notification(int p_what) {
float align_x = 0.5;
switch (alignment_horizontal) {
- case ALIGN_BEGIN: {
+ case ALIGNMENT_BEGIN: {
align_x = 0.0;
} break;
- case ALIGN_CENTER: {
+ case ALIGNMENT_CENTER: {
align_x = 0.5;
} break;
- case ALIGN_END: {
+ case ALIGNMENT_END: {
align_x = 1.0;
} break;
}
float align_y = 0.5;
switch (alignment_vertical) {
- case ALIGN_BEGIN: {
+ case ALIGNMENT_BEGIN: {
align_y = 0.0;
} break;
- case ALIGN_CENTER: {
+ case ALIGNMENT_CENTER: {
align_y = 0.5;
} break;
- case ALIGN_END: {
+ case ALIGNMENT_END: {
align_y = 1.0;
} break;
}
@@ -166,7 +166,7 @@ void AspectRatioContainer::_bind_methods() {
BIND_ENUM_CONSTANT(STRETCH_FIT);
BIND_ENUM_CONSTANT(STRETCH_COVER);
- BIND_ENUM_CONSTANT(ALIGN_BEGIN);
- BIND_ENUM_CONSTANT(ALIGN_CENTER);
- BIND_ENUM_CONSTANT(ALIGN_END);
+ BIND_ENUM_CONSTANT(ALIGNMENT_BEGIN);
+ BIND_ENUM_CONSTANT(ALIGNMENT_CENTER);
+ BIND_ENUM_CONSTANT(ALIGNMENT_END);
}