A layout for positioning nodes at specific positions relative to their parent’s content size. See Anchor
for available anchoring options. Useful for example for popups, where a popup using AnchorLayout
can be automatically resized without needing to manually shuffle nodes around
Class AnchorLayout
#include <Geode/ui/Layout.hpp>
classAnchorLayout:publicgeode::Layout{ ... }
Examples0
Public static methods2
staticgeode::AnchorLayout*create()
No description provided
staticcocos2d::CCPointgetAnchoredPosition(,geode::Anchoranchor,cocos2d::CCPointconst&offset)
Get a position according to anchoring rules, with the same algorithm as AnchorLayout
uses to position its nodes
in
The node whose content size to use as a reference
anchor
The anchor position
offset
Offset from the anchor
A position in `in` for the anchored and offsetted location
Public member functions2
virtualvoidapply()
No description provided
virtualcocos2d::CCSizegetSizeHint()const
No description provided