Merge pull request #7010 from CocosRobot/update_lua_bindings_1402283659

[AUTO]: updating luabinding automatically
This commit is contained in:
minggo 2014-06-09 11:41:17 +08:00
commit 81b80593e1
4 changed files with 250 additions and 311 deletions

View File

@ -1,7 +1,7 @@
--------------------------------
-- @module ScrollView
-- @extend Layout,ScrollViewProtocol
-- @extend Layout
--------------------------------
-- @function [parent=#ScrollView] scrollToTop

View File

@ -3,11 +3,6 @@
-- @module Widget
-- @extend ProtectedNode,LayoutParameterProtocol
--------------------------------
-- @function [parent=#Widget] clone
-- @param self
-- @return Widget#Widget ret (return value: ccui.Widget)
--------------------------------
-- @function [parent=#Widget] setSizePercent
-- @param self
@ -34,9 +29,9 @@
-- @return Node#Node ret (return value: cc.Node)
--------------------------------
-- @function [parent=#Widget] getTouchEndPos
-- @function [parent=#Widget] getSize
-- @param self
-- @return vec2_table#vec2_table ret (return value: vec2_table)
-- @return size_table#size_table ret (return value: size_table)
--------------------------------
-- @function [parent=#Widget] setPositionPercent
@ -83,6 +78,13 @@
-- @param self
-- @return LayoutParameter#LayoutParameter ret (return value: ccui.LayoutParameter)
--------------------------------
-- @function [parent=#Widget] findNextFocusedWidget
-- @param self
-- @param #ccui.Widget::FocusDirection focusdirection
-- @param #ccui.Widget widget
-- @return Widget#Widget ret (return value: ccui.Widget)
--------------------------------
-- @function [parent=#Widget] getPositionType
-- @param self
@ -110,11 +112,9 @@
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @function [parent=#Widget] findNextFocusedWidget
-- @function [parent=#Widget] getTouchBeganPosition
-- @param self
-- @param #ccui.Widget::FocusDirection focusdirection
-- @param #ccui.Widget widget
-- @return Widget#Widget ret (return value: ccui.Widget)
-- @return vec2_table#vec2_table ret (return value: vec2_table)
--------------------------------
-- @function [parent=#Widget] isTouchEnabled
@ -151,11 +151,6 @@
-- @param self
-- @param #bool bool
--------------------------------
-- @function [parent=#Widget] getTouchMovePos
-- @param self
-- @return vec2_table#vec2_table ret (return value: vec2_table)
--------------------------------
-- @function [parent=#Widget] setEnabled
-- @param self
@ -182,14 +177,9 @@
-- @param #ccui.LayoutParameter layoutparameter
--------------------------------
-- @function [parent=#Widget] getSizePercent
-- @function [parent=#Widget] clone
-- @param self
-- @return vec2_table#vec2_table ret (return value: vec2_table)
--------------------------------
-- @function [parent=#Widget] getTouchStartPos
-- @param self
-- @return vec2_table#vec2_table ret (return value: vec2_table)
-- @return Widget#Widget ret (return value: ccui.Widget)
--------------------------------
-- @function [parent=#Widget] setFocusEnabled
@ -206,12 +196,6 @@
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @function [parent=#Widget] clippingParentAreaContainPoint
-- @param self
-- @param #vec2_table vec2
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @function [parent=#Widget] getCurrentFocusedWidget
-- @param self
@ -231,9 +215,14 @@
-- @param #size_table size
--------------------------------
-- @function [parent=#Widget] getSize
-- @function [parent=#Widget] getSizePercent
-- @param self
-- @return size_table#size_table ret (return value: size_table)
-- @return vec2_table#vec2_table ret (return value: vec2_table)
--------------------------------
-- @function [parent=#Widget] getTouchMovePosition
-- @param self
-- @return vec2_table#vec2_table ret (return value: vec2_table)
--------------------------------
-- @function [parent=#Widget] getSizeType
@ -245,18 +234,16 @@
-- @param self
-- @param #bool bool
--------------------------------
-- @function [parent=#Widget] interceptTouchEvent
-- @param self
-- @param #ccui.Widget::TouchEventType toucheventtype
-- @param #ccui.Widget widget
-- @param #vec2_table vec2
--------------------------------
-- @function [parent=#Widget] addTouchEventListener
-- @param self
-- @param #function func
--------------------------------
-- @function [parent=#Widget] getTouchEndPosition
-- @param self
-- @return vec2_table#vec2_table ret (return value: vec2_table)
--------------------------------
-- @function [parent=#Widget] getPositionPercent
-- @param self
@ -278,6 +265,12 @@
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @function [parent=#Widget] isClippingParentContainsPoint
-- @param self
-- @param #vec2_table vec2
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @function [parent=#Widget] setSizeType
-- @param self

View File

@ -813,50 +813,6 @@ int lua_register_cocos2dx_ui_RelativeLayoutParameter(lua_State* tolua_S)
return 1;
}
int lua_cocos2dx_ui_Widget_clone(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::Widget* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ccui.Widget",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::Widget*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_clone'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
cocos2d::ui::Widget* ret = cobj->clone();
object_to_luaval<cocos2d::ui::Widget>(tolua_S, "ccui.Widget",(cocos2d::ui::Widget*)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "clone",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_clone'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_Widget_setSizePercent(lua_State* tolua_S)
{
int argc = 0;
@ -1081,7 +1037,7 @@ int lua_cocos2dx_ui_Widget_getVirtualRenderer(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_ui_Widget_getTouchEndPos(lua_State* tolua_S)
int lua_cocos2dx_ui_Widget_getSize(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::Widget* cobj = nullptr;
@ -1101,7 +1057,7 @@ int lua_cocos2dx_ui_Widget_getTouchEndPos(lua_State* tolua_S)
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_getTouchEndPos'", nullptr);
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_getSize'", nullptr);
return 0;
}
#endif
@ -1111,16 +1067,16 @@ int lua_cocos2dx_ui_Widget_getTouchEndPos(lua_State* tolua_S)
{
if(!ok)
return 0;
const cocos2d::Vec2& ret = cobj->getTouchEndPos();
vec2_to_luaval(tolua_S, ret);
const cocos2d::Size& ret = cobj->getSize();
size_to_luaval(tolua_S, ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getTouchEndPos",argc, 0);
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getSize",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_getTouchEndPos'.",&tolua_err);
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_getSize'.",&tolua_err);
#endif
return 0;
@ -1527,6 +1483,56 @@ int lua_cocos2dx_ui_Widget_getLayoutParameter(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_ui_Widget_findNextFocusedWidget(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::Widget* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ccui.Widget",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::Widget*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_findNextFocusedWidget'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 2)
{
cocos2d::ui::Widget::FocusDirection arg0;
cocos2d::ui::Widget* arg1;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0);
ok &= luaval_to_object<cocos2d::ui::Widget>(tolua_S, 3, "ccui.Widget",&arg1);
if(!ok)
return 0;
cocos2d::ui::Widget* ret = cobj->findNextFocusedWidget(arg0, arg1);
object_to_luaval<cocos2d::ui::Widget>(tolua_S, "ccui.Widget",(cocos2d::ui::Widget*)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "findNextFocusedWidget",argc, 2);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_findNextFocusedWidget'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_Widget_getPositionType(lua_State* tolua_S)
{
int argc = 0;
@ -1750,7 +1756,7 @@ int lua_cocos2dx_ui_Widget_isFocused(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_ui_Widget_findNextFocusedWidget(lua_State* tolua_S)
int lua_cocos2dx_ui_Widget_getTouchBeganPosition(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::Widget* cobj = nullptr;
@ -1770,32 +1776,26 @@ int lua_cocos2dx_ui_Widget_findNextFocusedWidget(lua_State* tolua_S)
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_findNextFocusedWidget'", nullptr);
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_getTouchBeganPosition'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 2)
if (argc == 0)
{
cocos2d::ui::Widget::FocusDirection arg0;
cocos2d::ui::Widget* arg1;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0);
ok &= luaval_to_object<cocos2d::ui::Widget>(tolua_S, 3, "ccui.Widget",&arg1);
if(!ok)
return 0;
cocos2d::ui::Widget* ret = cobj->findNextFocusedWidget(arg0, arg1);
object_to_luaval<cocos2d::ui::Widget>(tolua_S, "ccui.Widget",(cocos2d::ui::Widget*)ret);
const cocos2d::Vec2& ret = cobj->getTouchBeganPosition();
vec2_to_luaval(tolua_S, ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "findNextFocusedWidget",argc, 2);
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getTouchBeganPosition",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_findNextFocusedWidget'.",&tolua_err);
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_getTouchBeganPosition'.",&tolua_err);
#endif
return 0;
@ -2116,50 +2116,6 @@ int lua_cocos2dx_ui_Widget_setFlippedY(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_ui_Widget_getTouchMovePos(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::Widget* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ccui.Widget",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::Widget*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_getTouchMovePos'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
const cocos2d::Vec2& ret = cobj->getTouchMovePos();
vec2_to_luaval(tolua_S, ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getTouchMovePos",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_getTouchMovePos'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_Widget_setEnabled(lua_State* tolua_S)
{
int argc = 0;
@ -2388,7 +2344,7 @@ int lua_cocos2dx_ui_Widget_setLayoutParameter(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_ui_Widget_getSizePercent(lua_State* tolua_S)
int lua_cocos2dx_ui_Widget_clone(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::Widget* cobj = nullptr;
@ -2408,7 +2364,7 @@ int lua_cocos2dx_ui_Widget_getSizePercent(lua_State* tolua_S)
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_getSizePercent'", nullptr);
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_clone'", nullptr);
return 0;
}
#endif
@ -2418,60 +2374,16 @@ int lua_cocos2dx_ui_Widget_getSizePercent(lua_State* tolua_S)
{
if(!ok)
return 0;
const cocos2d::Vec2& ret = cobj->getSizePercent();
vec2_to_luaval(tolua_S, ret);
cocos2d::ui::Widget* ret = cobj->clone();
object_to_luaval<cocos2d::ui::Widget>(tolua_S, "ccui.Widget",(cocos2d::ui::Widget*)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getSizePercent",argc, 0);
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "clone",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_getSizePercent'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_Widget_getTouchStartPos(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::Widget* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ccui.Widget",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::Widget*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_getTouchStartPos'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
const cocos2d::Vec2& ret = cobj->getTouchStartPos();
vec2_to_luaval(tolua_S, ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getTouchStartPos",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_getTouchStartPos'.",&tolua_err);
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_clone'.",&tolua_err);
#endif
return 0;
@ -2610,53 +2522,6 @@ int lua_cocos2dx_ui_Widget_isBright(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_ui_Widget_clippingParentAreaContainPoint(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::Widget* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ccui.Widget",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::Widget*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_clippingParentAreaContainPoint'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
cocos2d::Vec2 arg0;
ok &= luaval_to_vec2(tolua_S, 2, &arg0);
if(!ok)
return 0;
bool ret = cobj->clippingParentAreaContainPoint(arg0);
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "clippingParentAreaContainPoint",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_clippingParentAreaContainPoint'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_Widget_getCurrentFocusedWidget(lua_State* tolua_S)
{
int argc = 0;
@ -2793,7 +2658,7 @@ int lua_cocos2dx_ui_Widget_updateSizeAndPosition(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_ui_Widget_getSize(lua_State* tolua_S)
int lua_cocos2dx_ui_Widget_getSizePercent(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::Widget* cobj = nullptr;
@ -2813,7 +2678,7 @@ int lua_cocos2dx_ui_Widget_getSize(lua_State* tolua_S)
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_getSize'", nullptr);
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_getSizePercent'", nullptr);
return 0;
}
#endif
@ -2823,16 +2688,60 @@ int lua_cocos2dx_ui_Widget_getSize(lua_State* tolua_S)
{
if(!ok)
return 0;
const cocos2d::Size& ret = cobj->getSize();
size_to_luaval(tolua_S, ret);
const cocos2d::Vec2& ret = cobj->getSizePercent();
vec2_to_luaval(tolua_S, ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getSize",argc, 0);
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getSizePercent",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_getSize'.",&tolua_err);
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_getSizePercent'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_Widget_getTouchMovePosition(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::Widget* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ccui.Widget",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::Widget*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_getTouchMovePosition'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
const cocos2d::Vec2& ret = cobj->getTouchMovePosition();
vec2_to_luaval(tolua_S, ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getTouchMovePosition",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_getTouchMovePosition'.",&tolua_err);
#endif
return 0;
@ -2927,58 +2836,6 @@ int lua_cocos2dx_ui_Widget_ignoreContentAdaptWithSize(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_ui_Widget_interceptTouchEvent(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::Widget* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ccui.Widget",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::Widget*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_interceptTouchEvent'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 3)
{
cocos2d::ui::Widget::TouchEventType arg0;
cocos2d::ui::Widget* arg1;
cocos2d::Vec2 arg2;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0);
ok &= luaval_to_object<cocos2d::ui::Widget>(tolua_S, 3, "ccui.Widget",&arg1);
ok &= luaval_to_vec2(tolua_S, 4, &arg2);
if(!ok)
return 0;
cobj->interceptTouchEvent(arg0, arg1, arg2);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "interceptTouchEvent",argc, 3);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_interceptTouchEvent'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_Widget_addTouchEventListener(lua_State* tolua_S)
{
int argc = 0;
@ -3029,6 +2886,50 @@ int lua_cocos2dx_ui_Widget_addTouchEventListener(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_ui_Widget_getTouchEndPosition(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::Widget* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ccui.Widget",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::Widget*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_getTouchEndPosition'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
const cocos2d::Vec2& ret = cobj->getTouchEndPosition();
vec2_to_luaval(tolua_S, ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getTouchEndPosition",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_getTouchEndPosition'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_Widget_getPositionPercent(lua_State* tolua_S)
{
int argc = 0;
@ -3208,6 +3109,53 @@ int lua_cocos2dx_ui_Widget_isFlippedY(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_ui_Widget_isClippingParentContainsPoint(lua_State* tolua_S)
{
int argc = 0;
cocos2d::ui::Widget* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ccui.Widget",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::ui::Widget*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_Widget_isClippingParentContainsPoint'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
cocos2d::Vec2 arg0;
ok &= luaval_to_vec2(tolua_S, 2, &arg0);
if(!ok)
return 0;
bool ret = cobj->isClippingParentContainsPoint(arg0);
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "isClippingParentContainsPoint",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_Widget_isClippingParentContainsPoint'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_ui_Widget_setSizeType(lua_State* tolua_S)
{
int argc = 0;
@ -3500,13 +3448,12 @@ int lua_register_cocos2dx_ui_Widget(lua_State* tolua_S)
tolua_beginmodule(tolua_S,"Widget");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_Widget_constructor);
tolua_function(tolua_S,"clone",lua_cocos2dx_ui_Widget_clone);
tolua_function(tolua_S,"setSizePercent",lua_cocos2dx_ui_Widget_setSizePercent);
tolua_function(tolua_S,"getCustomSize",lua_cocos2dx_ui_Widget_getCustomSize);
tolua_function(tolua_S,"getLeftBoundary",lua_cocos2dx_ui_Widget_getLeftBoundary);
tolua_function(tolua_S,"setFlippedX",lua_cocos2dx_ui_Widget_setFlippedX);
tolua_function(tolua_S,"getVirtualRenderer",lua_cocos2dx_ui_Widget_getVirtualRenderer);
tolua_function(tolua_S,"getTouchEndPos",lua_cocos2dx_ui_Widget_getTouchEndPos);
tolua_function(tolua_S,"getSize",lua_cocos2dx_ui_Widget_getSize);
tolua_function(tolua_S,"setPositionPercent",lua_cocos2dx_ui_Widget_setPositionPercent);
tolua_function(tolua_S,"getLayoutSize",lua_cocos2dx_ui_Widget_getLayoutSize);
tolua_function(tolua_S,"setHighlighted",lua_cocos2dx_ui_Widget_setHighlighted);
@ -3516,12 +3463,13 @@ int lua_register_cocos2dx_ui_Widget(lua_State* tolua_S)
tolua_function(tolua_S,"getVirtualRendererSize",lua_cocos2dx_ui_Widget_getVirtualRendererSize);
tolua_function(tolua_S,"isHighlighted",lua_cocos2dx_ui_Widget_isHighlighted);
tolua_function(tolua_S,"getLayoutParameter",lua_cocos2dx_ui_Widget_getLayoutParameter);
tolua_function(tolua_S,"findNextFocusedWidget",lua_cocos2dx_ui_Widget_findNextFocusedWidget);
tolua_function(tolua_S,"getPositionType",lua_cocos2dx_ui_Widget_getPositionType);
tolua_function(tolua_S,"getTopBoundary",lua_cocos2dx_ui_Widget_getTopBoundary);
tolua_function(tolua_S,"getChildByName",lua_cocos2dx_ui_Widget_getChildByName);
tolua_function(tolua_S,"isEnabled",lua_cocos2dx_ui_Widget_isEnabled);
tolua_function(tolua_S,"isFocused",lua_cocos2dx_ui_Widget_isFocused);
tolua_function(tolua_S,"findNextFocusedWidget",lua_cocos2dx_ui_Widget_findNextFocusedWidget);
tolua_function(tolua_S,"getTouchBeganPosition",lua_cocos2dx_ui_Widget_getTouchBeganPosition);
tolua_function(tolua_S,"isTouchEnabled",lua_cocos2dx_ui_Widget_isTouchEnabled);
tolua_function(tolua_S,"getActionTag",lua_cocos2dx_ui_Widget_getActionTag);
tolua_function(tolua_S,"getWorldPosition",lua_cocos2dx_ui_Widget_getWorldPosition);
@ -3529,30 +3477,29 @@ int lua_register_cocos2dx_ui_Widget(lua_State* tolua_S)
tolua_function(tolua_S,"setActionTag",lua_cocos2dx_ui_Widget_setActionTag);
tolua_function(tolua_S,"setTouchEnabled",lua_cocos2dx_ui_Widget_setTouchEnabled);
tolua_function(tolua_S,"setFlippedY",lua_cocos2dx_ui_Widget_setFlippedY);
tolua_function(tolua_S,"getTouchMovePos",lua_cocos2dx_ui_Widget_getTouchMovePos);
tolua_function(tolua_S,"setEnabled",lua_cocos2dx_ui_Widget_setEnabled);
tolua_function(tolua_S,"getRightBoundary",lua_cocos2dx_ui_Widget_getRightBoundary);
tolua_function(tolua_S,"setBrightStyle",lua_cocos2dx_ui_Widget_setBrightStyle);
tolua_function(tolua_S,"setName",lua_cocos2dx_ui_Widget_setName);
tolua_function(tolua_S,"setLayoutParameter",lua_cocos2dx_ui_Widget_setLayoutParameter);
tolua_function(tolua_S,"getSizePercent",lua_cocos2dx_ui_Widget_getSizePercent);
tolua_function(tolua_S,"getTouchStartPos",lua_cocos2dx_ui_Widget_getTouchStartPos);
tolua_function(tolua_S,"clone",lua_cocos2dx_ui_Widget_clone);
tolua_function(tolua_S,"setFocusEnabled",lua_cocos2dx_ui_Widget_setFocusEnabled);
tolua_function(tolua_S,"getBottomBoundary",lua_cocos2dx_ui_Widget_getBottomBoundary);
tolua_function(tolua_S,"isBright",lua_cocos2dx_ui_Widget_isBright);
tolua_function(tolua_S,"clippingParentAreaContainPoint",lua_cocos2dx_ui_Widget_clippingParentAreaContainPoint);
tolua_function(tolua_S,"getCurrentFocusedWidget",lua_cocos2dx_ui_Widget_getCurrentFocusedWidget);
tolua_function(tolua_S,"requestFocus",lua_cocos2dx_ui_Widget_requestFocus);
tolua_function(tolua_S,"updateSizeAndPosition",lua_cocos2dx_ui_Widget_updateSizeAndPosition);
tolua_function(tolua_S,"getSize",lua_cocos2dx_ui_Widget_getSize);
tolua_function(tolua_S,"getSizePercent",lua_cocos2dx_ui_Widget_getSizePercent);
tolua_function(tolua_S,"getTouchMovePosition",lua_cocos2dx_ui_Widget_getTouchMovePosition);
tolua_function(tolua_S,"getSizeType",lua_cocos2dx_ui_Widget_getSizeType);
tolua_function(tolua_S,"ignoreContentAdaptWithSize",lua_cocos2dx_ui_Widget_ignoreContentAdaptWithSize);
tolua_function(tolua_S,"interceptTouchEvent",lua_cocos2dx_ui_Widget_interceptTouchEvent);
tolua_function(tolua_S,"addTouchEventListener",lua_cocos2dx_ui_Widget_addTouchEventListener);
tolua_function(tolua_S,"getTouchEndPosition",lua_cocos2dx_ui_Widget_getTouchEndPosition);
tolua_function(tolua_S,"getPositionPercent",lua_cocos2dx_ui_Widget_getPositionPercent);
tolua_function(tolua_S,"hitTest",lua_cocos2dx_ui_Widget_hitTest);
tolua_function(tolua_S,"isFlippedX",lua_cocos2dx_ui_Widget_isFlippedX);
tolua_function(tolua_S,"isFlippedY",lua_cocos2dx_ui_Widget_isFlippedY);
tolua_function(tolua_S,"isClippingParentContainsPoint",lua_cocos2dx_ui_Widget_isClippingParentContainsPoint);
tolua_function(tolua_S,"setSizeType",lua_cocos2dx_ui_Widget_setSizeType);
tolua_function(tolua_S,"setSize",lua_cocos2dx_ui_Widget_setSize);
tolua_function(tolua_S,"setBright",lua_cocos2dx_ui_Widget_setBright);

View File

@ -385,7 +385,6 @@ int register_all_cocos2dx_ui(lua_State* tolua_S);
#endif // __cocos2dx_ui_h__