mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 05:51:51 +00:00
ui nodes 'gravity' write-only property
This commit is contained in:
parent
7601bfad3a
commit
eba8332b75
5 changed files with 142 additions and 51 deletions
|
|
@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue