Sets the axis of the layout
Class SimpleAxisLayout
#include <Noahh/ui/SimpleAxisLayout.hpp>Examples0
Public static methods1
staticnoahh::SimpleAxisLayout*create(noahh::Axisaxis)
Public member functions24
virtualvoidapply()
virtualcocos2d::CCSizegetSizeHint()const
noahh::SimpleAxisLayout*setAxis(noahh::Axisaxis)
noahh::SimpleAxisLayout*setMainAxisScaling(noahh::AxisScalingscaling)
Sets the scaling behaviour of the main axis The default is set to AxisScaling::None
noahh::SimpleAxisLayout*setCrossAxisScaling(noahh::AxisScalingscaling)
Sets the scaling behaviour of the cross axis The default is set to AxisScaling::None
noahh::SimpleAxisLayout*setMainAxisAlignment(noahh::MainAxisAlignmentalignment)
Sets how the items are aligned on the main axis The default is set to MainAxisAlignment::Start
noahh::SimpleAxisLayout*setCrossAxisAlignment(noahh::CrossAxisAlignmentalignment)
Sets how the items are aligned on the cross axis The default is set to CrossAxisAlignment::Center
noahh::SimpleAxisLayout*setMainAxisDirection(noahh::AxisDirectiondirection)
Sets the direction of the main axis The default is set to AxisDirection::TopToBottom for SimpleRow and AxisDirection::LeftToRight for SimpleColumn
noahh::SimpleAxisLayout*setCrossAxisDirection(noahh::AxisDirectiondirection)
Sets the direction of the cross axis The default is set to AxisDirection::TopToBottom for SimpleRow and AxisDirection::LeftToRight for SimpleColumn
noahh::SimpleAxisLayout*setGap(floatgap)
Sets the gap between items, unless overridden by a AxisGap node The default is set to 0.0f
noahh::SimpleAxisLayout*setMinRelativeScale()
Sets the minimum relative scale the node can be scaled to The default is set to 0.5f
noahh::SimpleAxisLayout*setMaxRelativeScale()
Sets the maximum relative scale the node can be scaled to The default is set to 2.0f
noahh::SimpleAxisLayout*ignoreInvisibleChildren(boolignore)
If true, the layout will not take into account invisible children when creating gaps or calculating content sizes