42 enum class Types : uint8_t
46 ANCHOR_UPRIGHT_CORNER,
47 ANCHOR_DOWNLEFT_CORNER,
48 ANCHOR_DOWNRIGHT_CORNER
51 enum class Shifts : uint8_t
54 SHIFT_POSITIVE_BOUNDS,
67 void updateAnchor(fge::Vector2f
const& customTargetSize = {0.0f, 0.0f});
69 void setAnchor(Types type, fge::Vector2<Shifts>
const& shift, fge::ObjectSid target = FGE_SCENE_BAD_SID);
71 void setAnchorType(Types type);
72 void setAnchorShift(fge::Vector2<Shifts>
const& shift);
73 void setAnchorTarget(fge::ObjectSid target);
75 [[nodiscard]] Types getAnchorType()
const;
76 [[nodiscard]] fge::Vector2<Shifts>
const& getAnchorShift()
const;
77 [[nodiscard]] fge::ObjectSid getAnchorTarget()
const;
80 void setAnchorSuccessor(fge::ObjectDataWeak successor);
81 [[nodiscard]] fge::ObjectDataWeak getAnchorSuccessor()
const;
83 void needAnchorUpdate(
bool flag);
84 [[nodiscard]]
bool isNeedingAnchorUpdate()
const;
87 Types g_anchorType{Types::ANCHOR_NONE};
88 fge::Vector2<Shifts> g_anchorShift{Shifts::SHIFT_NONE, Shifts::SHIFT_NONE};
89 fge::ObjectSid g_anchorTarget{FGE_SCENE_BAD_SID};
90 bool g_anchorNeedUpdate{
true};
91 fge::ObjectDataWeak g_anchorSuccessor;