Skip to content

Commit

Permalink
update olua
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongfq committed Nov 3, 2023
1 parent c9508f2 commit 0b25a1c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions tools/lua-bindings/conf/lua-cocos2d.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ typeconf 'cocos2d::Ref'
.exclude 'release'
.exclude 'autorelease'
.func '__gc'
.snippet [[
.body [[
{
return cclua_ccobjgc(L);
}]]
Expand Down Expand Up @@ -109,7 +109,7 @@ typeconf 'cocos2d::Scheduler'
.tag_maker 'makeScheduleCallbackTag("")'
.tag_mode 'substart'
.func 'scheduleUpdate'
.snippet [[
.body [[
{
if (doScheduleUpdate<cocos2d::Scheduler>(L) ||
doScheduleUpdate<cocos2d::ActionManager>(L) ||
Expand Down Expand Up @@ -341,7 +341,7 @@ typeconf 'cocos2d::Image'
NS_CC_END
]]
.func 'getPNGPremultipliedAlphaEnabled'
.snippet [[
.body [[
{
lua_pushboolean(L, cocos2d::LuaImage::getPNGPremultipliedAlphaEnabled());
return 1;
Expand Down Expand Up @@ -397,7 +397,7 @@ typeconf 'cocos2d::network::WebSocket::Delegate'

typeconf 'cocos2d::network::WebSocket'
.func 'init'
.snippet [[
.body [[
{
std::vector<std::string> protocols;
auto self = olua_toobj<cocos2d::network::WebSocket>(L, 1);
Expand Down Expand Up @@ -678,7 +678,7 @@ typeconf 'cocos2d::Node'
}
]]
.func 'getBounds'
.snippet [[
.body [[
{
auto self = olua_checkobj<cocos2d::Node>(L, 1);
auto target = olua_checkobj<cocos2d::Node>(L, 2);
Expand Down
8 changes: 4 additions & 4 deletions tools/lua-bindings/conf/lua-fairygui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ typeconf 'fairygui::GComponent'
.func 'setMask' .arg1 '@addref(^)'
.prop 'numChildren' .get 'int numChildren()'
.func '__index'
.snippet [[
.body [[
{
if(olua_isuserdata(L, 1)) {
if (olua_isstring(L, 2)) {
Expand All @@ -265,7 +265,7 @@ typeconf 'fairygui::GComponent'
}
}]]
.func 'resolve'
.snippet [[
.body [[
{
auto self = olua_toobj<fairygui::GComponent>(L, 1);
const char *name = olua_checkstring(L, 2);
Expand Down Expand Up @@ -431,7 +431,7 @@ typeconf 'fairygui::PopupMenu'

typeconf 'fairygui::Relations'
.func 'copyFrom'
.snippet [[
.body [[
{
fairygui::Relations *self = olua_toobj<fairygui::Relations>(L, 1);
fairygui::Relations &source = *olua_checkobj<fairygui::Relations>(L, 2);
Expand All @@ -444,7 +444,7 @@ typeconf 'fairygui::RelationItem'
.func 'getTarget' .ret '@addref(^)'
.func 'setTarget' .arg1 '@addref(^)'
.func 'copyFrom'
.snippet [[
.body [[
{
fairygui::RelationItem *self = olua_toobj<fairygui::RelationItem>(L, 1);
fairygui::RelationItem &source = *olua_checkobj<fairygui::RelationItem>(L, 2);
Expand Down
2 changes: 1 addition & 1 deletion tools/lua-bindings/olua

0 comments on commit 0b25a1c

Please sign in to comment.