align to horizontal_alignment, valign to vertical_alignment, related

This commit is contained in:
Nathan Franke
2021-11-24 20:58:47 -06:00
parent f1e3c87244
commit 41a20171eb
130 changed files with 861 additions and 1011 deletions
+11 -11
View File
@@ -48,17 +48,17 @@ public:
STRETCH_FIT,
STRETCH_COVER,
};
enum AlignMode {
ALIGN_BEGIN,
ALIGN_CENTER,
ALIGN_END,
enum AlignmentMode {
ALIGNMENT_BEGIN,
ALIGNMENT_CENTER,
ALIGNMENT_END,
};
private:
float ratio = 1.0;
StretchMode stretch_mode = STRETCH_FIT;
AlignMode alignment_horizontal = ALIGN_CENTER;
AlignMode alignment_vertical = ALIGN_CENTER;
AlignmentMode alignment_horizontal = ALIGNMENT_CENTER;
AlignmentMode alignment_vertical = ALIGNMENT_CENTER;
public:
void set_ratio(float p_ratio);
@@ -67,14 +67,14 @@ public:
void set_stretch_mode(StretchMode p_mode);
StretchMode get_stretch_mode() const { return stretch_mode; }
void set_alignment_horizontal(AlignMode p_alignment_horizontal);
AlignMode get_alignment_horizontal() const { return alignment_horizontal; }
void set_alignment_horizontal(AlignmentMode p_alignment_horizontal);
AlignmentMode get_alignment_horizontal() const { return alignment_horizontal; }
void set_alignment_vertical(AlignMode p_alignment_vertical);
AlignMode get_alignment_vertical() const { return alignment_vertical; }
void set_alignment_vertical(AlignmentMode p_alignment_vertical);
AlignmentMode get_alignment_vertical() const { return alignment_vertical; }
};
VARIANT_ENUM_CAST(AspectRatioContainer::StretchMode);
VARIANT_ENUM_CAST(AspectRatioContainer::AlignMode);
VARIANT_ENUM_CAST(AspectRatioContainer::AlignmentMode);
#endif // ASPECT_RATIO_CONTAINER_H