Class Layout

#include <Geode/ui/Layout.hpp>
classLayout:publiccocos2d::CCObject{ ... }

Layouts automatically handle the positioning of nodes. Use CCNode::setLayout to apply a layout to a node, and then use CCNode::updateLayout to apply the layout’s positioning. Geode comes with a few default layouts like RowLayout, ColumnLayout, and GridLayout, but if you need a different kind of layout you can inherit from the Layout class.

Examples0
Public static methods0
Public member functions2
virtualvoidapply()=0

Automatically apply the layout’s positioning on a set of nodes

Parameters

on

Node to apply the layout on. Position's the node's children according to the layout. The content size of the node should be respected as a boundary the layout shouldn't overflow. The node may be rescaled to better fit its contents
virtualcocos2d::CCSizegetSizeHint()const=0

Get how much space this layout would like to take up for a given target

Fields0
Protected member functions0
Protected fields0
Derived classes3