Skip to content

Commit

Permalink
Fix #1635, can't generate lua bindings for set/get Node localZOrder
Browse files Browse the repository at this point in the history
---------------------------

reporeted by @bintester
  • Loading branch information
halx99 committed Jan 29, 2024
1 parent 9774d47 commit fb99773
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
- Fix build lua projects with engine prebuilts lib doesn't work, reported by @grif-on
- Fix GUI ScrollView clipping bug and add lua support by @bintester
- Ensure scissor state is set to the correct value prior to a buffer clear by @rh101
- Fix memory leaks when app exit on non-embed systems by @halx99 and @lich426
- Fix can't generate lua bindings for set/get Node localZOrder, reporeted by @bintester

## Improvements

Expand Down
4 changes: 2 additions & 2 deletions core/2d/Node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ void Node::setSkewY(float skewY)
_transformUpdated = _transformDirty = _inverseDirty = true;
}

void Node::setLocalZOrder(std::int32_t z)
void Node::setLocalZOrder(int z)
{
if (getLocalZOrder() == z)
return;
Expand All @@ -289,7 +289,7 @@ void Node::setLocalZOrder(std::int32_t z)

/// zOrder setter : private method
/// used internally to alter the zOrder variable. DON'T call this method manually
void Node::_setLocalZOrder(std::int32_t z)
void Node::_setLocalZOrder(int z)
{
_localZOrder = z;
}
Expand Down
6 changes: 3 additions & 3 deletions core/2d/Node.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@ class AX_DLL Node : public Ref
*
* @param localZOrder The local Z order value.
*/
virtual void setLocalZOrder(std::int32_t localZOrder);
virtual void setLocalZOrder(int localZOrder);

/*
Helper function used by `setLocalZOrder`. Don't use it unless you know what you are doing.
@js NA
*/
virtual void _setLocalZOrder(std::int32_t z);
virtual void _setLocalZOrder(int z);

/** !!! ONLY FOR INTERNAL USE
* Sets the arrival order when this node has a same ZOrder with other children.
Expand All @@ -201,7 +201,7 @@ class AX_DLL Node : public Ref
* @return The local (relative to its siblings) Z order.
*/

virtual std::int32_t getLocalZOrder() const { return _localZOrder; }
virtual int getLocalZOrder() const { return _localZOrder; }

/**
Defines the order in which the nodes are renderer.
Expand Down

0 comments on commit fb99773

Please sign in to comment.