ui nodes 'gravity' write-only property

This commit is contained in:
MihailRis 2024-03-06 13:36:31 +03:00
parent 7601bfad3a
commit eba8332b75
5 changed files with 142 additions and 51 deletions

View file

@ -24,6 +24,22 @@ namespace gui {
top=left, bottom=right,
};
enum class Gravity {
none,
top_left,
top_center,
top_right,
center_left,
center_center,
center_right,
bottom_left,
bottom_center,
bottom_right
};
/// @brief Base abstract class for all UI elements
class UINode {
/// @brief element identifier used for direct access in UiDocument
@ -161,6 +177,8 @@ namespace gui {
/* Fetch pos from positionfunc if assigned */
void reposition();
virtual void setGravity(Gravity gravity);
};
}