Class AxisLayoutOptions

#include <Geode/ui/Layout.hpp>
classAxisLayoutOptions:publicgeode::LayoutOptions{ ... }

Options for controlling the behaviour of individual nodes in an AxisLayout

Examples1
auto node = CCNode::create();
// this node will have 10 units of spacing between it and the next one
node->setLayoutOptions(
    AxisLayoutOptions::create()
        ->setNextGap(10.f)
);
someNodeWithALayout->addChild(node);
Public static methods1
staticgeode::AxisLayoutOptions*create()
No description provided
Public member functions23
std::optional<bool>getAutoScale()const
No description provided
floatgetMaxScale()const
No description provided
floatgetMinScale()const
No description provided
boolhasExplicitMaxScale()const
No description provided
boolhasExplicitMinScale()const
No description provided
floatgetRelativeScale()const
No description provided
std::optional<float>getLength()const
No description provided
std::optional<float>getPrevGap()const
No description provided
std::optional<float>getNextGap()const
No description provided
boolgetBreakLine()const
No description provided
boolgetSameLine()const
No description provided
intgetScalePriority()const
No description provided
std::optional<geode::AxisAlignment>getCrossAxisAlignment()const
No description provided
geode::AxisLayoutOptions*setScaleLimits(,)

Set the limits to what the node can be scaled to. Passing std::nullopt uses the parent layout’s default min / max scales

geode::AxisLayoutOptions*setRelativeScale(
floatscale
)

Set the relative scale of this node compared to other nodes if it’s contained in an auto-scaled layout. Default is 1

geode::AxisLayoutOptions*setAutoScale()

Set auto-scaling for this node, overriding the layout’s auto-scale setting. If nullopt, the layout’s auto-scale options will be used

geode::AxisLayoutOptions*setLength()

Set an absolute length for this node. If nullopt, the length will be dynamically calculated based on content size

geode::AxisLayoutOptions*setPrevGap()

Override the default gap in the layout between this node and the previous one. If nullopt, the default gap of the layout will be used

geode::AxisLayoutOptions*setNextGap()

Override the default gap in the layout between this node and the next one. If nullopt, the default gap of the layout will be used

geode::AxisLayoutOptions*setBreakLine(
boolenable
)

If enabled, the node will always cause a growable axis layout to break into a new line even if the current line could’ve fit the next node

geode::AxisLayoutOptions*setSameLine(
boolenable
)

If enabled, the node will be forced to be on the same line as the previous node even if doing this would overflow

geode::AxisLayoutOptions*setScalePriority(
intpriority
)

Set the scale priority of this node. Nodes with higher priority will be scaled down first before nodes with lower priority when an auto-scaled layout attempts to fit its contents. Default is AXISLAYOUT_DEFAULT_PRIORITY

ℹ For optimal performance, the priorities should all be close to each other with no gaps

geode::AxisLayoutOptions*setCrossAxisAlignment()

Override the cross axis alignment for this node in the layout

Fields0
Protected member functions0
Protected fields1
;
No description provided