diff --git a/loader/include/Geode/cocos/base_nodes/Layout.hpp b/loader/include/Geode/cocos/base_nodes/Layout.hpp index 28bb724d..78add9d6 100644 --- a/loader/include/Geode/cocos/base_nodes/Layout.hpp +++ b/loader/include/Geode/cocos/base_nodes/Layout.hpp @@ -103,16 +103,26 @@ protected: public: void apply(CCNode* on) override; - /** - * Sets where to align the target node's children on the cross-axis (Y for - * Row, X for Column) - */ - AxisLayout* setCrossAxisAlignment(AxisAlignment align); + Axis getAxis() const; + AxisAlignment getAxisAlignment() const; + AxisAlignment getCrossAxisAlignment() const; + float getGap() const; + bool getAxisReverse() const; + bool getCrossAxisReverse() const; + bool getAutoScale() const; + bool getGrowCrossAxis() const; + bool getCrossAxisOverflow() const; + /** * Sets where to align the target node's children on the main axis (X for * Row, Y for Column) */ AxisLayout* setAxisAlignment(AxisAlignment align); + /** + * Sets where to align the target node's children on the cross-axis (Y for + * Row, X for Column) + */ + AxisLayout* setCrossAxisAlignment(AxisAlignment align); /** * The spacing between the children of the node this layout applies to. * Measured as the space between their edges, not centres. Does not apply diff --git a/loader/src/cocos2d-ext/Layout.cpp b/loader/src/cocos2d-ext/Layout.cpp index 46009ad1..a91cb354 100644 --- a/loader/src/cocos2d-ext/Layout.cpp +++ b/loader/src/cocos2d-ext/Layout.cpp @@ -335,6 +335,42 @@ void AxisLayout::apply(CCNode* on) { AxisLayout::AxisLayout(Axis axis) : m_axis(axis) {} +Axis AxisLayout::getAxis() const { + return m_axis; +} + +AxisAlignment AxisLayout::getCrossAxisAlignment() const { + return m_crossAlignment; +} + +AxisAlignment AxisLayout::getAxisAlignment() const { + return m_axisAlignment; +} + +float AxisLayout::getGap() const { + return m_gap; +} + +bool AxisLayout::getAxisReverse() const { + return m_axisReverse; +} + +bool AxisLayout::getCrossAxisReverse() const { + return m_crossReverse; +} + +bool AxisLayout::getAutoScale() const { + return m_autoScale; +} + +bool AxisLayout::getGrowCrossAxis() const { + return m_growCrossAxis; +} + +bool AxisLayout::getCrossAxisOverflow() const { + return m_allowCrossAxisOverflow; +} + AxisLayout* AxisLayout::setCrossAxisAlignment(AxisAlignment align) { m_crossAlignment = align; return this;