Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3-game-controller

This commit is contained in:
Dhilan007 2014-07-11 23:09:13 +08:00
commit dec2a5816e
20 changed files with 3082 additions and 1000 deletions

View File

@ -839,6 +839,18 @@ MenuItemToggle * MenuItemToggle::createWithTarget(Ref* target, SEL_MenuHandler s
return ret;
}
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
MenuItemToggle * MenuItemToggle::createWithCallbackVA(const ccMenuCallback &callback, MenuItem* item, ...)
{
va_list args;
va_start(args, item);
MenuItemToggle *ret = new MenuItemToggle();
ret->initWithCallback(callback, item, args);
ret->autorelease();
va_end(args);
return ret;
}
#else
MenuItemToggle * MenuItemToggle::createWithCallback(const ccMenuCallback &callback, MenuItem* item, ...)
{
va_list args;
@ -849,6 +861,7 @@ MenuItemToggle * MenuItemToggle::createWithCallback(const ccMenuCallback &callba
va_end(args);
return ret;
}
#endif
MenuItemToggle * MenuItemToggle::create()
{

View File

@ -478,7 +478,25 @@ public:
/** creates a menu item from a Array with a callable object */
static MenuItemToggle * createWithCallback(const ccMenuCallback& callback, const Vector<MenuItem*>& menuItems);
/** creates a menu item from a list of items with a callable object */
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
// WP8 in VS2012 does not support nullptr in variable args lists and variadic templates are also not supported
typedef MenuItem* M;
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, NULL); }
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, NULL); }
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, NULL); }
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, NULL); }
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, M m5, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, m5, NULL); }
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, M m5, M m6, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, m5, m6, NULL); }
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, M m5, M m6, M m7, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, m5, m6, m7, NULL); }
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, m5, m6, m7, m8, NULL); }
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, M m9, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, m5, m6, m7, m8, m9, NULL); }
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, M m1, M m2, M m3, M m4, M m5, M m6, M m7, M m8, M m9, M m10, std::nullptr_t listEnd) { return createWithCallbackVA(callback, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, NULL); }
// On WP8 for lists longer than 10 items, use createWithArray or variadicCreate with NULL as the last argument
static MenuItemToggle* createWithCallbackVA(const ccMenuCallback& callback, M item, ...);
#else
static MenuItemToggle* createWithCallback(const ccMenuCallback& callback, MenuItem* item, ...) CC_REQUIRES_NULL_TERMINATION;
#endif
/** creates a menu item with no target/selector and no items */
static MenuItemToggle* create();
/** creates a menu item with a item */

View File

@ -130,18 +130,15 @@ char* stExpCocoNode::GetName(CocoLoader* pCoco)
}
char* stExpCocoNode::GetValue(CocoLoader* pCoco)
{
char* szValue = ( pCoco->GetMemoryAddr_String() + m_szValue );
if(GetType(pCoco) == kStringType )
{
if(szValue && 0==strcmp(szValue,"null"))
{
strcpy(szValue,"");
}
}
return szValue;
}
char* stExpCocoNode::GetValue(CocoLoader* pCoco)
{
char* szValue = ( pCoco->GetMemoryAddr_String() + m_szValue );
if( 0==strcmp(szValue,"null") && GetType(pCoco) == kStringType )
{
strcpy(szValue,"");
}
return szValue;
}
int stExpCocoNode::GetChildNum()

View File

@ -292,7 +292,7 @@ void MeshCommand::releaseVAO()
}
}
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WP8)
void MeshCommand::listenRendererRecreated(EventCustom* event)
{
_vao = 0;

View File

@ -74,7 +74,7 @@ public:
uint32_t getMaterialID() const { return _materialID; }
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WP8)
void listenRendererRecreated(EventCustom* event);
#endif

View File

@ -1,99 +0,0 @@
--------------------------------
-- @module Bone3D
-- @extend Ref
-- @parent_module cc
--------------------------------
-- @function [parent=#Bone3D] getInverseBindPose
-- @param self
-- @return mat4_table#mat4_table ret (return value: mat4_table)
--------------------------------
-- @function [parent=#Bone3D] clearBoneBlendState
-- @param self
--------------------------------
-- @function [parent=#Bone3D] resetPose
-- @param self
--------------------------------
-- @function [parent=#Bone3D] setAnimationValue
-- @param self
-- @param #float float
-- @param #float float
-- @param #float float
-- @param #void void
-- @param #float float
--------------------------------
-- @function [parent=#Bone3D] getChildBoneByIndex
-- @param self
-- @param #int int
-- @return Bone3D#Bone3D ret (return value: cc.Bone3D)
--------------------------------
-- @function [parent=#Bone3D] removeChildBone
-- @param self
-- @param #cc.Bone3D bone3d
--------------------------------
-- @function [parent=#Bone3D] getParentBone
-- @param self
-- @return Bone3D#Bone3D ret (return value: cc.Bone3D)
--------------------------------
-- @function [parent=#Bone3D] getName
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
-- @function [parent=#Bone3D] removeAllChildBone
-- @param self
--------------------------------
-- @function [parent=#Bone3D] addChildBone
-- @param self
-- @param #cc.Bone3D bone3d
--------------------------------
-- @function [parent=#Bone3D] getChildBoneCount
-- @param self
-- @return long#long ret (return value: long)
--------------------------------
-- @function [parent=#Bone3D] updateJointMatrix
-- @param self
-- @param #vec4_table vec4
--------------------------------
-- @function [parent=#Bone3D] setInverseBindPose
-- @param self
-- @param #mat4_table mat4
--------------------------------
-- @function [parent=#Bone3D] getWorldMat
-- @param self
-- @return mat4_table#mat4_table ret (return value: mat4_table)
--------------------------------
-- @function [parent=#Bone3D] updateWorldMat
-- @param self
--------------------------------
-- @function [parent=#Bone3D] setOriPose
-- @param self
-- @param #mat4_table mat4
--------------------------------
-- @function [parent=#Bone3D] removeChildBoneByIndex
-- @param self
-- @param #int int
--------------------------------
-- @function [parent=#Bone3D] create
-- @param self
-- @param #string str
-- @return Bone3D#Bone3D ret (return value: cc.Bone3D)
return nil

View File

@ -0,0 +1,51 @@
--------------------------------
-- @module Controller
-- @parent_module cc
--------------------------------
-- @function [parent=#Controller] receiveExternalKeyEvent
-- @param self
-- @param #int int
-- @param #bool bool
--------------------------------
-- @function [parent=#Controller] getDeviceName
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
-- @function [parent=#Controller] isConnected
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @function [parent=#Controller] getDeviceId
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- @function [parent=#Controller] setTag
-- @param self
-- @param #int int
--------------------------------
-- @function [parent=#Controller] getTag
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- @function [parent=#Controller] startDiscoveryController
-- @param self
--------------------------------
-- @function [parent=#Controller] stopDiscoveryController
-- @param self
--------------------------------
-- @function [parent=#Controller] getControllerByTag
-- @param self
-- @param #int int
-- @return Controller#Controller ret (return value: cc.Controller)
return nil

View File

@ -0,0 +1,48 @@
--------------------------------
-- @module EventController
-- @extend Event
-- @parent_module cc
--------------------------------
-- @function [parent=#EventController] getControllerEventType
-- @param self
-- @return EventController::ControllerEventType#EventController::ControllerEventType ret (return value: cc.EventController::ControllerEventType)
--------------------------------
-- @function [parent=#EventController] setConnectStatus
-- @param self
-- @param #bool bool
--------------------------------
-- @function [parent=#EventController] isConnected
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @function [parent=#EventController] setKeyCode
-- @param self
-- @param #int int
--------------------------------
-- @function [parent=#EventController] getController
-- @param self
-- @return Controller#Controller ret (return value: cc.Controller)
--------------------------------
-- @function [parent=#EventController] getKeyCode
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- overload function: EventController(cc.EventController::ControllerEventType, cc.Controller, bool)
--
-- overload function: EventController(cc.EventController::ControllerEventType, cc.Controller, int)
--
-- @function [parent=#EventController] EventController
-- @param self
-- @param #cc.EventController::ControllerEventType controllereventtype
-- @param #cc.Controller controller
-- @param #int int
return nil

View File

@ -0,0 +1,22 @@
--------------------------------
-- @module EventListenerController
-- @extend EventListener
-- @parent_module cc
--------------------------------
-- @function [parent=#EventListenerController] create
-- @param self
-- @return EventListenerController#EventListenerController ret (return value: cc.EventListenerController)
--------------------------------
-- @function [parent=#EventListenerController] clone
-- @param self
-- @return EventListenerController#EventListenerController ret (return value: cc.EventListenerController)
--------------------------------
-- @function [parent=#EventListenerController] checkAvailable
-- @param self
-- @return bool#bool ret (return value: bool)
return nil

View File

@ -0,0 +1,146 @@
--------------------------------
-- @module FastTMXLayer
-- @extend Node
-- @parent_module cc
--------------------------------
-- @function [parent=#FastTMXLayer] getPositionAt
-- @param self
-- @param #vec2_table vec2
-- @return vec2_table#vec2_table ret (return value: vec2_table)
--------------------------------
-- @function [parent=#FastTMXLayer] setLayerOrientation
-- @param self
-- @param #int int
--------------------------------
-- @function [parent=#FastTMXLayer] getLayerSize
-- @param self
-- @return size_table#size_table ret (return value: size_table)
--------------------------------
-- @function [parent=#FastTMXLayer] setMapTileSize
-- @param self
-- @param #size_table size
--------------------------------
-- @function [parent=#FastTMXLayer] getLayerOrientation
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- @function [parent=#FastTMXLayer] setProperties
-- @param self
-- @param #map_table map
--------------------------------
-- @function [parent=#FastTMXLayer] setLayerName
-- @param self
-- @param #string str
--------------------------------
-- @function [parent=#FastTMXLayer] removeTileAt
-- @param self
-- @param #vec2_table vec2
--------------------------------
-- overload function: getProperties()
--
-- overload function: getProperties()
--
-- @function [parent=#FastTMXLayer] getProperties
-- @param self
-- @return map_table#map_table ret (retunr value: map_table)
--------------------------------
-- @function [parent=#FastTMXLayer] setupTiles
-- @param self
--------------------------------
-- @function [parent=#FastTMXLayer] setupTileSprite
-- @param self
-- @param #cc.Sprite sprite
-- @param #vec2_table vec2
-- @param #int int
--------------------------------
-- overload function: setTileGID(int, vec2_table, cc.TMXTileFlags_)
--
-- overload function: setTileGID(int, vec2_table)
--
-- @function [parent=#FastTMXLayer] setTileGID
-- @param self
-- @param #int int
-- @param #vec2_table vec2
-- @param #cc.TMXTileFlags_ tmxtileflags_
--------------------------------
-- @function [parent=#FastTMXLayer] getMapTileSize
-- @param self
-- @return size_table#size_table ret (return value: size_table)
--------------------------------
-- @function [parent=#FastTMXLayer] getProperty
-- @param self
-- @param #string str
-- @return Value#Value ret (return value: cc.Value)
--------------------------------
-- @function [parent=#FastTMXLayer] setLayerSize
-- @param self
-- @param #size_table size
--------------------------------
-- @function [parent=#FastTMXLayer] getLayerName
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
-- @function [parent=#FastTMXLayer] setTileSet
-- @param self
-- @param #cc.TMXTilesetInfo tmxtilesetinfo
--------------------------------
-- @function [parent=#FastTMXLayer] getTileSet
-- @param self
-- @return TMXTilesetInfo#TMXTilesetInfo ret (return value: cc.TMXTilesetInfo)
--------------------------------
-- @function [parent=#FastTMXLayer] getTileAt
-- @param self
-- @param #vec2_table vec2
-- @return Sprite#Sprite ret (return value: cc.Sprite)
--------------------------------
-- @function [parent=#FastTMXLayer] create
-- @param self
-- @param #cc.TMXTilesetInfo tmxtilesetinfo
-- @param #cc.TMXLayerInfo tmxlayerinfo
-- @param #cc.TMXMapInfo map
-- @return FastTMXLayer#FastTMXLayer ret (return value: cc.FastTMXLayer)
--------------------------------
-- @function [parent=#FastTMXLayer] removeChild
-- @param self
-- @param #cc.Node node
-- @param #bool bool
--------------------------------
-- @function [parent=#FastTMXLayer] draw
-- @param self
-- @param #cc.Renderer renderer
-- @param #mat4_table mat4
-- @param #unsigned int int
--------------------------------
-- @function [parent=#FastTMXLayer] getDescription
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
-- @function [parent=#FastTMXLayer] FastTMXLayer
-- @param self
return nil

View File

@ -0,0 +1,103 @@
--------------------------------
-- @module FastTMXTiledMap
-- @extend Node
-- @parent_module cc
--------------------------------
-- @function [parent=#FastTMXTiledMap] setObjectGroups
-- @param self
-- @param #array_table array
--------------------------------
-- @function [parent=#FastTMXTiledMap] getProperty
-- @param self
-- @param #string str
-- @return Value#Value ret (return value: cc.Value)
--------------------------------
-- @function [parent=#FastTMXTiledMap] setMapSize
-- @param self
-- @param #size_table size
--------------------------------
-- @function [parent=#FastTMXTiledMap] getObjectGroup
-- @param self
-- @param #string str
-- @return TMXObjectGroup#TMXObjectGroup ret (return value: cc.TMXObjectGroup)
--------------------------------
-- overload function: getObjectGroups()
--
-- overload function: getObjectGroups()
--
-- @function [parent=#FastTMXTiledMap] getObjectGroups
-- @param self
-- @return array_table#array_table ret (retunr value: array_table)
--------------------------------
-- @function [parent=#FastTMXTiledMap] getTileSize
-- @param self
-- @return size_table#size_table ret (return value: size_table)
--------------------------------
-- @function [parent=#FastTMXTiledMap] getMapSize
-- @param self
-- @return size_table#size_table ret (return value: size_table)
--------------------------------
-- @function [parent=#FastTMXTiledMap] getProperties
-- @param self
-- @return map_table#map_table ret (return value: map_table)
--------------------------------
-- @function [parent=#FastTMXTiledMap] getPropertiesForGID
-- @param self
-- @param #int int
-- @return Value#Value ret (return value: cc.Value)
--------------------------------
-- @function [parent=#FastTMXTiledMap] setTileSize
-- @param self
-- @param #size_table size
--------------------------------
-- @function [parent=#FastTMXTiledMap] setProperties
-- @param self
-- @param #map_table map
--------------------------------
-- @function [parent=#FastTMXTiledMap] getLayer
-- @param self
-- @param #string str
-- @return FastTMXLayer#FastTMXLayer ret (return value: cc.FastTMXLayer)
--------------------------------
-- @function [parent=#FastTMXTiledMap] getMapOrientation
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- @function [parent=#FastTMXTiledMap] setMapOrientation
-- @param self
-- @param #int int
--------------------------------
-- @function [parent=#FastTMXTiledMap] create
-- @param self
-- @param #string str
-- @return FastTMXTiledMap#FastTMXTiledMap ret (return value: cc.FastTMXTiledMap)
--------------------------------
-- @function [parent=#FastTMXTiledMap] createWithXML
-- @param self
-- @param #string str
-- @param #string str
-- @return FastTMXTiledMap#FastTMXTiledMap ret (return value: cc.FastTMXTiledMap)
--------------------------------
-- @function [parent=#FastTMXTiledMap] getDescription
-- @param self
-- @return string#string ret (return value: string)
return nil

View File

@ -1196,6 +1196,16 @@
-- @field [parent=#cc] TileMapAtlas#TileMapAtlas TileMapAtlas preloaded module
--------------------------------------------------------
-- the cc FastTMXTiledMap
-- @field [parent=#cc] FastTMXTiledMap#FastTMXTiledMap FastTMXTiledMap preloaded module
--------------------------------------------------------
-- the cc FastTMXLayer
-- @field [parent=#cc] FastTMXLayer#FastTMXLayer FastTMXLayer preloaded module
--------------------------------------------------------
-- the cc Component
-- @field [parent=#cc] Component#Component Component preloaded module
@ -1211,11 +1221,6 @@
-- @field [parent=#cc] Mesh#Mesh Mesh preloaded module
--------------------------------------------------------
-- the cc Bone3D
-- @field [parent=#cc] Bone3D#Bone3D Bone3D preloaded module
--------------------------------------------------------
-- the cc Animation3D
-- @field [parent=#cc] Animation3D#Animation3D Animation3D preloaded module

View File

@ -0,0 +1,19 @@
--------------------------------
-- @module cc
--------------------------------------------------------
-- the cc Controller
-- @field [parent=#cc] Controller#Controller Controller preloaded module
--------------------------------------------------------
-- the cc EventController
-- @field [parent=#cc] EventController#EventController EventController preloaded module
--------------------------------------------------------
-- the cc EventListenerController
-- @field [parent=#cc] EventListenerController#EventListenerController EventListenerController preloaded module
return nil

File diff suppressed because it is too large Load Diff

View File

@ -1575,6 +1575,26 @@ int register_all_cocos2dx(lua_State* tolua_S);

View File

@ -0,0 +1,826 @@
#include "lua_cocos2dx_controller_auto.hpp"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
#include "CCGameController.h"
#include "tolua_fix.h"
#include "LuaBasicConversions.h"
int lua_cocos2dx_controller_Controller_receiveExternalKeyEvent(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Controller* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.Controller",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Controller*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_controller_Controller_receiveExternalKeyEvent'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 2)
{
int arg0;
bool arg1;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0);
ok &= luaval_to_boolean(tolua_S, 3,&arg1);
if(!ok)
return 0;
cobj->receiveExternalKeyEvent(arg0, arg1);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "receiveExternalKeyEvent",argc, 2);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_controller_Controller_receiveExternalKeyEvent'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_controller_Controller_getDeviceName(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Controller* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.Controller",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Controller*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_controller_Controller_getDeviceName'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
const std::string& ret = cobj->getDeviceName();
tolua_pushcppstring(tolua_S,ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getDeviceName",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_controller_Controller_getDeviceName'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_controller_Controller_isConnected(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Controller* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.Controller",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Controller*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_controller_Controller_isConnected'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
bool ret = cobj->isConnected();
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "isConnected",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_controller_Controller_isConnected'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_controller_Controller_getDeviceId(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Controller* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.Controller",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Controller*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_controller_Controller_getDeviceId'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
int ret = cobj->getDeviceId();
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getDeviceId",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_controller_Controller_getDeviceId'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_controller_Controller_setTag(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Controller* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.Controller",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Controller*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_controller_Controller_setTag'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
int arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0);
if(!ok)
return 0;
cobj->setTag(arg0);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setTag",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_controller_Controller_setTag'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_controller_Controller_getTag(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Controller* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.Controller",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Controller*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_controller_Controller_getTag'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
int ret = cobj->getTag();
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getTag",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_controller_Controller_getTag'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_controller_Controller_startDiscoveryController(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"cc.Controller",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 0)
{
if(!ok)
return 0;
cocos2d::Controller::startDiscoveryController();
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "startDiscoveryController",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_controller_Controller_startDiscoveryController'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_controller_Controller_stopDiscoveryController(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"cc.Controller",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 0)
{
if(!ok)
return 0;
cocos2d::Controller::stopDiscoveryController();
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "stopDiscoveryController",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_controller_Controller_stopDiscoveryController'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_controller_Controller_getControllerByTag(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"cc.Controller",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 1)
{
int arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0);
if(!ok)
return 0;
cocos2d::Controller* ret = cocos2d::Controller::getControllerByTag(arg0);
object_to_luaval<cocos2d::Controller>(tolua_S, "cc.Controller",(cocos2d::Controller*)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "getControllerByTag",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_controller_Controller_getControllerByTag'.",&tolua_err);
#endif
return 0;
}
static int lua_cocos2dx_controller_Controller_finalize(lua_State* tolua_S)
{
printf("luabindings: finalizing LUA object (Controller)");
return 0;
}
int lua_register_cocos2dx_controller_Controller(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.Controller");
tolua_cclass(tolua_S,"Controller","cc.Controller","",nullptr);
tolua_beginmodule(tolua_S,"Controller");
tolua_function(tolua_S,"receiveExternalKeyEvent",lua_cocos2dx_controller_Controller_receiveExternalKeyEvent);
tolua_function(tolua_S,"getDeviceName",lua_cocos2dx_controller_Controller_getDeviceName);
tolua_function(tolua_S,"isConnected",lua_cocos2dx_controller_Controller_isConnected);
tolua_function(tolua_S,"getDeviceId",lua_cocos2dx_controller_Controller_getDeviceId);
tolua_function(tolua_S,"setTag",lua_cocos2dx_controller_Controller_setTag);
tolua_function(tolua_S,"getTag",lua_cocos2dx_controller_Controller_getTag);
tolua_function(tolua_S,"startDiscoveryController", lua_cocos2dx_controller_Controller_startDiscoveryController);
tolua_function(tolua_S,"stopDiscoveryController", lua_cocos2dx_controller_Controller_stopDiscoveryController);
tolua_function(tolua_S,"getControllerByTag", lua_cocos2dx_controller_Controller_getControllerByTag);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::Controller).name();
g_luaType[typeName] = "cc.Controller";
g_typeCast["Controller"] = "cc.Controller";
return 1;
}
int lua_cocos2dx_controller_EventController_getControllerEventType(lua_State* tolua_S)
{
int argc = 0;
cocos2d::EventController* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.EventController",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::EventController*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_controller_EventController_getControllerEventType'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
int ret = (int)cobj->getControllerEventType();
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getControllerEventType",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_controller_EventController_getControllerEventType'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_controller_EventController_setConnectStatus(lua_State* tolua_S)
{
int argc = 0;
cocos2d::EventController* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.EventController",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::EventController*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_controller_EventController_setConnectStatus'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
bool arg0;
ok &= luaval_to_boolean(tolua_S, 2,&arg0);
if(!ok)
return 0;
cobj->setConnectStatus(arg0);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setConnectStatus",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_controller_EventController_setConnectStatus'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_controller_EventController_isConnected(lua_State* tolua_S)
{
int argc = 0;
cocos2d::EventController* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.EventController",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::EventController*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_controller_EventController_isConnected'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
bool ret = cobj->isConnected();
tolua_pushboolean(tolua_S,(bool)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "isConnected",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_controller_EventController_isConnected'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_controller_EventController_setKeyCode(lua_State* tolua_S)
{
int argc = 0;
cocos2d::EventController* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.EventController",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::EventController*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_controller_EventController_setKeyCode'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
int arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0);
if(!ok)
return 0;
cobj->setKeyCode(arg0);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "setKeyCode",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_controller_EventController_setKeyCode'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_controller_EventController_getController(lua_State* tolua_S)
{
int argc = 0;
cocos2d::EventController* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.EventController",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::EventController*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_controller_EventController_getController'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
cocos2d::Controller* ret = cobj->getController();
object_to_luaval<cocos2d::Controller>(tolua_S, "cc.Controller",(cocos2d::Controller*)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getController",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_controller_EventController_getController'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_controller_EventController_getKeyCode(lua_State* tolua_S)
{
int argc = 0;
cocos2d::EventController* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.EventController",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::EventController*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_controller_EventController_getKeyCode'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
return 0;
int ret = cobj->getKeyCode();
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "getKeyCode",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_controller_EventController_getKeyCode'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_controller_EventController_constructor(lua_State* tolua_S)
{
int argc = 0;
cocos2d::EventController* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
argc = lua_gettop(tolua_S)-1;
do{
if (argc == 3) {
cocos2d::EventController::ControllerEventType arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0);
if (!ok) { break; }
cocos2d::Controller* arg1;
ok &= luaval_to_object<cocos2d::Controller>(tolua_S, 3, "cc.Controller",&arg1);
if (!ok) { break; }
bool arg2;
ok &= luaval_to_boolean(tolua_S, 4,&arg2);
if (!ok) { break; }
cobj = new cocos2d::EventController(arg0, arg1, arg2);
cobj->autorelease();
int ID = (int)cobj->_ID ;
int* luaID = &cobj->_luaID ;
toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventController");
return 1;
}
}while(0);
ok = true;
do{
if (argc == 3) {
cocos2d::EventController::ControllerEventType arg0;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0);
if (!ok) { break; }
cocos2d::Controller* arg1;
ok &= luaval_to_object<cocos2d::Controller>(tolua_S, 3, "cc.Controller",&arg1);
if (!ok) { break; }
int arg2;
ok &= luaval_to_int32(tolua_S, 4,(int *)&arg2);
if (!ok) { break; }
cobj = new cocos2d::EventController(arg0, arg1, arg2);
cobj->autorelease();
int ID = (int)cobj->_ID ;
int* luaID = &cobj->_luaID ;
toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.EventController");
return 1;
}
}while(0);
ok = true;
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "EventController",argc, 3);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_controller_EventController_constructor'.",&tolua_err);
#endif
return 0;
}
static int lua_cocos2dx_controller_EventController_finalize(lua_State* tolua_S)
{
printf("luabindings: finalizing LUA object (EventController)");
return 0;
}
int lua_register_cocos2dx_controller_EventController(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.EventController");
tolua_cclass(tolua_S,"EventController","cc.EventController","cc.Event",nullptr);
tolua_beginmodule(tolua_S,"EventController");
tolua_function(tolua_S,"new",lua_cocos2dx_controller_EventController_constructor);
tolua_function(tolua_S,"getControllerEventType",lua_cocos2dx_controller_EventController_getControllerEventType);
tolua_function(tolua_S,"setConnectStatus",lua_cocos2dx_controller_EventController_setConnectStatus);
tolua_function(tolua_S,"isConnected",lua_cocos2dx_controller_EventController_isConnected);
tolua_function(tolua_S,"setKeyCode",lua_cocos2dx_controller_EventController_setKeyCode);
tolua_function(tolua_S,"getController",lua_cocos2dx_controller_EventController_getController);
tolua_function(tolua_S,"getKeyCode",lua_cocos2dx_controller_EventController_getKeyCode);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::EventController).name();
g_luaType[typeName] = "cc.EventController";
g_typeCast["EventController"] = "cc.EventController";
return 1;
}
int lua_cocos2dx_controller_EventListenerController_create(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"cc.EventListenerController",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 0)
{
if(!ok)
return 0;
cocos2d::EventListenerController* ret = cocos2d::EventListenerController::create();
object_to_luaval<cocos2d::EventListenerController>(tolua_S, "cc.EventListenerController",(cocos2d::EventListenerController*)ret);
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "create",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_controller_EventListenerController_create'.",&tolua_err);
#endif
return 0;
}
static int lua_cocos2dx_controller_EventListenerController_finalize(lua_State* tolua_S)
{
printf("luabindings: finalizing LUA object (EventListenerController)");
return 0;
}
int lua_register_cocos2dx_controller_EventListenerController(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.EventListenerController");
tolua_cclass(tolua_S,"EventListenerController","cc.EventListenerController","cc.EventListener",nullptr);
tolua_beginmodule(tolua_S,"EventListenerController");
tolua_function(tolua_S,"create", lua_cocos2dx_controller_EventListenerController_create);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::EventListenerController).name();
g_luaType[typeName] = "cc.EventListenerController";
g_typeCast["EventListenerController"] = "cc.EventListenerController";
return 1;
}
TOLUA_API int register_all_cocos2dx_controller(lua_State* tolua_S)
{
tolua_open(tolua_S);
tolua_module(tolua_S,"cc",0);
tolua_beginmodule(tolua_S,"cc");
lua_register_cocos2dx_controller_EventListenerController(tolua_S);
lua_register_cocos2dx_controller_Controller(tolua_S);
lua_register_cocos2dx_controller_EventController(tolua_S);
tolua_endmodule(tolua_S);
return 1;
}
#endif

View File

@ -0,0 +1,37 @@
#include "base/ccConfig.h"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
#ifndef __cocos2dx_controller_h__
#define __cocos2dx_controller_h__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
int register_all_cocos2dx_controller(lua_State* tolua_S);
#endif // __cocos2dx_controller_h__
#endif //#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)

View File

@ -3603,7 +3603,6 @@
"cocos/scripting/lua-bindings/auto/api/BezierTo.lua",
"cocos/scripting/lua-bindings/auto/api/Blink.lua",
"cocos/scripting/lua-bindings/auto/api/Bone.lua",
"cocos/scripting/lua-bindings/auto/api/Bone3D.lua",
"cocos/scripting/lua-bindings/auto/api/BoneData.lua",
"cocos/scripting/lua-bindings/auto/api/Button.lua",
"cocos/scripting/lua-bindings/auto/api/CCBAnimationManager.lua",
@ -3632,6 +3631,7 @@
"cocos/scripting/lua-bindings/auto/api/ControlSlider.lua",
"cocos/scripting/lua-bindings/auto/api/ControlStepper.lua",
"cocos/scripting/lua-bindings/auto/api/ControlSwitch.lua",
"cocos/scripting/lua-bindings/auto/api/Controller.lua",
"cocos/scripting/lua-bindings/auto/api/DelayTime.lua",
"cocos/scripting/lua-bindings/auto/api/Director.lua",
"cocos/scripting/lua-bindings/auto/api/DisplayData.lua",
@ -3677,6 +3677,7 @@
"cocos/scripting/lua-bindings/auto/api/EditBox.lua",
"cocos/scripting/lua-bindings/auto/api/Event.lua",
"cocos/scripting/lua-bindings/auto/api/EventAcceleration.lua",
"cocos/scripting/lua-bindings/auto/api/EventController.lua",
"cocos/scripting/lua-bindings/auto/api/EventCustom.lua",
"cocos/scripting/lua-bindings/auto/api/EventDispatcher.lua",
"cocos/scripting/lua-bindings/auto/api/EventFocus.lua",
@ -3684,6 +3685,7 @@
"cocos/scripting/lua-bindings/auto/api/EventKeyboard.lua",
"cocos/scripting/lua-bindings/auto/api/EventListener.lua",
"cocos/scripting/lua-bindings/auto/api/EventListenerAcceleration.lua",
"cocos/scripting/lua-bindings/auto/api/EventListenerController.lua",
"cocos/scripting/lua-bindings/auto/api/EventListenerCustom.lua",
"cocos/scripting/lua-bindings/auto/api/EventListenerFocus.lua",
"cocos/scripting/lua-bindings/auto/api/EventListenerKeyboard.lua",
@ -3703,6 +3705,8 @@
"cocos/scripting/lua-bindings/auto/api/FadeOutTRTiles.lua",
"cocos/scripting/lua-bindings/auto/api/FadeOutUpTiles.lua",
"cocos/scripting/lua-bindings/auto/api/FadeTo.lua",
"cocos/scripting/lua-bindings/auto/api/FastTMXLayer.lua",
"cocos/scripting/lua-bindings/auto/api/FastTMXTiledMap.lua",
"cocos/scripting/lua-bindings/auto/api/FileUtils.lua",
"cocos/scripting/lua-bindings/auto/api/FiniteTimeAction.lua",
"cocos/scripting/lua-bindings/auto/api/FlipX.lua",
@ -3939,6 +3943,7 @@
"cocos/scripting/lua-bindings/auto/api/Widget.lua",
"cocos/scripting/lua-bindings/auto/api/ZOrderFrame.lua",
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_auto_api.lua",
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_controller_auto_api.lua",
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_experimental_video_auto_api.lua",
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_extension_auto_api.lua",
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_physics_auto_api.lua",
@ -3947,6 +3952,8 @@
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_ui_auto_api.lua",
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp",
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp",
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_controller_auto.cpp",
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_controller_auto.hpp",
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_video_auto.cpp",
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_video_auto.hpp",
"cocos/scripting/lua-bindings/auto/lua_cocos2dx_extension_auto.cpp",

View File

@ -445,7 +445,7 @@ MenuLayer4::MenuLayer4()
item3, item4,
back, nullptr ); // 9 items.
menu->alignItemsInColumns(2, 2, 2, 2, 1, nullptr);
menu->alignItemsInColumns(2, 2, 2, 2, 1, NULL);
addChild( menu );

View File

@ -9,7 +9,8 @@ collectgarbage("setstepmul", 5000)
local director = cc.Director:getInstance()
local glView = director:getOpenGLView()
if nil == glView then
glView = cc.GLView:createWithRect("Lua Tests", cc.Rect(0,0,900,640))
glView = cc.GLView:createWithRect("Lua Tests", cc.rect(0,0,900,640))
director:setOpenGLView(glView)
end
--turn on display FPS