Class AnchorLayout

#include <Geode/cocos/base_nodes/Layout.hpp>
classAnchorLayout:publiccocos2d::Layout{ ... }

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](/classes/cocos2d/AnchorLayout) can be automatically resized without needing to manually shuffle nodes around

Examples0
Public static methods2
staticcocos2d::AnchorLayout*create()
No description provided
staticcocos2d::CCPointgetAnchoredPosition(,,)

Get a position according to anchoring rules, with the same algorithm as [AnchorLayout](/classes/cocos2d/AnchorLayout) uses to position its nodes

Parameters

in

The node whose content size to use as a reference

anchor

The anchor position

offset

Offset from the anchor
Return value
A position in `in` for the anchored and offsetted location
Public member functions2
virtualvoidapply()
No description provided
virtualcocos2d::CCSizegetSizeHint()const
No description provided
Fields0
Protected member functions0
Protected fields0