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

Conflicts:
	build/cocos2d_tests.xcodeproj/project.pbxproj
This commit is contained in:
samuele3hu 2014-06-26 16:21:09 +08:00
commit b3da322920
47 changed files with 9928 additions and 500 deletions

View File

@ -656,6 +656,7 @@ Developers:
lite3
Fixed a bug that Node's anchor point was changed after being added to ScrollView.
Added HttpClient::sendImmediate()
superrad
Clear NoSuchMethodError Exception when JniHelper fails to find methodID

View File

@ -1,4 +1,5 @@
cocos2d-x-3.2 ???
[NEW] HttpClient: added sendImmediate()
[NEW] Label: support setting line height and additional kerning of label that not using system font
[NEW] Lua-binding: Animation3D supported
[NEW] Lua-binding: UIEditor test cases added
@ -6,6 +7,7 @@ cocos2d-x-3.2 ???
[NEW] Node: added getName(), setName(), getChildByName(), enumerateChildren()
and addChild(Node* node, int localZOrder, const std::string &name)
[NEW] Node: physical body supports rotation
[NEW] utils: added findChildren() to find all children by name
[FIX] FileUtils: getStringFromFile may return a unterminated string

View File

@ -58,7 +58,7 @@
1503FAC418DA8B6C00F6518C /* tp.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1503FAB118DA8B6C00F6518C /* tp.lua */; };
1503FAC518DA8B6C00F6518C /* url.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1503FAB218DA8B6C00F6518C /* url.lua */; };
1503FAC618DA8B6C00F6518C /* url.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1503FAB218DA8B6C00F6518C /* url.lua */; };
15AECE06195C0AC900907DB0 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EA0FB65191B933000B170C8 /* MediaPlayer.framework */; };
15B0870D195AD52000D6F62B /* ActionTimeline in Resources */ = {isa = PBXBuildFile; fileRef = 38FA2E75194AECF800FF2BE4 /* ActionTimeline */; };
15C64825165F3934007D4F18 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C64824165F3934007D4F18 /* OpenGL.framework */; };
15C64827165F394E007D4F18 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C64826165F394E007D4F18 /* QuartzCore.framework */; };
15C64829165F396B007D4F18 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15C64828165F396B007D4F18 /* OpenAL.framework */; };
@ -1983,7 +1983,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
15AECE06195C0AC900907DB0 /* MediaPlayer.framework in Frameworks */,
1ABCA3B018CDA06D0087CE3A /* libz.dylib in Frameworks */,
1ABCA3AA18CD9F1A0087CE3A /* CoreMotion.framework in Frameworks */,
1ABCA3A918CD9F130087CE3A /* AudioToolbox.framework in Frameworks */,
@ -4323,6 +4322,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
15B0870D195AD52000D6F62B /* ActionTimeline in Resources */,
15E66FC8192D957100C20A52 /* Sprite3DTest in Resources */,
15C90B4418E66C1800D69802 /* mime.lua in Resources */,
15C90B4C18E66C3100D69802 /* url.lua in Resources */,

View File

@ -117,6 +117,19 @@ void captureScreen(const std::function<void(bool, const std::string&)>& afterCap
captureScreenCommand.func = std::bind(onCaptureScreen, afterCaptured, filename);
Director::getInstance()->getRenderer()->addCommand(&captureScreenCommand);
}
std::vector<Node*> findChildren(const Node &node, const std::string &name)
{
std::vector<Node*> vec;
node.enumerateChildren(name, [&vec](Node* nodeFound) -> bool {
vec.push_back(nodeFound);
return false;
});
return vec;
}
}
NS_CC_END

View File

@ -24,6 +24,10 @@ THE SOFTWARE.
****************************************************************************/
#ifndef __SUPPORT_CC_UTILS_H__
#define __SUPPORT_CC_UTILS_H__
#include <vector>
#include <string>
#include "2d/CCNode.h"
#include "base/ccMacros.h"
/** @file ccUtils.h
@ -58,6 +62,17 @@ namespace utils
* @since v3.2
*/
void captureScreen(const std::function<void(bool, const std::string&)>& afterCaptured, const std::string& filename);
/** Find children by name, it will return all child that has the same name.
* It supports c++ 11 regular expression. It is a helper function of `Node::enumerateChildren()`.
* You can refer to `Node::enumerateChildren()` for detail information.
*
* @param node The node to find
* @param name The name to search for, it supports c++ 11 expression
* @return Array of Nodes that matches the name
* @since v3.2
*/
std::vector<Node*> findChildren(const Node &node, const std::string &name);
}
NS_CC_END

View File

@ -47,8 +47,8 @@ namespace network {
static std::mutex s_requestQueueMutex;
static std::mutex s_responseQueueMutex;
static std::mutex s_SleepMutex;
static std::condition_variable s_SleepCondition;
static std::mutex s_SleepMutex;
static std::condition_variable s_SleepCondition;
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
@ -95,12 +95,12 @@ static size_t writeHeaderData(void *ptr, size_t size, size_t nmemb, void *stream
}
static int processGetTask(HttpRequest *request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream);
static int processPostTask(HttpRequest *request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream);
static int processPutTask(HttpRequest *request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream);
static int processDeleteTask(HttpRequest *request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream);
static int processGetTask(HttpRequest *request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream, char *errorBuffer);
static int processPostTask(HttpRequest *request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream, char *errorBuffer);
static int processPutTask(HttpRequest *request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream, char *errorBuffer);
static int processDeleteTask(HttpRequest *request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream, char *errorBuffer);
// int processDownloadTask(HttpRequest *task, write_callback callback, void *stream, int32_t *errorCode);
static void processResponse(HttpResponse* response, char* errorBuffer);
// Worker thread
void HttpClient::networkThread()
@ -144,71 +144,9 @@ void HttpClient::networkThread()
// Create a HttpResponse object, the default setting is http access failed
HttpResponse *response = new HttpResponse(request);
// request's refcount = 2 here, it's retained by HttpRespose constructor
request->release();
// ok, refcount = 1 now, only HttpResponse hold it.
processResponse(response, s_errorBuffer);
long responseCode = -1;
int retValue = 0;
// Process the request -> get response packet
switch (request->getRequestType())
{
case HttpRequest::Type::GET: // HTTP GET
retValue = processGetTask(request,
writeData,
response->getResponseData(),
&responseCode,
writeHeaderData,
response->getResponseHeader());
break;
case HttpRequest::Type::POST: // HTTP POST
retValue = processPostTask(request,
writeData,
response->getResponseData(),
&responseCode,
writeHeaderData,
response->getResponseHeader());
break;
case HttpRequest::Type::PUT:
retValue = processPutTask(request,
writeData,
response->getResponseData(),
&responseCode,
writeHeaderData,
response->getResponseHeader());
break;
case HttpRequest::Type::DELETE:
retValue = processDeleteTask(request,
writeData,
response->getResponseData(),
&responseCode,
writeHeaderData,
response->getResponseHeader());
break;
default:
CCASSERT(true, "CCHttpClient: unkown request type, only GET and POSt are supported");
break;
}
// write data to HttpResponse
response->setResponseCode(responseCode);
if (retValue != 0)
{
response->setSucceed(false);
response->setErrorBuffer(s_errorBuffer);
}
else
{
response->setSucceed(true);
}
// add response packet into queue
s_responseQueueMutex.lock();
s_responseQueue->pushBack(response);
@ -234,15 +172,43 @@ void HttpClient::networkThread()
}
// Worker thread
void HttpClient::networkThreadAlone(HttpRequest* request)
{
// Create a HttpResponse object, the default setting is http access failed
HttpResponse *response = new HttpResponse(request);
char errorBuffer[CURL_ERROR_SIZE] = { 0 };
processResponse(response, errorBuffer);
auto scheduler = Director::getInstance()->getScheduler();
scheduler->performFunctionInCocosThread([response, request]{
const ccHttpRequestCallback& callback = request->getCallback();
Ref* pTarget = request->getTarget();
SEL_HttpResponse pSelector = request->getSelector();
if (callback != nullptr)
{
callback(s_pHttpClient, response);
}
else if (pTarget && pSelector)
{
(pTarget->*pSelector)(s_pHttpClient, response);
}
response->release();
// do not release in other thread
request->release();
});
}
//Configure curl's timeout property
static bool configureCURL(CURL *handle)
static bool configureCURL(CURL *handle, char *errorBuffer)
{
if (!handle) {
return false;
}
int32_t code;
code = curl_easy_setopt(handle, CURLOPT_ERRORBUFFER, s_errorBuffer);
code = curl_easy_setopt(handle, CURLOPT_ERRORBUFFER, errorBuffer);
if (code != CURLE_OK) {
return false;
}
@ -298,15 +264,15 @@ public:
* @param callback Response write callback
* @param stream Response write stream
*/
bool init(HttpRequest *request, write_callback callback, void *stream, write_callback headerCallback, void *headerStream)
bool init(HttpRequest *request, write_callback callback, void *stream, write_callback headerCallback, void *headerStream, char *errorBuffer)
{
if (!_curl)
return false;
if (!configureCURL(_curl))
if (!configureCURL(_curl, errorBuffer))
return false;
/* get custom header data (if set) */
std::vector<std::string> headers=request->getHeaders();
std::vector<std::string> headers=request->getHeaders();
if(!headers.empty())
{
/* append custom headers one by one */
@ -350,20 +316,20 @@ public:
};
//Process Get Request
static int processGetTask(HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream)
static int processGetTask(HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream, char *errorBuffer)
{
CURLRaii curl;
bool ok = curl.init(request, callback, stream, headerCallback, headerStream)
bool ok = curl.init(request, callback, stream, headerCallback, headerStream, errorBuffer)
&& curl.setOption(CURLOPT_FOLLOWLOCATION, true)
&& curl.perform(responseCode);
return ok ? 0 : 1;
}
//Process POST Request
static int processPostTask(HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream)
static int processPostTask(HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream, char *errorBuffer)
{
CURLRaii curl;
bool ok = curl.init(request, callback, stream, headerCallback, headerStream)
bool ok = curl.init(request, callback, stream, headerCallback, headerStream, errorBuffer)
&& curl.setOption(CURLOPT_POST, 1)
&& curl.setOption(CURLOPT_POSTFIELDS, request->getRequestData())
&& curl.setOption(CURLOPT_POSTFIELDSIZE, request->getRequestDataSize())
@ -372,10 +338,10 @@ static int processPostTask(HttpRequest *request, write_callback callback, void *
}
//Process PUT Request
static int processPutTask(HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream)
static int processPutTask(HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream, char *errorBuffer)
{
CURLRaii curl;
bool ok = curl.init(request, callback, stream, headerCallback, headerStream)
bool ok = curl.init(request, callback, stream, headerCallback, headerStream, errorBuffer)
&& curl.setOption(CURLOPT_CUSTOMREQUEST, "PUT")
&& curl.setOption(CURLOPT_POSTFIELDS, request->getRequestData())
&& curl.setOption(CURLOPT_POSTFIELDSIZE, request->getRequestDataSize())
@ -384,16 +350,86 @@ static int processPutTask(HttpRequest *request, write_callback callback, void *s
}
//Process DELETE Request
static int processDeleteTask(HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream)
static int processDeleteTask(HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream, char *errorBuffer)
{
CURLRaii curl;
bool ok = curl.init(request, callback, stream, headerCallback, headerStream)
bool ok = curl.init(request, callback, stream, headerCallback, headerStream, errorBuffer)
&& curl.setOption(CURLOPT_CUSTOMREQUEST, "DELETE")
&& curl.setOption(CURLOPT_FOLLOWLOCATION, true)
&& curl.perform(responseCode);
return ok ? 0 : 1;
}
// Process Response
static void processResponse(HttpResponse* response, char* errorBuffer)
{
auto request = response->getHttpRequest();
long responseCode = -1;
int retValue = 0;
// Process the request -> get response packet
switch (request->getRequestType())
{
case HttpRequest::Type::GET: // HTTP GET
retValue = processGetTask(request,
writeData,
response->getResponseData(),
&responseCode,
writeHeaderData,
response->getResponseHeader(),
errorBuffer);
break;
case HttpRequest::Type::POST: // HTTP POST
retValue = processPostTask(request,
writeData,
response->getResponseData(),
&responseCode,
writeHeaderData,
response->getResponseHeader(),
errorBuffer);
break;
case HttpRequest::Type::PUT:
retValue = processPutTask(request,
writeData,
response->getResponseData(),
&responseCode,
writeHeaderData,
response->getResponseHeader(),
errorBuffer);
break;
case HttpRequest::Type::DELETE:
retValue = processDeleteTask(request,
writeData,
response->getResponseData(),
&responseCode,
writeHeaderData,
response->getResponseHeader(),
errorBuffer);
break;
default:
CCASSERT(true, "CCHttpClient: unkown request type, only GET and POSt are supported");
break;
}
// write data to HttpResponse
response->setResponseCode(responseCode);
if (retValue != 0)
{
response->setSucceed(false);
response->setErrorBuffer(errorBuffer);
}
else
{
response->setSucceed(true);
}
}
// HttpClient implementation
HttpClient* HttpClient::getInstance()
{
@ -429,7 +465,7 @@ HttpClient::~HttpClient()
s_need_quit = true;
if (s_requestQueue != nullptr) {
s_SleepCondition.notify_one();
s_SleepCondition.notify_one();
}
s_pHttpClient = nullptr;
@ -445,10 +481,10 @@ bool HttpClient::lazyInitThreadSemphore()
s_requestQueue = new Vector<HttpRequest*>();
s_responseQueue = new Vector<HttpResponse*>();
s_need_quit = false;
auto t = std::thread(CC_CALLBACK_0(HttpClient::networkThread, this));
t.detach();
s_need_quit = false;
}
return true;
@ -479,6 +515,18 @@ void HttpClient::send(HttpRequest* request)
}
}
void HttpClient::sendImmediate(HttpRequest* request)
{
if(!request)
{
return;
}
request->retain();
auto t = std::thread(&HttpClient::networkThreadAlone, this, request);
t.detach();
}
// Poll and notify main thread if responses exists in queue
void HttpClient::dispatchResponseCallbacks()
{
@ -516,6 +564,8 @@ void HttpClient::dispatchResponseCallbacks()
}
response->release();
// do not release in other thread
request->release();
}
}

View File

@ -62,6 +62,13 @@ public:
please make sure request->_requestData is clear before calling "send" here.
*/
void send(HttpRequest* request);
/**
* Immediate send a request
* @param request a HttpRequest object, which includes url, response callback etc.
please make sure request->_requestData is clear before calling "sendImmediate" here.
*/
void sendImmediate(HttpRequest* request);
/**
@ -101,6 +108,7 @@ private:
*/
bool lazyInitThreadSemphore();
void networkThread();
void networkThreadAlone(HttpRequest* request);
/** Poll function called from main thread to dispatch callbacks when http requests finished **/
void dispatchResponseCallbacks();

View File

@ -0,0 +1,27 @@
--------------------------------
-- @module ActionFadeFrame
-- @extend ActionFrame
-- @parent_module ccs
--------------------------------
-- @function [parent=#ActionFadeFrame] getOpacity
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- @function [parent=#ActionFadeFrame] getAction
-- @param self
-- @param #float float
-- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval)
--------------------------------
-- @function [parent=#ActionFadeFrame] setOpacity
-- @param self
-- @param #int int
--------------------------------
-- @function [parent=#ActionFadeFrame] ActionFadeFrame
-- @param self
return nil

View File

@ -0,0 +1,67 @@
--------------------------------
-- @module ActionFrame
-- @extend Ref
-- @parent_module ccs
--------------------------------
-- overload function: getAction(float, ccs.ActionFrame)
--
-- overload function: getAction(float)
--
-- @function [parent=#ActionFrame] getAction
-- @param self
-- @param #float float
-- @param #ccs.ActionFrame actionframe
-- @return ActionInterval#ActionInterval ret (retunr value: cc.ActionInterval)
--------------------------------
-- @function [parent=#ActionFrame] getFrameType
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- @function [parent=#ActionFrame] setFrameTime
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#ActionFrame] setEasingType
-- @param self
-- @param #int int
--------------------------------
-- @function [parent=#ActionFrame] getFrameTime
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- @function [parent=#ActionFrame] getFrameIndex
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- @function [parent=#ActionFrame] setFrameType
-- @param self
-- @param #int int
--------------------------------
-- @function [parent=#ActionFrame] setFrameIndex
-- @param self
-- @param #int int
--------------------------------
-- @function [parent=#ActionFrame] setEasingParameter
-- @param self
-- @param #array_table array
--------------------------------
-- @function [parent=#ActionFrame] getEasingType
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- @function [parent=#ActionFrame] ActionFrame
-- @param self
return nil

View File

@ -0,0 +1,27 @@
--------------------------------
-- @module ActionMoveFrame
-- @extend ActionFrame
-- @parent_module ccs
--------------------------------
-- @function [parent=#ActionMoveFrame] setPosition
-- @param self
-- @param #vec2_table vec2
--------------------------------
-- @function [parent=#ActionMoveFrame] getAction
-- @param self
-- @param #float float
-- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval)
--------------------------------
-- @function [parent=#ActionMoveFrame] getPosition
-- @param self
-- @return vec2_table#vec2_table ret (return value: vec2_table)
--------------------------------
-- @function [parent=#ActionMoveFrame] ActionMoveFrame
-- @param self
return nil

View File

@ -0,0 +1,32 @@
--------------------------------
-- @module ActionRotationFrame
-- @extend ActionFrame
-- @parent_module ccs
--------------------------------
-- @function [parent=#ActionRotationFrame] setRotation
-- @param self
-- @param #float float
--------------------------------
-- overload function: getAction(float, ccs.ActionFrame)
--
-- overload function: getAction(float)
--
-- @function [parent=#ActionRotationFrame] getAction
-- @param self
-- @param #float float
-- @param #ccs.ActionFrame actionframe
-- @return ActionInterval#ActionInterval ret (retunr value: cc.ActionInterval)
--------------------------------
-- @function [parent=#ActionRotationFrame] getRotation
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- @function [parent=#ActionRotationFrame] ActionRotationFrame
-- @param self
return nil

View File

@ -0,0 +1,37 @@
--------------------------------
-- @module ActionScaleFrame
-- @extend ActionFrame
-- @parent_module ccs
--------------------------------
-- @function [parent=#ActionScaleFrame] setScaleY
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#ActionScaleFrame] setScaleX
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#ActionScaleFrame] getScaleY
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- @function [parent=#ActionScaleFrame] getScaleX
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- @function [parent=#ActionScaleFrame] getAction
-- @param self
-- @param #float float
-- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval)
--------------------------------
-- @function [parent=#ActionScaleFrame] ActionScaleFrame
-- @param self
return nil

View File

@ -0,0 +1,136 @@
--------------------------------
-- @module ActionTimeline
-- @extend Action
-- @parent_module ccs
--------------------------------
-- @function [parent=#ActionTimeline] getTimelines
-- @param self
-- @return array_table#array_table ret (return value: array_table)
--------------------------------
-- @function [parent=#ActionTimeline] getCurrentFrame
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- @function [parent=#ActionTimeline] getStartFrame
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- @function [parent=#ActionTimeline] pause
-- @param self
--------------------------------
-- @function [parent=#ActionTimeline] setFrameEventCallFunc
-- @param self
-- @param #function func
--------------------------------
-- @function [parent=#ActionTimeline] resume
-- @param self
--------------------------------
-- @function [parent=#ActionTimeline] getDuration
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- @function [parent=#ActionTimeline] addTimeline
-- @param self
-- @param #ccs.Timeline timeline
--------------------------------
-- @function [parent=#ActionTimeline] getEndFrame
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- @function [parent=#ActionTimeline] setTimeSpeed
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#ActionTimeline] init
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @function [parent=#ActionTimeline] setDuration
-- @param self
-- @param #int int
--------------------------------
-- @function [parent=#ActionTimeline] getTimeSpeed
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- @function [parent=#ActionTimeline] gotoFrameAndPause
-- @param self
-- @param #int int
--------------------------------
-- @function [parent=#ActionTimeline] isPlaying
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- overload function: gotoFrameAndPlay(int, bool)
--
-- overload function: gotoFrameAndPlay(int)
--
-- overload function: gotoFrameAndPlay(int, int, bool)
--
-- @function [parent=#ActionTimeline] gotoFrameAndPlay
-- @param self
-- @param #int int
-- @param #int int
-- @param #bool bool
--------------------------------
-- @function [parent=#ActionTimeline] removeTimeline
-- @param self
-- @param #ccs.Timeline timeline
--------------------------------
-- @function [parent=#ActionTimeline] clearFrameEventCallFunc
-- @param self
--------------------------------
-- @function [parent=#ActionTimeline] create
-- @param self
-- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline)
--------------------------------
-- @function [parent=#ActionTimeline] step
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#ActionTimeline] startWithTarget
-- @param self
-- @param #cc.Node node
--------------------------------
-- @function [parent=#ActionTimeline] clone
-- @param self
-- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline)
--------------------------------
-- @function [parent=#ActionTimeline] reverse
-- @param self
-- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline)
--------------------------------
-- @function [parent=#ActionTimeline] isDone
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @function [parent=#ActionTimeline] ActionTimeline
-- @param self
return nil

View File

@ -0,0 +1,41 @@
--------------------------------
-- @module ActionTimelineCache
--------------------------------
-- @function [parent=#ActionTimelineCache] createAction
-- @param self
-- @param #string str
-- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline)
--------------------------------
-- @function [parent=#ActionTimelineCache] purge
-- @param self
--------------------------------
-- @function [parent=#ActionTimelineCache] init
-- @param self
--------------------------------
-- @function [parent=#ActionTimelineCache] loadAnimationActionWithContent
-- @param self
-- @param #string str
-- @param #string str
-- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline)
--------------------------------
-- @function [parent=#ActionTimelineCache] loadAnimationActionWithFile
-- @param self
-- @param #string str
-- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline)
--------------------------------
-- @function [parent=#ActionTimelineCache] removeAction
-- @param self
-- @param #string str
--------------------------------
-- @function [parent=#ActionTimelineCache] destroyInstance
-- @param self
return nil

View File

@ -18,6 +18,6 @@
-- @function [parent=#ActionTimelineData] create
-- @param self
-- @param #int int
-- @return timeline::ActionTimelineData#timeline::ActionTimelineData ret (return value: ccs.timeline::ActionTimelineData)
-- @return ActionTimelineData#ActionTimelineData ret (return value: ccs.ActionTimelineData)
return nil

View File

@ -0,0 +1,27 @@
--------------------------------
-- @module ActionTintFrame
-- @extend ActionFrame
-- @parent_module ccs
--------------------------------
-- @function [parent=#ActionTintFrame] getColor
-- @param self
-- @return color3b_table#color3b_table ret (return value: color3b_table)
--------------------------------
-- @function [parent=#ActionTintFrame] getAction
-- @param self
-- @param #float float
-- @return ActionInterval#ActionInterval ret (return value: cc.ActionInterval)
--------------------------------
-- @function [parent=#ActionTintFrame] setColor
-- @param self
-- @param #color3b_table color3b
--------------------------------
-- @function [parent=#ActionTintFrame] ActionTintFrame
-- @param self
return nil

View File

@ -0,0 +1,31 @@
--------------------------------
-- @module AnchorPointFrame
-- @extend Frame
-- @parent_module ccs
--------------------------------
-- @function [parent=#AnchorPointFrame] setAnchorPoint
-- @param self
-- @param #vec2_table vec2
--------------------------------
-- @function [parent=#AnchorPointFrame] getAnchorPoint
-- @param self
-- @return vec2_table#vec2_table ret (return value: vec2_table)
--------------------------------
-- @function [parent=#AnchorPointFrame] create
-- @param self
-- @return AnchorPointFrame#AnchorPointFrame ret (return value: ccs.AnchorPointFrame)
--------------------------------
-- @function [parent=#AnchorPointFrame] clone
-- @param self
-- @return Frame#Frame ret (return value: ccs.Frame)
--------------------------------
-- @function [parent=#AnchorPointFrame] AnchorPointFrame
-- @param self
return nil

View File

@ -0,0 +1,46 @@
--------------------------------
-- @module ColorFrame
-- @extend Frame
-- @parent_module ccs
--------------------------------
-- @function [parent=#ColorFrame] getAlpha
-- @param self
-- @return unsigned char#unsigned char ret (return value: unsigned char)
--------------------------------
-- @function [parent=#ColorFrame] getColor
-- @param self
-- @return color3b_table#color3b_table ret (return value: color3b_table)
--------------------------------
-- @function [parent=#ColorFrame] setAlpha
-- @param self
-- @param #unsigned char char
--------------------------------
-- @function [parent=#ColorFrame] setColor
-- @param self
-- @param #color3b_table color3b
--------------------------------
-- @function [parent=#ColorFrame] create
-- @param self
-- @return ColorFrame#ColorFrame ret (return value: ccs.ColorFrame)
--------------------------------
-- @function [parent=#ColorFrame] apply
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#ColorFrame] clone
-- @param self
-- @return Frame#Frame ret (return value: ccs.Frame)
--------------------------------
-- @function [parent=#ColorFrame] ColorFrame
-- @param self
return nil

View File

@ -0,0 +1,31 @@
--------------------------------
-- @module EventFrame
-- @extend Frame
-- @parent_module ccs
--------------------------------
-- @function [parent=#EventFrame] setEvent
-- @param self
-- @param #string str
--------------------------------
-- @function [parent=#EventFrame] getEvent
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
-- @function [parent=#EventFrame] create
-- @param self
-- @return EventFrame#EventFrame ret (return value: ccs.EventFrame)
--------------------------------
-- @function [parent=#EventFrame] clone
-- @param self
-- @return Frame#Frame ret (return value: ccs.Frame)
--------------------------------
-- @function [parent=#EventFrame] EventFrame
-- @param self
return nil

View File

@ -0,0 +1,57 @@
--------------------------------
-- @module Frame
-- @extend Ref
-- @parent_module ccs
--------------------------------
-- @function [parent=#Frame] clone
-- @param self
-- @return Frame#Frame ret (return value: ccs.Frame)
--------------------------------
-- @function [parent=#Frame] setNode
-- @param self
-- @param #cc.Node node
--------------------------------
-- @function [parent=#Frame] setTimeline
-- @param self
-- @param #ccs.Timeline timeline
--------------------------------
-- @function [parent=#Frame] getFrameIndex
-- @param self
-- @return unsigned int#unsigned int ret (return value: unsigned int)
--------------------------------
-- @function [parent=#Frame] apply
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#Frame] isTween
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @function [parent=#Frame] setFrameIndex
-- @param self
-- @param #unsigned int int
--------------------------------
-- @function [parent=#Frame] setTween
-- @param self
-- @param #bool bool
--------------------------------
-- @function [parent=#Frame] getTimeline
-- @param self
-- @return Timeline#Timeline ret (return value: ccs.Timeline)
--------------------------------
-- @function [parent=#Frame] getNode
-- @param self
-- @return Node#Node ret (return value: cc.Node)
return nil

View File

@ -0,0 +1,41 @@
--------------------------------
-- @module InnerActionFrame
-- @extend Frame
-- @parent_module ccs
--------------------------------
-- @function [parent=#InnerActionFrame] getInnerActionType
-- @param self
-- @return InnerActionType#InnerActionType ret (return value: ccs.InnerActionType)
--------------------------------
-- @function [parent=#InnerActionFrame] setStartFrameIndex
-- @param self
-- @param #int int
--------------------------------
-- @function [parent=#InnerActionFrame] setInnerActionType
-- @param self
-- @param #ccs.InnerActionType inneractiontype
--------------------------------
-- @function [parent=#InnerActionFrame] getStartFrameIndex
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- @function [parent=#InnerActionFrame] create
-- @param self
-- @return InnerActionFrame#InnerActionFrame ret (return value: ccs.InnerActionFrame)
--------------------------------
-- @function [parent=#InnerActionFrame] clone
-- @param self
-- @return Frame#Frame ret (return value: ccs.Frame)
--------------------------------
-- @function [parent=#InnerActionFrame] InnerActionFrame
-- @param self
return nil

View File

@ -0,0 +1,59 @@
--------------------------------
-- @module NodeReader
--------------------------------
-- @function [parent=#NodeReader] setJsonPath
-- @param self
-- @param #string str
--------------------------------
-- @function [parent=#NodeReader] createNode
-- @param self
-- @param #string str
-- @return Node#Node ret (return value: cc.Node)
--------------------------------
-- @function [parent=#NodeReader] loadNodeWithFile
-- @param self
-- @param #string str
-- @return Node#Node ret (return value: cc.Node)
--------------------------------
-- @function [parent=#NodeReader] purge
-- @param self
--------------------------------
-- @function [parent=#NodeReader] init
-- @param self
--------------------------------
-- @function [parent=#NodeReader] loadNodeWithContent
-- @param self
-- @param #string str
-- @return Node#Node ret (return value: cc.Node)
--------------------------------
-- @function [parent=#NodeReader] isRecordJsonPath
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @function [parent=#NodeReader] getJsonPath
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
-- @function [parent=#NodeReader] setRecordJsonPath
-- @param self
-- @param #bool bool
--------------------------------
-- @function [parent=#NodeReader] destroyInstance
-- @param self
--------------------------------
-- @function [parent=#NodeReader] NodeReader
-- @param self
return nil

View File

@ -0,0 +1,56 @@
--------------------------------
-- @module PositionFrame
-- @extend Frame
-- @parent_module ccs
--------------------------------
-- @function [parent=#PositionFrame] getX
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- @function [parent=#PositionFrame] getY
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- @function [parent=#PositionFrame] setPosition
-- @param self
-- @param #vec2_table vec2
--------------------------------
-- @function [parent=#PositionFrame] setX
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#PositionFrame] setY
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#PositionFrame] getPosition
-- @param self
-- @return vec2_table#vec2_table ret (return value: vec2_table)
--------------------------------
-- @function [parent=#PositionFrame] create
-- @param self
-- @return PositionFrame#PositionFrame ret (return value: ccs.PositionFrame)
--------------------------------
-- @function [parent=#PositionFrame] apply
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#PositionFrame] clone
-- @param self
-- @return Frame#Frame ret (return value: ccs.Frame)
--------------------------------
-- @function [parent=#PositionFrame] PositionFrame
-- @param self
return nil

View File

@ -0,0 +1,36 @@
--------------------------------
-- @module RotationFrame
-- @extend Frame
-- @parent_module ccs
--------------------------------
-- @function [parent=#RotationFrame] setRotation
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#RotationFrame] getRotation
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- @function [parent=#RotationFrame] create
-- @param self
-- @return RotationFrame#RotationFrame ret (return value: ccs.RotationFrame)
--------------------------------
-- @function [parent=#RotationFrame] apply
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#RotationFrame] clone
-- @param self
-- @return Frame#Frame ret (return value: ccs.Frame)
--------------------------------
-- @function [parent=#RotationFrame] RotationFrame
-- @param self
return nil

View File

@ -0,0 +1,26 @@
--------------------------------
-- @module RotationSkewFrame
-- @extend SkewFrame
-- @parent_module ccs
--------------------------------
-- @function [parent=#RotationSkewFrame] create
-- @param self
-- @return RotationSkewFrame#RotationSkewFrame ret (return value: ccs.RotationSkewFrame)
--------------------------------
-- @function [parent=#RotationSkewFrame] apply
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#RotationSkewFrame] clone
-- @param self
-- @return Frame#Frame ret (return value: ccs.Frame)
--------------------------------
-- @function [parent=#RotationSkewFrame] RotationSkewFrame
-- @param self
return nil

View File

@ -0,0 +1,51 @@
--------------------------------
-- @module ScaleFrame
-- @extend Frame
-- @parent_module ccs
--------------------------------
-- @function [parent=#ScaleFrame] setScaleY
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#ScaleFrame] setScaleX
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#ScaleFrame] getScaleY
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- @function [parent=#ScaleFrame] getScaleX
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- @function [parent=#ScaleFrame] setScale
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#ScaleFrame] create
-- @param self
-- @return ScaleFrame#ScaleFrame ret (return value: ccs.ScaleFrame)
--------------------------------
-- @function [parent=#ScaleFrame] apply
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#ScaleFrame] clone
-- @param self
-- @return Frame#Frame ret (return value: ccs.Frame)
--------------------------------
-- @function [parent=#ScaleFrame] ScaleFrame
-- @param self
return nil

View File

@ -0,0 +1,46 @@
--------------------------------
-- @module SkewFrame
-- @extend Frame
-- @parent_module ccs
--------------------------------
-- @function [parent=#SkewFrame] getSkewY
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- @function [parent=#SkewFrame] setSkewX
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#SkewFrame] setSkewY
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#SkewFrame] getSkewX
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- @function [parent=#SkewFrame] create
-- @param self
-- @return SkewFrame#SkewFrame ret (return value: ccs.SkewFrame)
--------------------------------
-- @function [parent=#SkewFrame] apply
-- @param self
-- @param #float float
--------------------------------
-- @function [parent=#SkewFrame] clone
-- @param self
-- @return Frame#Frame ret (return value: ccs.Frame)
--------------------------------
-- @function [parent=#SkewFrame] SkewFrame
-- @param self
return nil

View File

@ -0,0 +1,36 @@
--------------------------------
-- @module TextureFrame
-- @extend Frame
-- @parent_module ccs
--------------------------------
-- @function [parent=#TextureFrame] getTextureName
-- @param self
-- @return string#string ret (return value: string)
--------------------------------
-- @function [parent=#TextureFrame] setNode
-- @param self
-- @param #cc.Node node
--------------------------------
-- @function [parent=#TextureFrame] setTextureName
-- @param self
-- @param #string str
--------------------------------
-- @function [parent=#TextureFrame] create
-- @param self
-- @return TextureFrame#TextureFrame ret (return value: ccs.TextureFrame)
--------------------------------
-- @function [parent=#TextureFrame] clone
-- @param self
-- @return Frame#Frame ret (return value: ccs.Frame)
--------------------------------
-- @function [parent=#TextureFrame] TextureFrame
-- @param self
return nil

View File

@ -0,0 +1,82 @@
--------------------------------
-- @module Timeline
-- @extend Ref
-- @parent_module ccs
--------------------------------
-- @function [parent=#Timeline] clone
-- @param self
-- @return Timeline#Timeline ret (return value: ccs.Timeline)
--------------------------------
-- @function [parent=#Timeline] gotoFrame
-- @param self
-- @param #int int
--------------------------------
-- @function [parent=#Timeline] setNode
-- @param self
-- @param #cc.Node node
--------------------------------
-- @function [parent=#Timeline] getActionTimeline
-- @param self
-- @return ActionTimeline#ActionTimeline ret (return value: ccs.ActionTimeline)
--------------------------------
-- @function [parent=#Timeline] insertFrame
-- @param self
-- @param #ccs.Frame frame
-- @param #int int
--------------------------------
-- @function [parent=#Timeline] setActionTag
-- @param self
-- @param #int int
--------------------------------
-- @function [parent=#Timeline] addFrame
-- @param self
-- @param #ccs.Frame frame
--------------------------------
-- @function [parent=#Timeline] getFrames
-- @param self
-- @return array_table#array_table ret (return value: array_table)
--------------------------------
-- @function [parent=#Timeline] getActionTag
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- @function [parent=#Timeline] getNode
-- @param self
-- @return Node#Node ret (return value: cc.Node)
--------------------------------
-- @function [parent=#Timeline] removeFrame
-- @param self
-- @param #ccs.Frame frame
--------------------------------
-- @function [parent=#Timeline] setActionTimeline
-- @param self
-- @param #ccs.ActionTimeline actiontimeline
--------------------------------
-- @function [parent=#Timeline] stepToFrame
-- @param self
-- @param #int int
--------------------------------
-- @function [parent=#Timeline] create
-- @param self
-- @return Timeline#Timeline ret (return value: ccs.Timeline)
--------------------------------
-- @function [parent=#Timeline] Timeline
-- @param self
return nil

View File

@ -0,0 +1,31 @@
--------------------------------
-- @module VisibleFrame
-- @extend Frame
-- @parent_module ccs
--------------------------------
-- @function [parent=#VisibleFrame] isVisible
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- @function [parent=#VisibleFrame] setVisible
-- @param self
-- @param #bool bool
--------------------------------
-- @function [parent=#VisibleFrame] create
-- @param self
-- @return VisibleFrame#VisibleFrame ret (return value: ccs.VisibleFrame)
--------------------------------
-- @function [parent=#VisibleFrame] clone
-- @param self
-- @return Frame#Frame ret (return value: ccs.Frame)
--------------------------------
-- @function [parent=#VisibleFrame] VisibleFrame
-- @param self
return nil

View File

@ -0,0 +1,31 @@
--------------------------------
-- @module ZOrderFrame
-- @extend Frame
-- @parent_module ccs
--------------------------------
-- @function [parent=#ZOrderFrame] getZOrder
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
-- @function [parent=#ZOrderFrame] setZOrder
-- @param self
-- @param #int int
--------------------------------
-- @function [parent=#ZOrderFrame] create
-- @param self
-- @return ZOrderFrame#ZOrderFrame ret (return value: ccs.ZOrderFrame)
--------------------------------
-- @function [parent=#ZOrderFrame] clone
-- @param self
-- @return Frame#Frame ret (return value: ccs.Frame)
--------------------------------
-- @function [parent=#ZOrderFrame] ZOrderFrame
-- @param self
return nil

View File

@ -1,6 +1,36 @@
--------------------------------
-- @module ccs
--------------------------------------------------------
-- the ccs ActionFrame
-- @field [parent=#ccs] ActionFrame#ActionFrame ActionFrame preloaded module
--------------------------------------------------------
-- the ccs ActionMoveFrame
-- @field [parent=#ccs] ActionMoveFrame#ActionMoveFrame ActionMoveFrame preloaded module
--------------------------------------------------------
-- the ccs ActionScaleFrame
-- @field [parent=#ccs] ActionScaleFrame#ActionScaleFrame ActionScaleFrame preloaded module
--------------------------------------------------------
-- the ccs ActionRotationFrame
-- @field [parent=#ccs] ActionRotationFrame#ActionRotationFrame ActionRotationFrame preloaded module
--------------------------------------------------------
-- the ccs ActionFadeFrame
-- @field [parent=#ccs] ActionFadeFrame#ActionFadeFrame ActionFadeFrame preloaded module
--------------------------------------------------------
-- the ccs ActionTintFrame
-- @field [parent=#ccs] ActionTintFrame#ActionTintFrame ActionTintFrame preloaded module
--------------------------------------------------------
-- the ccs ActionObject
-- @field [parent=#ccs] ActionObject#ActionObject ActionObject preloaded module
@ -146,9 +176,94 @@
-- @field [parent=#ccs] SceneReader#SceneReader SceneReader preloaded module
--------------------------------------------------------
-- the ccs NodeReader
-- @field [parent=#ccs] NodeReader#NodeReader NodeReader preloaded module
--------------------------------------------------------
-- the ccs ActionTimelineCache
-- @field [parent=#ccs] ActionTimelineCache#ActionTimelineCache ActionTimelineCache preloaded module
--------------------------------------------------------
-- the ccs Frame
-- @field [parent=#ccs] Frame#Frame Frame preloaded module
--------------------------------------------------------
-- the ccs VisibleFrame
-- @field [parent=#ccs] VisibleFrame#VisibleFrame VisibleFrame preloaded module
--------------------------------------------------------
-- the ccs TextureFrame
-- @field [parent=#ccs] TextureFrame#TextureFrame TextureFrame preloaded module
--------------------------------------------------------
-- the ccs RotationFrame
-- @field [parent=#ccs] RotationFrame#RotationFrame RotationFrame preloaded module
--------------------------------------------------------
-- the ccs SkewFrame
-- @field [parent=#ccs] SkewFrame#SkewFrame SkewFrame preloaded module
--------------------------------------------------------
-- the ccs RotationSkewFrame
-- @field [parent=#ccs] RotationSkewFrame#RotationSkewFrame RotationSkewFrame preloaded module
--------------------------------------------------------
-- the ccs PositionFrame
-- @field [parent=#ccs] PositionFrame#PositionFrame PositionFrame preloaded module
--------------------------------------------------------
-- the ccs ScaleFrame
-- @field [parent=#ccs] ScaleFrame#ScaleFrame ScaleFrame preloaded module
--------------------------------------------------------
-- the ccs AnchorPointFrame
-- @field [parent=#ccs] AnchorPointFrame#AnchorPointFrame AnchorPointFrame preloaded module
--------------------------------------------------------
-- the ccs InnerActionFrame
-- @field [parent=#ccs] InnerActionFrame#InnerActionFrame InnerActionFrame preloaded module
--------------------------------------------------------
-- the ccs ColorFrame
-- @field [parent=#ccs] ColorFrame#ColorFrame ColorFrame preloaded module
--------------------------------------------------------
-- the ccs EventFrame
-- @field [parent=#ccs] EventFrame#EventFrame EventFrame preloaded module
--------------------------------------------------------
-- the ccs ZOrderFrame
-- @field [parent=#ccs] ZOrderFrame#ZOrderFrame ZOrderFrame preloaded module
--------------------------------------------------------
-- the ccs Timeline
-- @field [parent=#ccs] Timeline#Timeline Timeline preloaded module
--------------------------------------------------------
-- the ccs ActionTimelineData
-- @field [parent=#ccs] ActionTimelineData#ActionTimelineData ActionTimelineData preloaded module
--------------------------------------------------------
-- the ccs ActionTimeline
-- @field [parent=#ccs] ActionTimeline#ActionTimeline ActionTimeline preloaded module
return nil

File diff suppressed because it is too large Load Diff

View File

@ -1312,7 +1312,7 @@ static int lua_cocos2dx_extension_Scale9Sprite_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_extension_Scale9Sprite(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.Scale9Sprite");
tolua_cclass(tolua_S,"Scale9Sprite","cc.Scale9Sprite","cc.Node",nullptr);
tolua_cclass(tolua_S,"Scale9Sprite","cc.Scale9Sprite","cc.Node",nullptr);
tolua_beginmodule(tolua_S,"Scale9Sprite");
tolua_function(tolua_S,"new",lua_cocos2dx_extension_Scale9Sprite_constructor);
@ -2125,7 +2125,7 @@ static int lua_cocos2dx_extension_Control_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_extension_Control(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.Control");
tolua_cclass(tolua_S,"Control","cc.Control","cc.Layer",nullptr);
tolua_cclass(tolua_S,"Control","cc.Control","cc.Layer",nullptr);
tolua_beginmodule(tolua_S,"Control");
tolua_function(tolua_S,"setEnabled",lua_cocos2dx_extension_Control_setEnabled);
@ -4045,7 +4045,7 @@ static int lua_cocos2dx_extension_ControlButton_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_extension_ControlButton(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.ControlButton");
tolua_cclass(tolua_S,"ControlButton","cc.ControlButton","cc.Control",nullptr);
tolua_cclass(tolua_S,"ControlButton","cc.ControlButton","cc.Control",nullptr);
tolua_beginmodule(tolua_S,"ControlButton");
tolua_function(tolua_S,"isPushed",lua_cocos2dx_extension_ControlButton_isPushed);
@ -4673,7 +4673,7 @@ static int lua_cocos2dx_extension_ControlHuePicker_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_extension_ControlHuePicker(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.ControlHuePicker");
tolua_cclass(tolua_S,"ControlHuePicker","cc.ControlHuePicker","cc.Control",nullptr);
tolua_cclass(tolua_S,"ControlHuePicker","cc.ControlHuePicker","cc.Control",nullptr);
tolua_beginmodule(tolua_S,"ControlHuePicker");
tolua_function(tolua_S,"new",lua_cocos2dx_extension_ControlHuePicker_constructor);
@ -5178,7 +5178,7 @@ static int lua_cocos2dx_extension_ControlSaturationBrightnessPicker_finalize(lua
int lua_register_cocos2dx_extension_ControlSaturationBrightnessPicker(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.ControlSaturationBrightnessPicker");
tolua_cclass(tolua_S,"ControlSaturationBrightnessPicker","cc.ControlSaturationBrightnessPicker","cc.Control",nullptr);
tolua_cclass(tolua_S,"ControlSaturationBrightnessPicker","cc.ControlSaturationBrightnessPicker","cc.Control",nullptr);
tolua_beginmodule(tolua_S,"ControlSaturationBrightnessPicker");
tolua_function(tolua_S,"new",lua_cocos2dx_extension_ControlSaturationBrightnessPicker_constructor);
@ -5777,7 +5777,7 @@ static int lua_cocos2dx_extension_ControlColourPicker_finalize(lua_State* tolua_
int lua_register_cocos2dx_extension_ControlColourPicker(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.ControlColourPicker");
tolua_cclass(tolua_S,"ControlColourPicker","cc.ControlColourPicker","cc.Control",nullptr);
tolua_cclass(tolua_S,"ControlColourPicker","cc.ControlColourPicker","cc.Control",nullptr);
tolua_beginmodule(tolua_S,"ControlColourPicker");
tolua_function(tolua_S,"new",lua_cocos2dx_extension_ControlColourPicker_constructor);
@ -6717,7 +6717,7 @@ static int lua_cocos2dx_extension_ControlPotentiometer_finalize(lua_State* tolua
int lua_register_cocos2dx_extension_ControlPotentiometer(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.ControlPotentiometer");
tolua_cclass(tolua_S,"ControlPotentiometer","cc.ControlPotentiometer","cc.Control",nullptr);
tolua_cclass(tolua_S,"ControlPotentiometer","cc.ControlPotentiometer","cc.Control",nullptr);
tolua_beginmodule(tolua_S,"ControlPotentiometer");
tolua_function(tolua_S,"new",lua_cocos2dx_extension_ControlPotentiometer_constructor);
@ -7962,7 +7962,7 @@ static int lua_cocos2dx_extension_ControlSlider_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_extension_ControlSlider(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.ControlSlider");
tolua_cclass(tolua_S,"ControlSlider","cc.ControlSlider","cc.Control",nullptr);
tolua_cclass(tolua_S,"ControlSlider","cc.ControlSlider","cc.Control",nullptr);
tolua_beginmodule(tolua_S,"ControlSlider");
tolua_function(tolua_S,"new",lua_cocos2dx_extension_ControlSlider_constructor);
@ -9030,7 +9030,7 @@ static int lua_cocos2dx_extension_ControlStepper_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_extension_ControlStepper(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.ControlStepper");
tolua_cclass(tolua_S,"ControlStepper","cc.ControlStepper","cc.Control",nullptr);
tolua_cclass(tolua_S,"ControlStepper","cc.ControlStepper","cc.Control",nullptr);
tolua_beginmodule(tolua_S,"ControlStepper");
tolua_function(tolua_S,"new",lua_cocos2dx_extension_ControlStepper_constructor);
@ -9503,7 +9503,7 @@ static int lua_cocos2dx_extension_ControlSwitch_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_extension_ControlSwitch(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.ControlSwitch");
tolua_cclass(tolua_S,"ControlSwitch","cc.ControlSwitch","cc.Control",nullptr);
tolua_cclass(tolua_S,"ControlSwitch","cc.ControlSwitch","cc.Control",nullptr);
tolua_beginmodule(tolua_S,"ControlSwitch");
tolua_function(tolua_S,"new",lua_cocos2dx_extension_ControlSwitch_constructor);
@ -11176,7 +11176,7 @@ static int lua_cocos2dx_extension_ScrollView_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_extension_ScrollView(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.ScrollView");
tolua_cclass(tolua_S,"ScrollView","cc.ScrollView","cc.Layer",nullptr);
tolua_cclass(tolua_S,"ScrollView","cc.ScrollView","cc.Layer",nullptr);
tolua_beginmodule(tolua_S,"ScrollView");
tolua_function(tolua_S,"new",lua_cocos2dx_extension_ScrollView_constructor);
@ -11428,7 +11428,7 @@ static int lua_cocos2dx_extension_TableViewCell_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_extension_TableViewCell(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.TableViewCell");
tolua_cclass(tolua_S,"TableViewCell","cc.TableViewCell","cc.Node",nullptr);
tolua_cclass(tolua_S,"TableViewCell","cc.TableViewCell","cc.Node",nullptr);
tolua_beginmodule(tolua_S,"TableViewCell");
tolua_function(tolua_S,"new",lua_cocos2dx_extension_TableViewCell_constructor);
@ -12044,7 +12044,7 @@ static int lua_cocos2dx_extension_TableView_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_extension_TableView(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.TableView");
tolua_cclass(tolua_S,"TableView","cc.TableView","cc.ScrollView",nullptr);
tolua_cclass(tolua_S,"TableView","cc.TableView","cc.ScrollView",nullptr);
tolua_beginmodule(tolua_S,"TableView");
tolua_function(tolua_S,"new",lua_cocos2dx_extension_TableView_constructor);
@ -13007,7 +13007,7 @@ static int lua_cocos2dx_extension_EditBox_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_extension_EditBox(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.EditBox");
tolua_cclass(tolua_S,"EditBox","cc.EditBox","cc.ControlButton",nullptr);
tolua_cclass(tolua_S,"EditBox","cc.EditBox","cc.ControlButton",nullptr);
tolua_beginmodule(tolua_S,"EditBox");
tolua_function(tolua_S,"new",lua_cocos2dx_extension_EditBox_constructor);
@ -13720,7 +13720,7 @@ static int lua_cocos2dx_extension_AssetsManager_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_extension_AssetsManager(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.AssetsManager");
tolua_cclass(tolua_S,"AssetsManager","cc.AssetsManager","cc.Node",nullptr);
tolua_cclass(tolua_S,"AssetsManager","cc.AssetsManager","cc.Node",nullptr);
tolua_beginmodule(tolua_S,"AssetsManager");
tolua_function(tolua_S,"new",lua_cocos2dx_extension_AssetsManager_constructor);
@ -15438,7 +15438,7 @@ static int lua_cocos2dx_extension_CCBAnimationManager_finalize(lua_State* tolua_
int lua_register_cocos2dx_extension_CCBAnimationManager(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.CCBAnimationManager");
tolua_cclass(tolua_S,"CCBAnimationManager","cc.CCBAnimationManager","cc.Ref",nullptr);
tolua_cclass(tolua_S,"CCBAnimationManager","cc.CCBAnimationManager","cc.Ref",nullptr);
tolua_beginmodule(tolua_S,"CCBAnimationManager");
tolua_function(tolua_S,"new",lua_cocos2dx_extension_CCBAnimationManager_constructor);
@ -16466,7 +16466,7 @@ static int lua_cocos2dx_extension_CCBReader_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_extension_CCBReader(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.CCBReader");
tolua_cclass(tolua_S,"CCBReader","cc.CCBReader","cc.Ref",nullptr);
tolua_cclass(tolua_S,"CCBReader","cc.CCBReader","cc.Ref",nullptr);
tolua_beginmodule(tolua_S,"CCBReader");
tolua_function(tolua_S,"new",lua_cocos2dx_extension_CCBReader_constructor);

View File

@ -2169,7 +2169,7 @@ static int lua_cocos2dx_physics_PhysicsShape_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_physics_PhysicsShape(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsShape");
tolua_cclass(tolua_S,"PhysicsShape","cc.PhysicsShape","cc.Ref",nullptr);
tolua_cclass(tolua_S,"PhysicsShape","cc.PhysicsShape","cc.Ref",nullptr);
tolua_beginmodule(tolua_S,"PhysicsShape");
tolua_function(tolua_S,"getFriction",lua_cocos2dx_physics_PhysicsShape_getFriction);
@ -2402,7 +2402,7 @@ static int lua_cocos2dx_physics_PhysicsShapeCircle_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_physics_PhysicsShapeCircle(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsShapeCircle");
tolua_cclass(tolua_S,"PhysicsShapeCircle","cc.PhysicsShapeCircle","cc.PhysicsShape",nullptr);
tolua_cclass(tolua_S,"PhysicsShapeCircle","cc.PhysicsShapeCircle","cc.PhysicsShape",nullptr);
tolua_beginmodule(tolua_S,"PhysicsShapeCircle");
tolua_function(tolua_S,"getRadius",lua_cocos2dx_physics_PhysicsShapeCircle_getRadius);
@ -2654,7 +2654,7 @@ static int lua_cocos2dx_physics_PhysicsShapeBox_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_physics_PhysicsShapeBox(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsShapeBox");
tolua_cclass(tolua_S,"PhysicsShapeBox","cc.PhysicsShapeBox","cc.PhysicsShape",nullptr);
tolua_cclass(tolua_S,"PhysicsShapeBox","cc.PhysicsShapeBox","cc.PhysicsShape",nullptr);
tolua_beginmodule(tolua_S,"PhysicsShapeBox");
tolua_function(tolua_S,"getPointsCount",lua_cocos2dx_physics_PhysicsShapeBox_getPointsCount);
@ -2769,7 +2769,7 @@ static int lua_cocos2dx_physics_PhysicsShapePolygon_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_physics_PhysicsShapePolygon(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsShapePolygon");
tolua_cclass(tolua_S,"PhysicsShapePolygon","cc.PhysicsShapePolygon","cc.PhysicsShape",nullptr);
tolua_cclass(tolua_S,"PhysicsShapePolygon","cc.PhysicsShapePolygon","cc.PhysicsShape",nullptr);
tolua_beginmodule(tolua_S,"PhysicsShapePolygon");
tolua_function(tolua_S,"getPointsCount",lua_cocos2dx_physics_PhysicsShapePolygon_getPointsCount);
@ -2943,7 +2943,7 @@ static int lua_cocos2dx_physics_PhysicsShapeEdgeSegment_finalize(lua_State* tolu
int lua_register_cocos2dx_physics_PhysicsShapeEdgeSegment(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsShapeEdgeSegment");
tolua_cclass(tolua_S,"PhysicsShapeEdgeSegment","cc.PhysicsShapeEdgeSegment","cc.PhysicsShape",nullptr);
tolua_cclass(tolua_S,"PhysicsShapeEdgeSegment","cc.PhysicsShapeEdgeSegment","cc.PhysicsShape",nullptr);
tolua_beginmodule(tolua_S,"PhysicsShapeEdgeSegment");
tolua_function(tolua_S,"getPointB",lua_cocos2dx_physics_PhysicsShapeEdgeSegment_getPointB);
@ -3084,7 +3084,7 @@ static int lua_cocos2dx_physics_PhysicsShapeEdgeBox_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_physics_PhysicsShapeEdgeBox(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsShapeEdgeBox");
tolua_cclass(tolua_S,"PhysicsShapeEdgeBox","cc.PhysicsShapeEdgeBox","cc.PhysicsShape",nullptr);
tolua_cclass(tolua_S,"PhysicsShapeEdgeBox","cc.PhysicsShapeEdgeBox","cc.PhysicsShape",nullptr);
tolua_beginmodule(tolua_S,"PhysicsShapeEdgeBox");
tolua_function(tolua_S,"getPointsCount",lua_cocos2dx_physics_PhysicsShapeEdgeBox_getPointsCount);
@ -3149,7 +3149,7 @@ static int lua_cocos2dx_physics_PhysicsShapeEdgePolygon_finalize(lua_State* tolu
int lua_register_cocos2dx_physics_PhysicsShapeEdgePolygon(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsShapeEdgePolygon");
tolua_cclass(tolua_S,"PhysicsShapeEdgePolygon","cc.PhysicsShapeEdgePolygon","cc.PhysicsShape",nullptr);
tolua_cclass(tolua_S,"PhysicsShapeEdgePolygon","cc.PhysicsShapeEdgePolygon","cc.PhysicsShape",nullptr);
tolua_beginmodule(tolua_S,"PhysicsShapeEdgePolygon");
tolua_function(tolua_S,"getPointsCount",lua_cocos2dx_physics_PhysicsShapeEdgePolygon_getPointsCount);
@ -3213,7 +3213,7 @@ static int lua_cocos2dx_physics_PhysicsShapeEdgeChain_finalize(lua_State* tolua_
int lua_register_cocos2dx_physics_PhysicsShapeEdgeChain(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsShapeEdgeChain");
tolua_cclass(tolua_S,"PhysicsShapeEdgeChain","cc.PhysicsShapeEdgeChain","cc.PhysicsShape",nullptr);
tolua_cclass(tolua_S,"PhysicsShapeEdgeChain","cc.PhysicsShapeEdgeChain","cc.PhysicsShape",nullptr);
tolua_beginmodule(tolua_S,"PhysicsShapeEdgeChain");
tolua_function(tolua_S,"getPointsCount",lua_cocos2dx_physics_PhysicsShapeEdgeChain_getPointsCount);
@ -6386,7 +6386,7 @@ static int lua_cocos2dx_physics_PhysicsBody_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_physics_PhysicsBody(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsBody");
tolua_cclass(tolua_S,"PhysicsBody","cc.PhysicsBody","cc.Ref",nullptr);
tolua_cclass(tolua_S,"PhysicsBody","cc.PhysicsBody","cc.Ref",nullptr);
tolua_beginmodule(tolua_S,"PhysicsBody");
tolua_function(tolua_S,"isGravityEnabled",lua_cocos2dx_physics_PhysicsBody_isGravityEnabled);
@ -6691,7 +6691,7 @@ static int lua_cocos2dx_physics_PhysicsContact_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_physics_PhysicsContact(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsContact");
tolua_cclass(tolua_S,"PhysicsContact","cc.PhysicsContact","cc.EventCustom",nullptr);
tolua_cclass(tolua_S,"PhysicsContact","cc.PhysicsContact","cc.EventCustom",nullptr);
tolua_beginmodule(tolua_S,"PhysicsContact");
tolua_function(tolua_S,"getContactData",lua_cocos2dx_physics_PhysicsContact_getContactData);
@ -7239,7 +7239,7 @@ static int lua_cocos2dx_physics_EventListenerPhysicsContact_finalize(lua_State*
int lua_register_cocos2dx_physics_EventListenerPhysicsContact(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.EventListenerPhysicsContact");
tolua_cclass(tolua_S,"EventListenerPhysicsContact","cc.EventListenerPhysicsContact","cc.EventListenerCustom",nullptr);
tolua_cclass(tolua_S,"EventListenerPhysicsContact","cc.EventListenerPhysicsContact","cc.EventListenerCustom",nullptr);
tolua_beginmodule(tolua_S,"EventListenerPhysicsContact");
tolua_function(tolua_S,"create", lua_cocos2dx_physics_EventListenerPhysicsContact_create);
@ -7344,7 +7344,7 @@ static int lua_cocos2dx_physics_EventListenerPhysicsContactWithBodies_finalize(l
int lua_register_cocos2dx_physics_EventListenerPhysicsContactWithBodies(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.EventListenerPhysicsContactWithBodies");
tolua_cclass(tolua_S,"EventListenerPhysicsContactWithBodies","cc.EventListenerPhysicsContactWithBodies","cc.EventListenerPhysicsContact",nullptr);
tolua_cclass(tolua_S,"EventListenerPhysicsContactWithBodies","cc.EventListenerPhysicsContactWithBodies","cc.EventListenerPhysicsContact",nullptr);
tolua_beginmodule(tolua_S,"EventListenerPhysicsContactWithBodies");
tolua_function(tolua_S,"hitTest",lua_cocos2dx_physics_EventListenerPhysicsContactWithBodies_hitTest);
@ -7450,7 +7450,7 @@ static int lua_cocos2dx_physics_EventListenerPhysicsContactWithShapes_finalize(l
int lua_register_cocos2dx_physics_EventListenerPhysicsContactWithShapes(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.EventListenerPhysicsContactWithShapes");
tolua_cclass(tolua_S,"EventListenerPhysicsContactWithShapes","cc.EventListenerPhysicsContactWithShapes","cc.EventListenerPhysicsContact",nullptr);
tolua_cclass(tolua_S,"EventListenerPhysicsContactWithShapes","cc.EventListenerPhysicsContactWithShapes","cc.EventListenerPhysicsContact",nullptr);
tolua_beginmodule(tolua_S,"EventListenerPhysicsContactWithShapes");
tolua_function(tolua_S,"hitTest",lua_cocos2dx_physics_EventListenerPhysicsContactWithShapes_hitTest);
@ -7554,7 +7554,7 @@ static int lua_cocos2dx_physics_EventListenerPhysicsContactWithGroup_finalize(lu
int lua_register_cocos2dx_physics_EventListenerPhysicsContactWithGroup(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.EventListenerPhysicsContactWithGroup");
tolua_cclass(tolua_S,"EventListenerPhysicsContactWithGroup","cc.EventListenerPhysicsContactWithGroup","cc.EventListenerPhysicsContact",nullptr);
tolua_cclass(tolua_S,"EventListenerPhysicsContactWithGroup","cc.EventListenerPhysicsContactWithGroup","cc.EventListenerPhysicsContact",nullptr);
tolua_beginmodule(tolua_S,"EventListenerPhysicsContactWithGroup");
tolua_function(tolua_S,"hitTest",lua_cocos2dx_physics_EventListenerPhysicsContactWithGroup_hitTest);
@ -8211,7 +8211,7 @@ static int lua_cocos2dx_physics_PhysicsJointFixed_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_physics_PhysicsJointFixed(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsJointFixed");
tolua_cclass(tolua_S,"PhysicsJointFixed","cc.PhysicsJointFixed","cc.PhysicsJoint",nullptr);
tolua_cclass(tolua_S,"PhysicsJointFixed","cc.PhysicsJointFixed","cc.PhysicsJoint",nullptr);
tolua_beginmodule(tolua_S,"PhysicsJointFixed");
tolua_function(tolua_S,"construct", lua_cocos2dx_physics_PhysicsJointFixed_construct);
@ -8663,7 +8663,7 @@ static int lua_cocos2dx_physics_PhysicsJointLimit_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_physics_PhysicsJointLimit(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsJointLimit");
tolua_cclass(tolua_S,"PhysicsJointLimit","cc.PhysicsJointLimit","cc.PhysicsJoint",nullptr);
tolua_cclass(tolua_S,"PhysicsJointLimit","cc.PhysicsJointLimit","cc.PhysicsJoint",nullptr);
tolua_beginmodule(tolua_S,"PhysicsJointLimit");
tolua_function(tolua_S,"setAnchr2",lua_cocos2dx_physics_PhysicsJointLimit_setAnchr2);
@ -8728,7 +8728,7 @@ static int lua_cocos2dx_physics_PhysicsJointPin_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_physics_PhysicsJointPin(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsJointPin");
tolua_cclass(tolua_S,"PhysicsJointPin","cc.PhysicsJointPin","cc.PhysicsJoint",nullptr);
tolua_cclass(tolua_S,"PhysicsJointPin","cc.PhysicsJointPin","cc.PhysicsJoint",nullptr);
tolua_beginmodule(tolua_S,"PhysicsJointPin");
tolua_function(tolua_S,"construct", lua_cocos2dx_physics_PhysicsJointPin_construct);
@ -8877,7 +8877,7 @@ static int lua_cocos2dx_physics_PhysicsJointDistance_finalize(lua_State* tolua_S
int lua_register_cocos2dx_physics_PhysicsJointDistance(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsJointDistance");
tolua_cclass(tolua_S,"PhysicsJointDistance","cc.PhysicsJointDistance","cc.PhysicsJoint",nullptr);
tolua_cclass(tolua_S,"PhysicsJointDistance","cc.PhysicsJointDistance","cc.PhysicsJoint",nullptr);
tolua_beginmodule(tolua_S,"PhysicsJointDistance");
tolua_function(tolua_S,"setDistance",lua_cocos2dx_physics_PhysicsJointDistance_setDistance);
@ -9392,7 +9392,7 @@ static int lua_cocos2dx_physics_PhysicsJointSpring_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_physics_PhysicsJointSpring(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsJointSpring");
tolua_cclass(tolua_S,"PhysicsJointSpring","cc.PhysicsJointSpring","cc.PhysicsJoint",nullptr);
tolua_cclass(tolua_S,"PhysicsJointSpring","cc.PhysicsJointSpring","cc.PhysicsJoint",nullptr);
tolua_beginmodule(tolua_S,"PhysicsJointSpring");
tolua_function(tolua_S,"setAnchr2",lua_cocos2dx_physics_PhysicsJointSpring_setAnchr2);
@ -9733,7 +9733,7 @@ static int lua_cocos2dx_physics_PhysicsJointGroove_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_physics_PhysicsJointGroove(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsJointGroove");
tolua_cclass(tolua_S,"PhysicsJointGroove","cc.PhysicsJointGroove","cc.PhysicsJoint",nullptr);
tolua_cclass(tolua_S,"PhysicsJointGroove","cc.PhysicsJointGroove","cc.PhysicsJoint",nullptr);
tolua_beginmodule(tolua_S,"PhysicsJointGroove");
tolua_function(tolua_S,"setAnchr2",lua_cocos2dx_physics_PhysicsJointGroove_setAnchr2);
@ -10068,7 +10068,7 @@ static int lua_cocos2dx_physics_PhysicsJointRotarySpring_finalize(lua_State* tol
int lua_register_cocos2dx_physics_PhysicsJointRotarySpring(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsJointRotarySpring");
tolua_cclass(tolua_S,"PhysicsJointRotarySpring","cc.PhysicsJointRotarySpring","cc.PhysicsJoint",nullptr);
tolua_cclass(tolua_S,"PhysicsJointRotarySpring","cc.PhysicsJointRotarySpring","cc.PhysicsJoint",nullptr);
tolua_beginmodule(tolua_S,"PhysicsJointRotarySpring");
tolua_function(tolua_S,"getDamping",lua_cocos2dx_physics_PhysicsJointRotarySpring_getDamping);
@ -10334,7 +10334,7 @@ static int lua_cocos2dx_physics_PhysicsJointRotaryLimit_finalize(lua_State* tolu
int lua_register_cocos2dx_physics_PhysicsJointRotaryLimit(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsJointRotaryLimit");
tolua_cclass(tolua_S,"PhysicsJointRotaryLimit","cc.PhysicsJointRotaryLimit","cc.PhysicsJoint",nullptr);
tolua_cclass(tolua_S,"PhysicsJointRotaryLimit","cc.PhysicsJointRotaryLimit","cc.PhysicsJoint",nullptr);
tolua_beginmodule(tolua_S,"PhysicsJointRotaryLimit");
tolua_function(tolua_S,"getMax",lua_cocos2dx_physics_PhysicsJointRotaryLimit_getMax);
@ -10667,7 +10667,7 @@ static int lua_cocos2dx_physics_PhysicsJointRatchet_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_physics_PhysicsJointRatchet(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsJointRatchet");
tolua_cclass(tolua_S,"PhysicsJointRatchet","cc.PhysicsJointRatchet","cc.PhysicsJoint",nullptr);
tolua_cclass(tolua_S,"PhysicsJointRatchet","cc.PhysicsJointRatchet","cc.PhysicsJoint",nullptr);
tolua_beginmodule(tolua_S,"PhysicsJointRatchet");
tolua_function(tolua_S,"getAngle",lua_cocos2dx_physics_PhysicsJointRatchet_getAngle);
@ -10912,7 +10912,7 @@ static int lua_cocos2dx_physics_PhysicsJointGear_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_physics_PhysicsJointGear(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsJointGear");
tolua_cclass(tolua_S,"PhysicsJointGear","cc.PhysicsJointGear","cc.PhysicsJoint",nullptr);
tolua_cclass(tolua_S,"PhysicsJointGear","cc.PhysicsJointGear","cc.PhysicsJoint",nullptr);
tolua_beginmodule(tolua_S,"PhysicsJointGear");
tolua_function(tolua_S,"setRatio",lua_cocos2dx_physics_PhysicsJointGear_setRatio);
@ -11063,7 +11063,7 @@ static int lua_cocos2dx_physics_PhysicsJointMotor_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_physics_PhysicsJointMotor(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"cc.PhysicsJointMotor");
tolua_cclass(tolua_S,"PhysicsJointMotor","cc.PhysicsJointMotor","cc.PhysicsJoint",nullptr);
tolua_cclass(tolua_S,"PhysicsJointMotor","cc.PhysicsJointMotor","cc.PhysicsJoint",nullptr);
tolua_beginmodule(tolua_S,"PhysicsJointMotor");
tolua_function(tolua_S,"setRate",lua_cocos2dx_physics_PhysicsJointMotor_setRate);

View File

@ -329,7 +329,7 @@ static int lua_cocos2dx_spine_Skeleton_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_spine_Skeleton(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"sp.Skeleton");
tolua_cclass(tolua_S,"Skeleton","sp.Skeleton","cc.Node",nullptr);
tolua_cclass(tolua_S,"Skeleton","sp.Skeleton","cc.Node",nullptr);
tolua_beginmodule(tolua_S,"Skeleton");
tolua_function(tolua_S,"setToSetupPose",lua_cocos2dx_spine_Skeleton_setToSetupPose);
@ -558,7 +558,7 @@ static int lua_cocos2dx_spine_SkeletonAnimation_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_spine_SkeletonAnimation(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"sp.SkeletonAnimation");
tolua_cclass(tolua_S,"SkeletonAnimation","sp.SkeletonAnimation","sp.Skeleton",nullptr);
tolua_cclass(tolua_S,"SkeletonAnimation","sp.SkeletonAnimation","sp.Skeleton",nullptr);
tolua_beginmodule(tolua_S,"SkeletonAnimation");
tolua_function(tolua_S,"setMix",lua_cocos2dx_spine_SkeletonAnimation_setMix);

File diff suppressed because it is too large Load Diff

View File

@ -291,6 +291,185 @@ int register_all_cocos2dx_studio(lua_State* tolua_S);

View File

@ -257,7 +257,7 @@ static int lua_cocos2dx_ui_LayoutParameter_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_LayoutParameter(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.LayoutParameter");
tolua_cclass(tolua_S,"LayoutParameter","ccui.LayoutParameter","cc.Ref",nullptr);
tolua_cclass(tolua_S,"LayoutParameter","ccui.LayoutParameter","cc.Ref",nullptr);
tolua_beginmodule(tolua_S,"LayoutParameter");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_LayoutParameter_constructor);
@ -437,7 +437,7 @@ static int lua_cocos2dx_ui_LinearLayoutParameter_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_LinearLayoutParameter(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.LinearLayoutParameter");
tolua_cclass(tolua_S,"LinearLayoutParameter","ccui.LinearLayoutParameter","ccui.LayoutParameter",nullptr);
tolua_cclass(tolua_S,"LinearLayoutParameter","ccui.LinearLayoutParameter","ccui.LayoutParameter",nullptr);
tolua_beginmodule(tolua_S,"LinearLayoutParameter");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_LinearLayoutParameter_constructor);
@ -795,7 +795,7 @@ static int lua_cocos2dx_ui_RelativeLayoutParameter_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_RelativeLayoutParameter(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.RelativeLayoutParameter");
tolua_cclass(tolua_S,"RelativeLayoutParameter","ccui.RelativeLayoutParameter","ccui.LayoutParameter",nullptr);
tolua_cclass(tolua_S,"RelativeLayoutParameter","ccui.RelativeLayoutParameter","ccui.LayoutParameter",nullptr);
tolua_beginmodule(tolua_S,"RelativeLayoutParameter");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_RelativeLayoutParameter_constructor);
@ -3217,7 +3217,7 @@ static int lua_cocos2dx_ui_Widget_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_Widget(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.Widget");
tolua_cclass(tolua_S,"Widget","ccui.Widget","cc.ProtectedNode",nullptr);
tolua_cclass(tolua_S,"Widget","ccui.Widget","cc.ProtectedNode",nullptr);
tolua_beginmodule(tolua_S,"Widget");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_Widget_constructor);
@ -4844,7 +4844,7 @@ static int lua_cocos2dx_ui_Layout_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_Layout(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.Layout");
tolua_cclass(tolua_S,"Layout","ccui.Layout","ccui.Widget",nullptr);
tolua_cclass(tolua_S,"Layout","ccui.Layout","ccui.Widget",nullptr);
tolua_beginmodule(tolua_S,"Layout");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_Layout_constructor);
@ -6138,7 +6138,7 @@ static int lua_cocos2dx_ui_Button_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_Button(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.Button");
tolua_cclass(tolua_S,"Button","ccui.Button","ccui.Widget",nullptr);
tolua_cclass(tolua_S,"Button","ccui.Button","ccui.Widget",nullptr);
tolua_beginmodule(tolua_S,"Button");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_Button_constructor);
@ -6850,7 +6850,7 @@ static int lua_cocos2dx_ui_CheckBox_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_CheckBox(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.CheckBox");
tolua_cclass(tolua_S,"CheckBox","ccui.CheckBox","ccui.Widget",nullptr);
tolua_cclass(tolua_S,"CheckBox","ccui.CheckBox","ccui.Widget",nullptr);
tolua_beginmodule(tolua_S,"CheckBox");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_CheckBox_constructor);
@ -7292,7 +7292,7 @@ static int lua_cocos2dx_ui_ImageView_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_ImageView(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.ImageView");
tolua_cclass(tolua_S,"ImageView","ccui.ImageView","ccui.Widget",nullptr);
tolua_cclass(tolua_S,"ImageView","ccui.ImageView","ccui.Widget",nullptr);
tolua_beginmodule(tolua_S,"ImageView");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_ImageView_constructor);
@ -8384,7 +8384,7 @@ static int lua_cocos2dx_ui_Text_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_Text(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.Text");
tolua_cclass(tolua_S,"Text","ccui.Text","ccui.Widget",nullptr);
tolua_cclass(tolua_S,"Text","ccui.Text","ccui.Widget",nullptr);
tolua_beginmodule(tolua_S,"Text");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_Text_constructor);
@ -8783,7 +8783,7 @@ static int lua_cocos2dx_ui_TextAtlas_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_TextAtlas(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.TextAtlas");
tolua_cclass(tolua_S,"TextAtlas","ccui.TextAtlas","ccui.Widget",nullptr);
tolua_cclass(tolua_S,"TextAtlas","ccui.TextAtlas","ccui.Widget",nullptr);
tolua_beginmodule(tolua_S,"TextAtlas");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_TextAtlas_constructor);
@ -9355,7 +9355,7 @@ static int lua_cocos2dx_ui_LoadingBar_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_LoadingBar(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.LoadingBar");
tolua_cclass(tolua_S,"LoadingBar","ccui.LoadingBar","ccui.Widget",nullptr);
tolua_cclass(tolua_S,"LoadingBar","ccui.LoadingBar","ccui.Widget",nullptr);
tolua_beginmodule(tolua_S,"LoadingBar");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_LoadingBar_constructor);
@ -10966,7 +10966,7 @@ static int lua_cocos2dx_ui_ScrollView_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_ScrollView(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.ScrollView");
tolua_cclass(tolua_S,"ScrollView","ccui.ScrollView","ccui.Layout",nullptr);
tolua_cclass(tolua_S,"ScrollView","ccui.ScrollView","ccui.Layout",nullptr);
tolua_beginmodule(tolua_S,"ScrollView");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_ScrollView_constructor);
@ -11975,7 +11975,7 @@ static int lua_cocos2dx_ui_ListView_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_ListView(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.ListView");
tolua_cclass(tolua_S,"ListView","ccui.ListView","ccui.ScrollView",nullptr);
tolua_cclass(tolua_S,"ListView","ccui.ListView","ccui.ScrollView",nullptr);
tolua_beginmodule(tolua_S,"ListView");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_ListView_constructor);
@ -12934,7 +12934,7 @@ static int lua_cocos2dx_ui_Slider_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_Slider(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.Slider");
tolua_cclass(tolua_S,"Slider","ccui.Slider","ccui.Widget",nullptr);
tolua_cclass(tolua_S,"Slider","ccui.Slider","ccui.Widget",nullptr);
tolua_beginmodule(tolua_S,"Slider");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_Slider_constructor);
@ -14669,7 +14669,7 @@ static int lua_cocos2dx_ui_TextField_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_TextField(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.TextField");
tolua_cclass(tolua_S,"TextField","ccui.TextField","ccui.Widget",nullptr);
tolua_cclass(tolua_S,"TextField","ccui.TextField","ccui.Widget",nullptr);
tolua_beginmodule(tolua_S,"TextField");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_TextField_constructor);
@ -15019,7 +15019,7 @@ static int lua_cocos2dx_ui_TextBMFont_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_TextBMFont(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.TextBMFont");
tolua_cclass(tolua_S,"TextBMFont","ccui.TextBMFont","ccui.Widget",nullptr);
tolua_cclass(tolua_S,"TextBMFont","ccui.TextBMFont","ccui.Widget",nullptr);
tolua_beginmodule(tolua_S,"TextBMFont");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_TextBMFont_constructor);
@ -15654,7 +15654,7 @@ static int lua_cocos2dx_ui_PageView_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_PageView(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.PageView");
tolua_cclass(tolua_S,"PageView","ccui.PageView","ccui.Layout",nullptr);
tolua_cclass(tolua_S,"PageView","ccui.PageView","ccui.Layout",nullptr);
tolua_beginmodule(tolua_S,"PageView");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_PageView_constructor);
@ -15901,7 +15901,7 @@ static int lua_cocos2dx_ui_RichElement_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_RichElement(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.RichElement");
tolua_cclass(tolua_S,"RichElement","ccui.RichElement","cc.Ref",nullptr);
tolua_cclass(tolua_S,"RichElement","ccui.RichElement","cc.Ref",nullptr);
tolua_beginmodule(tolua_S,"RichElement");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_RichElement_constructor);
@ -16061,7 +16061,7 @@ static int lua_cocos2dx_ui_RichElementText_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_RichElementText(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.RichElementText");
tolua_cclass(tolua_S,"RichElementText","ccui.RichElementText","ccui.RichElement",nullptr);
tolua_cclass(tolua_S,"RichElementText","ccui.RichElementText","ccui.RichElement",nullptr);
tolua_beginmodule(tolua_S,"RichElementText");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_RichElementText_constructor);
@ -16212,7 +16212,7 @@ static int lua_cocos2dx_ui_RichElementImage_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_RichElementImage(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.RichElementImage");
tolua_cclass(tolua_S,"RichElementImage","ccui.RichElementImage","ccui.RichElement",nullptr);
tolua_cclass(tolua_S,"RichElementImage","ccui.RichElementImage","ccui.RichElement",nullptr);
tolua_beginmodule(tolua_S,"RichElementImage");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_RichElementImage_constructor);
@ -16363,7 +16363,7 @@ static int lua_cocos2dx_ui_RichElementCustomNode_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_RichElementCustomNode(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.RichElementCustomNode");
tolua_cclass(tolua_S,"RichElementCustomNode","ccui.RichElementCustomNode","ccui.RichElement",nullptr);
tolua_cclass(tolua_S,"RichElementCustomNode","ccui.RichElementCustomNode","ccui.RichElement",nullptr);
tolua_beginmodule(tolua_S,"RichElementCustomNode");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_RichElementCustomNode_constructor);
@ -16779,7 +16779,7 @@ static int lua_cocos2dx_ui_RichText_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_RichText(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.RichText");
tolua_cclass(tolua_S,"RichText","ccui.RichText","ccui.Widget",nullptr);
tolua_cclass(tolua_S,"RichText","ccui.RichText","ccui.Widget",nullptr);
tolua_beginmodule(tolua_S,"RichText");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_RichText_constructor);
@ -16886,7 +16886,7 @@ static int lua_cocos2dx_ui_HBox_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_HBox(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.HBox");
tolua_cclass(tolua_S,"HBox","ccui.HBox","ccui.Layout",nullptr);
tolua_cclass(tolua_S,"HBox","ccui.HBox","ccui.Layout",nullptr);
tolua_beginmodule(tolua_S,"HBox");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_HBox_constructor);
@ -16986,7 +16986,7 @@ static int lua_cocos2dx_ui_VBox_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_VBox(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.VBox");
tolua_cclass(tolua_S,"VBox","ccui.VBox","ccui.Layout",nullptr);
tolua_cclass(tolua_S,"VBox","ccui.VBox","ccui.Layout",nullptr);
tolua_beginmodule(tolua_S,"VBox");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_VBox_constructor);
@ -17086,7 +17086,7 @@ static int lua_cocos2dx_ui_RelativeBox_finalize(lua_State* tolua_S)
int lua_register_cocos2dx_ui_RelativeBox(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ccui.RelativeBox");
tolua_cclass(tolua_S,"RelativeBox","ccui.RelativeBox","ccui.Layout",nullptr);
tolua_cclass(tolua_S,"RelativeBox","ccui.RelativeBox","ccui.Layout",nullptr);
tolua_beginmodule(tolua_S,"RelativeBox");
tolua_function(tolua_S,"new",lua_cocos2dx_ui_RelativeBox_constructor);

View File

@ -405,6 +405,155 @@ static void extendBone(lua_State* L)
lua_pop(L, 1);
}
int lua_cocos2dx_studio_NodeReader_getInstance(lua_State* L)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(L,1,"ccs.NodeReader",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(L) - 1;
if (argc == 0)
{
if(!ok)
return 0;
cocostudio::timeline::NodeReader* ret = cocostudio::timeline::NodeReader::getInstance();
tolua_pushusertype(L,(void*)ret, "ccs.NodeReader");
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "getInstance",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(L,"#ferror in function 'lua_cocos2dx_studio_NodeReader_getInstance'.",&tolua_err);
#endif
return 0;
}
static void extendNodeReader(lua_State* L)
{
lua_pushstring(L, "ccs.NodeReader");
lua_rawget(L, LUA_REGISTRYINDEX);
if (lua_istable(L,-1))
{
tolua_function(L, "getInstance", lua_cocos2dx_studio_NodeReader_getInstance);
}
lua_pop(L, 1);
}
int lua_cocos2dx_studio_ActionTimelineCache_getInstance(lua_State* L)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(L,1,"ccs.ActionTimelineCache",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(L) - 1;
if (argc == 0)
{
if(!ok)
return 0;
cocostudio::timeline::ActionTimelineCache* ret = cocostudio::timeline::ActionTimelineCache::getInstance();
tolua_pushusertype(L,(void*)ret, "ccs.ActionTimelineCache");
return 1;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "getInstance",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(L,"#ferror in function 'lua_cocos2dx_studio_ActionTimelineCache_getInstance'.",&tolua_err);
#endif
return 0;
}
static void extendActionTimelineCache(lua_State* L)
{
lua_pushstring(L, "ccs.ActionTimelineCache");
lua_rawget(L, LUA_REGISTRYINDEX);
if (lua_istable(L,-1))
{
tolua_function(L, "getInstance", lua_cocos2dx_studio_ActionTimelineCache_getInstance);
}
lua_pop(L, 1);
}
static int lua_cocos2dx_ActionTimeline_setFrameEventCallFunc(lua_State* L)
{
if (nullptr == L)
return 0;
int argc = 0;
cocostudio::timeline::ActionTimeline* self = nullptr;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
if (!tolua_isusertype(L,1,"ccs.ActionTimeline",0,&tolua_err)) goto tolua_lerror;
#endif
self = static_cast<cocostudio::timeline::ActionTimeline*>(tolua_tousertype(L,1,0));
#if COCOS2D_DEBUG >= 1
if (nullptr == self) {
tolua_error(L,"invalid 'self' in function 'lua_cocos2dx_ActionTimeline_setFrameEventCallFunc'\n", NULL);
return 0;
}
#endif
argc = lua_gettop(L) - 1;
if (1 == argc)
{
#if COCOS2D_DEBUG >= 1
if (!toluafix_isfunction(L,2,"LUA_FUNCTION",0,&tolua_err) )
{
goto tolua_lerror;
}
#endif
LUA_FUNCTION handler = ( toluafix_ref_function(L,2,0));
self->setFrameEventCallFunc([=](cocostudio::timeline::Frame* frame){
toluafix_pushusertype_ccobject(L, frame->_ID, &frame->_luaID, (void*)frame, getLuaTypeName(frame, "ccs.Frame"));
LuaEngine::getInstance()->getLuaStack()->executeFunctionByHandler(handler, 1);
});
return 0;
}
CCLOG("'setFrameEventCallFunc' function of ActionTimeline has wrong number of arguments: %d, was expecting %d\n", argc, 1);
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(L,"#ferror in function 'setFrameEventCallFunc'.",&tolua_err);
return 0;
#endif
}
static void extendActionTimeline(lua_State* L)
{
lua_pushstring(L, "ccs.ActionTimeline");
lua_rawget(L, LUA_REGISTRYINDEX);
if (lua_istable(L,-1))
{
tolua_function(L, "setFrameEventCallFunc", lua_cocos2dx_ActionTimeline_setFrameEventCallFunc);
}
lua_pop(L, 1);
}
int register_all_cocos2dx_coco_studio_manual(lua_State* L)
{
if (nullptr == L)
@ -412,6 +561,9 @@ int register_all_cocos2dx_coco_studio_manual(lua_State* L)
extendArmatureAnimation(L);
extendArmatureDataManager(L);
extendBone(L);
extendActionTimelineCache(L);
extendNodeReader(L);
extendActionTimeline(L);
return 0;
}

View File

@ -3523,13 +3523,22 @@
"cocos/scripting/lua-bindings/auto/api/Action.lua",
"cocos/scripting/lua-bindings/auto/api/ActionCamera.lua",
"cocos/scripting/lua-bindings/auto/api/ActionEase.lua",
"cocos/scripting/lua-bindings/auto/api/ActionFadeFrame.lua",
"cocos/scripting/lua-bindings/auto/api/ActionFrame.lua",
"cocos/scripting/lua-bindings/auto/api/ActionInstant.lua",
"cocos/scripting/lua-bindings/auto/api/ActionInterval.lua",
"cocos/scripting/lua-bindings/auto/api/ActionManager.lua",
"cocos/scripting/lua-bindings/auto/api/ActionManagerEx.lua",
"cocos/scripting/lua-bindings/auto/api/ActionMoveFrame.lua",
"cocos/scripting/lua-bindings/auto/api/ActionObject.lua",
"cocos/scripting/lua-bindings/auto/api/ActionRotationFrame.lua",
"cocos/scripting/lua-bindings/auto/api/ActionScaleFrame.lua",
"cocos/scripting/lua-bindings/auto/api/ActionTimeline.lua",
"cocos/scripting/lua-bindings/auto/api/ActionTimelineCache.lua",
"cocos/scripting/lua-bindings/auto/api/ActionTimelineData.lua",
"cocos/scripting/lua-bindings/auto/api/ActionTintFrame.lua",
"cocos/scripting/lua-bindings/auto/api/ActionTween.lua",
"cocos/scripting/lua-bindings/auto/api/AnchorPointFrame.lua",
"cocos/scripting/lua-bindings/auto/api/Animate.lua",
"cocos/scripting/lua-bindings/auto/api/Animate3D.lua",
"cocos/scripting/lua-bindings/auto/api/Animation.lua",
@ -3562,6 +3571,7 @@
"cocos/scripting/lua-bindings/auto/api/CatmullRomTo.lua",
"cocos/scripting/lua-bindings/auto/api/CheckBox.lua",
"cocos/scripting/lua-bindings/auto/api/ClippingNode.lua",
"cocos/scripting/lua-bindings/auto/api/ColorFrame.lua",
"cocos/scripting/lua-bindings/auto/api/ComAttribute.lua",
"cocos/scripting/lua-bindings/auto/api/ComAudio.lua",
"cocos/scripting/lua-bindings/auto/api/ComController.lua",
@ -3626,6 +3636,7 @@
"cocos/scripting/lua-bindings/auto/api/EventCustom.lua",
"cocos/scripting/lua-bindings/auto/api/EventDispatcher.lua",
"cocos/scripting/lua-bindings/auto/api/EventFocus.lua",
"cocos/scripting/lua-bindings/auto/api/EventFrame.lua",
"cocos/scripting/lua-bindings/auto/api/EventKeyboard.lua",
"cocos/scripting/lua-bindings/auto/api/EventListener.lua",
"cocos/scripting/lua-bindings/auto/api/EventListenerAcceleration.lua",
@ -3655,6 +3666,7 @@
"cocos/scripting/lua-bindings/auto/api/FlipY.lua",
"cocos/scripting/lua-bindings/auto/api/FlipY3D.lua",
"cocos/scripting/lua-bindings/auto/api/Follow.lua",
"cocos/scripting/lua-bindings/auto/api/Frame.lua",
"cocos/scripting/lua-bindings/auto/api/FrameData.lua",
"cocos/scripting/lua-bindings/auto/api/GLProgram.lua",
"cocos/scripting/lua-bindings/auto/api/GLProgramCache.lua",
@ -3671,6 +3683,7 @@
"cocos/scripting/lua-bindings/auto/api/Hide.lua",
"cocos/scripting/lua-bindings/auto/api/Image.lua",
"cocos/scripting/lua-bindings/auto/api/ImageView.lua",
"cocos/scripting/lua-bindings/auto/api/InnerActionFrame.lua",
"cocos/scripting/lua-bindings/auto/api/JumpBy.lua",
"cocos/scripting/lua-bindings/auto/api/JumpTiles3D.lua",
"cocos/scripting/lua-bindings/auto/api/JumpTo.lua",
@ -3703,6 +3716,7 @@
"cocos/scripting/lua-bindings/auto/api/MovementData.lua",
"cocos/scripting/lua-bindings/auto/api/Node.lua",
"cocos/scripting/lua-bindings/auto/api/NodeGrid.lua",
"cocos/scripting/lua-bindings/auto/api/NodeReader.lua",
"cocos/scripting/lua-bindings/auto/api/OrbitCamera.lua",
"cocos/scripting/lua-bindings/auto/api/PageTurn3D.lua",
"cocos/scripting/lua-bindings/auto/api/PageView.lua",
@ -3749,6 +3763,7 @@
"cocos/scripting/lua-bindings/auto/api/PhysicsShapePolygon.lua",
"cocos/scripting/lua-bindings/auto/api/PhysicsWorld.lua",
"cocos/scripting/lua-bindings/auto/api/Place.lua",
"cocos/scripting/lua-bindings/auto/api/PositionFrame.lua",
"cocos/scripting/lua-bindings/auto/api/ProgressFromTo.lua",
"cocos/scripting/lua-bindings/auto/api/ProgressTimer.lua",
"cocos/scripting/lua-bindings/auto/api/ProgressTo.lua",
@ -3769,8 +3784,11 @@
"cocos/scripting/lua-bindings/auto/api/Ripple3D.lua",
"cocos/scripting/lua-bindings/auto/api/RotateBy.lua",
"cocos/scripting/lua-bindings/auto/api/RotateTo.lua",
"cocos/scripting/lua-bindings/auto/api/RotationFrame.lua",
"cocos/scripting/lua-bindings/auto/api/RotationSkewFrame.lua",
"cocos/scripting/lua-bindings/auto/api/Scale9Sprite.lua",
"cocos/scripting/lua-bindings/auto/api/ScaleBy.lua",
"cocos/scripting/lua-bindings/auto/api/ScaleFrame.lua",
"cocos/scripting/lua-bindings/auto/api/ScaleTo.lua",
"cocos/scripting/lua-bindings/auto/api/Scene.lua",
"cocos/scripting/lua-bindings/auto/api/SceneReader.lua",
@ -3786,6 +3804,7 @@
"cocos/scripting/lua-bindings/auto/api/Skeleton.lua",
"cocos/scripting/lua-bindings/auto/api/SkeletonAnimation.lua",
"cocos/scripting/lua-bindings/auto/api/SkewBy.lua",
"cocos/scripting/lua-bindings/auto/api/SkewFrame.lua",
"cocos/scripting/lua-bindings/auto/api/SkewTo.lua",
"cocos/scripting/lua-bindings/auto/api/Skin.lua",
"cocos/scripting/lua-bindings/auto/api/Slider.lua",
@ -3816,9 +3835,11 @@
"cocos/scripting/lua-bindings/auto/api/Texture2D.lua",
"cocos/scripting/lua-bindings/auto/api/TextureCache.lua",
"cocos/scripting/lua-bindings/auto/api/TextureData.lua",
"cocos/scripting/lua-bindings/auto/api/TextureFrame.lua",
"cocos/scripting/lua-bindings/auto/api/TileMapAtlas.lua",
"cocos/scripting/lua-bindings/auto/api/TiledGrid3D.lua",
"cocos/scripting/lua-bindings/auto/api/TiledGrid3DAction.lua",
"cocos/scripting/lua-bindings/auto/api/Timeline.lua",
"cocos/scripting/lua-bindings/auto/api/Timer.lua",
"cocos/scripting/lua-bindings/auto/api/TintBy.lua",
"cocos/scripting/lua-bindings/auto/api/TintTo.lua",
@ -3866,10 +3887,12 @@
"cocos/scripting/lua-bindings/auto/api/Twirl.lua",
"cocos/scripting/lua-bindings/auto/api/UserDefault.lua",
"cocos/scripting/lua-bindings/auto/api/VBox.lua",
"cocos/scripting/lua-bindings/auto/api/VisibleFrame.lua",
"cocos/scripting/lua-bindings/auto/api/Waves.lua",
"cocos/scripting/lua-bindings/auto/api/Waves3D.lua",
"cocos/scripting/lua-bindings/auto/api/WavesTiles3D.lua",
"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_extension_auto_api.lua",
"cocos/scripting/lua-bindings/auto/api/lua_cocos2dx_physics_auto_api.lua",

View File

@ -13,6 +13,9 @@ HttpClientTest::HttpClientTest()
const int MARGIN = 40;
const int SPACE = 35;
const int LEFT = winSize.width / 4;
const int RIGHT = winSize.width / 4 * 3;
auto label = Label::createWithTTF("Http Request Test", "fonts/arial.ttf", 28);
label->setPosition(Vec2(winSize.width / 2, winSize.height - MARGIN));
@ -24,36 +27,66 @@ HttpClientTest::HttpClientTest()
// Get
auto labelGet = Label::createWithTTF("Test Get", "fonts/arial.ttf", 22);
auto itemGet = MenuItemLabel::create(labelGet, CC_CALLBACK_1(HttpClientTest::onMenuGetTestClicked, this));
itemGet->setPosition(Vec2(winSize.width / 2, winSize.height - MARGIN - SPACE));
auto itemGet = MenuItemLabel::create(labelGet, CC_CALLBACK_1(HttpClientTest::onMenuGetTestClicked, this, false));
itemGet->setPosition(Vec2(LEFT, winSize.height - MARGIN - SPACE));
menuRequest->addChild(itemGet);
// Post
auto labelPost = Label::createWithTTF("Test Post", "fonts/arial.ttf", 22);
auto itemPost = MenuItemLabel::create(labelPost, CC_CALLBACK_1(HttpClientTest::onMenuPostTestClicked, this));
itemPost->setPosition(Vec2(winSize.width / 2, winSize.height - MARGIN - 2 * SPACE));
auto itemPost = MenuItemLabel::create(labelPost, CC_CALLBACK_1(HttpClientTest::onMenuPostTestClicked, this, false));
itemPost->setPosition(Vec2(LEFT, winSize.height - MARGIN - 2 * SPACE));
menuRequest->addChild(itemPost);
// Post Binary
auto labelPostBinary = Label::createWithTTF("Test Post Binary", "fonts/arial.ttf", 22);
auto itemPostBinary = MenuItemLabel::create(labelPostBinary, CC_CALLBACK_1(HttpClientTest::onMenuPostBinaryTestClicked, this));
itemPostBinary->setPosition(Vec2(winSize.width / 2, winSize.height - MARGIN - 3 * SPACE));
auto itemPostBinary = MenuItemLabel::create(labelPostBinary, CC_CALLBACK_1(HttpClientTest::onMenuPostBinaryTestClicked, this, false));
itemPostBinary->setPosition(Vec2(LEFT, winSize.height - MARGIN - 3 * SPACE));
menuRequest->addChild(itemPostBinary);
// Put
auto labelPut = Label::createWithTTF("Test Put", "fonts/arial.ttf", 22);
auto itemPut = MenuItemLabel::create(labelPut, CC_CALLBACK_1(HttpClientTest::onMenuPutTestClicked, this));
itemPut->setPosition(Vec2(winSize.width / 2, winSize.height - MARGIN - 4 * SPACE));
auto itemPut = MenuItemLabel::create(labelPut, CC_CALLBACK_1(HttpClientTest::onMenuPutTestClicked, this, false));
itemPut->setPosition(Vec2(LEFT, winSize.height - MARGIN - 4 * SPACE));
menuRequest->addChild(itemPut);
// Delete
auto labelDelete = Label::createWithTTF("Test Delete", "fonts/arial.ttf", 22);
auto itemDelete = MenuItemLabel::create(labelDelete, CC_CALLBACK_1(HttpClientTest::onMenuDeleteTestClicked, this));
itemDelete->setPosition(Vec2(winSize.width / 2, winSize.height - MARGIN - 5 * SPACE));
auto itemDelete = MenuItemLabel::create(labelDelete, CC_CALLBACK_1(HttpClientTest::onMenuDeleteTestClicked, this, false));
itemDelete->setPosition(Vec2(LEFT, winSize.height - MARGIN - 5 * SPACE));
menuRequest->addChild(itemDelete);
// Get for sendImmediate
labelGet = Label::createWithTTF("Test Immediate Get", "fonts/arial.ttf", 22);
itemGet = MenuItemLabel::create(labelGet, CC_CALLBACK_1(HttpClientTest::onMenuGetTestClicked, this, true));
itemGet->setPosition(Vec2(RIGHT, winSize.height - MARGIN - SPACE));
menuRequest->addChild(itemGet);
// Post for sendImmediate
labelPost = Label::createWithTTF("Test Immediate Post", "fonts/arial.ttf", 22);
itemPost = MenuItemLabel::create(labelPost, CC_CALLBACK_1(HttpClientTest::onMenuPostTestClicked, this, true));
itemPost->setPosition(Vec2(RIGHT, winSize.height - MARGIN - 2 * SPACE));
menuRequest->addChild(itemPost);
// Post Binary for sendImmediate
labelPostBinary = Label::createWithTTF("Test Immediate Post Binary", "fonts/arial.ttf", 22);
itemPostBinary = MenuItemLabel::create(labelPostBinary, CC_CALLBACK_1(HttpClientTest::onMenuPostBinaryTestClicked, this, true));
itemPostBinary->setPosition(Vec2(RIGHT, winSize.height - MARGIN - 3 * SPACE));
menuRequest->addChild(itemPostBinary);
// Put for sendImmediate
labelPut = Label::createWithTTF("Test Immediate Put", "fonts/arial.ttf", 22);
itemPut = MenuItemLabel::create(labelPut, CC_CALLBACK_1(HttpClientTest::onMenuPutTestClicked, this, true));
itemPut->setPosition(Vec2(RIGHT, winSize.height - MARGIN - 4 * SPACE));
menuRequest->addChild(itemPut);
// Delete for sendImmediate
labelDelete = Label::createWithTTF("Test Immediate Delete", "fonts/arial.ttf", 22);
itemDelete = MenuItemLabel::create(labelDelete, CC_CALLBACK_1(HttpClientTest::onMenuDeleteTestClicked, this, true));
itemDelete->setPosition(Vec2(RIGHT, winSize.height - MARGIN - 5 * SPACE));
menuRequest->addChild(itemDelete);
// Response Code Label
_labelStatusCode = Label::createWithTTF("HTTP Status Code", "fonts/arial.ttf", 22);
_labelStatusCode = Label::createWithTTF("HTTP Status Code", "fonts/arial.ttf", 18);
_labelStatusCode->setPosition(Vec2(winSize.width / 2, winSize.height - MARGIN - 6 * SPACE));
addChild(_labelStatusCode);
@ -70,7 +103,7 @@ HttpClientTest::~HttpClientTest()
HttpClient::destroyInstance();
}
void HttpClientTest::onMenuGetTestClicked(cocos2d::Ref *sender)
void HttpClientTest::onMenuGetTestClicked(cocos2d::Ref *sender, bool isImmediate)
{
// test 1
{
@ -78,8 +111,15 @@ void HttpClientTest::onMenuGetTestClicked(cocos2d::Ref *sender)
request->setUrl("http://just-make-this-request-failed.com");
request->setRequestType(HttpRequest::Type::GET);
request->setResponseCallback(CC_CALLBACK_2(HttpClientTest::onHttpRequestCompleted, this));
request->setTag("GET test1");
HttpClient::getInstance()->send(request);
if (isImmediate)
{
request->setTag("GET immediate test1");
HttpClient::getInstance()->sendImmediate(request);
}else
{
request->setTag("GET test1");
HttpClient::getInstance()->send(request);
}
request->release();
}
@ -90,11 +130,15 @@ void HttpClientTest::onMenuGetTestClicked(cocos2d::Ref *sender)
request->setUrl("http://httpbin.org/ip");
request->setRequestType(HttpRequest::Type::GET);
request->setResponseCallback(CC_CALLBACK_2(HttpClientTest::onHttpRequestCompleted, this));
// optional fields
request->setTag("GET test2");
HttpClient::getInstance()->send(request);
if (isImmediate)
{
request->setTag("GET immediate test2");
HttpClient::getInstance()->sendImmediate(request);
}else
{
request->setTag("GET test2");
HttpClient::getInstance()->send(request);
}
// don't forget to release it, pair to new
request->release();
}
@ -105,8 +149,15 @@ void HttpClientTest::onMenuGetTestClicked(cocos2d::Ref *sender)
request->setUrl("https://httpbin.org/get");
request->setRequestType(HttpRequest::Type::GET);
request->setResponseCallback(CC_CALLBACK_2(HttpClientTest::onHttpRequestCompleted, this));
request->setTag("GET test3");
HttpClient::getInstance()->send(request);
if (isImmediate)
{
request->setTag("GET immediate test3");
HttpClient::getInstance()->sendImmediate(request);
}else
{
request->setTag("GET test3");
HttpClient::getInstance()->send(request);
}
request->release();
}
@ -115,7 +166,7 @@ void HttpClientTest::onMenuGetTestClicked(cocos2d::Ref *sender)
}
void HttpClientTest::onMenuPostTestClicked(cocos2d::Ref *sender)
void HttpClientTest::onMenuPostTestClicked(cocos2d::Ref *sender, bool isImmediate)
{
// test 1
{
@ -127,9 +178,15 @@ void HttpClientTest::onMenuPostTestClicked(cocos2d::Ref *sender)
// write the post data
const char* postData = "visitor=cocos2d&TestSuite=Extensions Test/NetworkTest";
request->setRequestData(postData, strlen(postData));
request->setTag("POST test1");
HttpClient::getInstance()->send(request);
if (isImmediate)
{
request->setTag("POST immediate test1");
HttpClient::getInstance()->sendImmediate(request);
}else
{
request->setTag("POST test1");
HttpClient::getInstance()->send(request);
}
request->release();
}
@ -146,9 +203,15 @@ void HttpClientTest::onMenuPostTestClicked(cocos2d::Ref *sender)
// write the post data
const char* postData = "visitor=cocos2d&TestSuite=Extensions Test/NetworkTest";
request->setRequestData(postData, strlen(postData));
request->setTag("POST test2");
HttpClient::getInstance()->send(request);
if (isImmediate)
{
request->setTag("POST immediate test2");
HttpClient::getInstance()->sendImmediate(request);
}else
{
request->setTag("POST test2");
HttpClient::getInstance()->send(request);
}
request->release();
}
@ -156,7 +219,7 @@ void HttpClientTest::onMenuPostTestClicked(cocos2d::Ref *sender)
_labelStatusCode->setString("waiting...");
}
void HttpClientTest::onMenuPostBinaryTestClicked(cocos2d::Ref *sender)
void HttpClientTest::onMenuPostBinaryTestClicked(cocos2d::Ref *sender, bool isImmediate)
{
HttpRequest* request = new HttpRequest();
request->setUrl("http://httpbin.org/post");
@ -166,9 +229,15 @@ void HttpClientTest::onMenuPostBinaryTestClicked(cocos2d::Ref *sender)
// write the post data
char postData[22] = "binary=hello\0\0cocos2d"; // including \0, the strings after \0 should not be cut in response
request->setRequestData(postData, 22);
request->setTag("POST Binary test");
HttpClient::getInstance()->send(request);
if (isImmediate)
{
request->setTag("POST Binary immediate test");
HttpClient::getInstance()->sendImmediate(request);
}else
{
request->setTag("POST Binary test");
HttpClient::getInstance()->send(request);
}
request->release();
// waiting
@ -177,7 +246,7 @@ void HttpClientTest::onMenuPostBinaryTestClicked(cocos2d::Ref *sender)
void HttpClientTest::onMenuPutTestClicked(Ref *sender)
void HttpClientTest::onMenuPutTestClicked(Ref *sender, bool isImmediate)
{
// test 1
{
@ -189,9 +258,15 @@ void HttpClientTest::onMenuPutTestClicked(Ref *sender)
// write the post data
const char* postData = "visitor=cocos2d&TestSuite=Extensions Test/NetworkTest";
request->setRequestData(postData, strlen(postData));
request->setTag("PUT test1");
HttpClient::getInstance()->send(request);
if (isImmediate)
{
request->setTag("PUT Binary immediate test1");
HttpClient::getInstance()->sendImmediate(request);
}else
{
request->setTag("PUT Binary test1");
HttpClient::getInstance()->send(request);
}
request->release();
}
@ -208,9 +283,15 @@ void HttpClientTest::onMenuPutTestClicked(Ref *sender)
// write the post data
const char* postData = "visitor=cocos2d&TestSuite=Extensions Test/NetworkTest";
request->setRequestData(postData, strlen(postData));
request->setTag("PUT test2");
HttpClient::getInstance()->send(request);
if (isImmediate)
{
request->setTag("PUT Binary immediate test2");
HttpClient::getInstance()->sendImmediate(request);
}else
{
request->setTag("PUT Binary test2");
HttpClient::getInstance()->send(request);
}
request->release();
}
@ -218,7 +299,7 @@ void HttpClientTest::onMenuPutTestClicked(Ref *sender)
_labelStatusCode->setString("waiting...");
}
void HttpClientTest::onMenuDeleteTestClicked(Ref *sender)
void HttpClientTest::onMenuDeleteTestClicked(Ref *sender, bool isImmediate)
{
// test 1
{
@ -226,8 +307,15 @@ void HttpClientTest::onMenuDeleteTestClicked(Ref *sender)
request->setUrl("http://just-make-this-request-failed.com");
request->setRequestType(HttpRequest::Type::DELETE);
request->setResponseCallback(CC_CALLBACK_2(HttpClientTest::onHttpRequestCompleted, this));
request->setTag("DELETE test1");
HttpClient::getInstance()->send(request);
if (isImmediate)
{
request->setTag("DELETE immediate test1");
HttpClient::getInstance()->sendImmediate(request);
}else
{
request->setTag("DELETE test1");
HttpClient::getInstance()->send(request);
}
request->release();
}
@ -237,8 +325,15 @@ void HttpClientTest::onMenuDeleteTestClicked(Ref *sender)
request->setUrl("http://httpbin.org/delete");
request->setRequestType(HttpRequest::Type::DELETE);
request->setResponseCallback(CC_CALLBACK_2(HttpClientTest::onHttpRequestCompleted, this));
request->setTag("DELETE test2");
HttpClient::getInstance()->send(request);
if (isImmediate)
{
request->setTag("DELETE immediate test2");
HttpClient::getInstance()->sendImmediate(request);
}else
{
request->setTag("DELETE test2");
HttpClient::getInstance()->send(request);
}
request->release();
}
@ -280,6 +375,10 @@ void HttpClientTest::onHttpRequestCompleted(HttpClient *sender, HttpResponse *re
printf("%c", (*buffer)[i]);
}
printf("\n");
if (response->getHttpRequest()->getReferenceCount() != 2)
{
log("request ref count not 2, is %d", response->getHttpRequest()->getReferenceCount());
}
}
void HttpClientTest::toExtensionsMainLayer(cocos2d::Ref *sender)

View File

@ -13,11 +13,11 @@ public:
void toExtensionsMainLayer(cocos2d::Ref *sender);
//Menu Callbacks
void onMenuGetTestClicked(cocos2d::Ref *sender);
void onMenuPostTestClicked(cocos2d::Ref *sender);
void onMenuPostBinaryTestClicked(cocos2d::Ref *sender);
void onMenuPutTestClicked(cocos2d::Ref *sender);
void onMenuDeleteTestClicked(cocos2d::Ref *sender);
void onMenuGetTestClicked(cocos2d::Ref *sender, bool isImmediate);
void onMenuPostTestClicked(cocos2d::Ref *sender, bool isImmediate);
void onMenuPostBinaryTestClicked(cocos2d::Ref *sender, bool isImmediate);
void onMenuPutTestClicked(cocos2d::Ref *sender, bool isImmediate);
void onMenuDeleteTestClicked(cocos2d::Ref *sender, bool isImmediate);
//Http Response Callback
void onHttpRequestCompleted(cocos2d::network::HttpClient *sender, cocos2d::network::HttpResponse *response);

View File

@ -1266,23 +1266,9 @@ void NodeNameTest::onEnter()
log("find child: %s", node->getName().c_str());
}
// enumerateChildren()
int i = 0;
parent->enumerateChildren("test", [&i](Node* node) -> bool {
++i;
return true;
});
CCAssert(i == 1, "");
i = 0;
parent->enumerateChildren("test", [&i](Node* node) -> bool {
++i;
return false;
});
CCAssert(i == 2, "");
// enumerateChildren()
// name = regular expression
int i = 0;
parent = Node::create();
for (int i = 0; i < 100; ++i)
{
@ -1422,6 +1408,19 @@ void NodeNameTest::onEnter()
return false;
});
CCAssert(i == 10000, "");
// utils::findChildren()
parent = Node::create();
for (int i = 0; i < 50; ++i)
{
auto child = Node::create();
child->setName("node");
parent->addChild(child);
}
auto findChildren = utils::findChildren(*parent, "node");
CCAssert(findChildren.size() == 50, "");
}
///

View File

@ -0,0 +1,451 @@
local itemTagBasic = 1000
local winSize = cc.Director:getInstance():getWinSize()
local scheduler = cc.Director:getInstance():getScheduler()
local TimelineTestIndex =
{
TEST_ACTION_TIMELINE = 1,
TEST_CHANGE_PLAY_SECTION = 2,
TEST_TIMELINE_FRAME_EVENT = 3,
TEST_TIMELINE_PERFORMACE = 4,
}
local timelineSceneIdx = TimelineTestIndex.TEST_ACTION_TIMELINE
local TimelineTestScene = class("TimelineTestScene")
TimelineTestScene.__index = TimelineTestScene
function TimelineTestScene.extend(target)
local t = tolua.getpeer(target)
if not t then
t = {}
tolua.setpeer(target, t)
end
setmetatable(t, TimelineTestScene)
return target
end
function TimelineTestScene:runThisTest()
timelineSceneIdx = TimelineTestIndex.TEST_ACTION_TIMELINE
self:addChild(restartTimelineTest())
end
function TimelineTestScene.create()
local scene = TimelineTestScene.extend(cc.Scene:create())
local bg = cc.Sprite:create("armature/bg.jpg")
bg:setPosition(VisibleRect:center())
local scaleX = VisibleRect:getVisibleRect().width / bg:getContentSize().width
local scaleY = VisibleRect:getVisibleRect().height / bg:getContentSize().height
bg:setScaleX(scaleX)
bg:setScaleY(scaleY)
scene:addChild(bg)
return scene
end
function TimelineTestScene.toMainMenuCallback()
end
local TimelineTestLayer = class("TimelineTestLayer")
TimelineTestLayer.__index = TimelineTestLayer
TimelineTestLayer._backItem = nil
TimelineTestLayer._restarItem = nil
TimelineTestLayer._nextItem = nil
function TimelineTestLayer:onEnter()
end
function TimelineTestLayer.title(idx)
if TimelineTestIndex.TEST_ACTION_TIMELINE == idx then
return "CSArmature Test Bed"
elseif TimelineTestIndex.TEST_CHANGE_PLAY_SECTION == idx then
return "Test Change Play Section"
elseif TimelineTestIndex.TEST_TIMELINE_FRAME_EVENT == idx then
return "Test Frame Event"
elseif TimelineTestIndex.TEST_TIMELINE_PERFORMACE == idx then
return "Test ActionTimeline performance"
end
end
function TimelineTestLayer.subTitle(idx)
if TimelineTestIndex.TEST_ACTION_TIMELINE == idx then
return ""
else
return ""
end
end
function TimelineTestLayer.create()
local layer = TimelineTestLayer.extend(cc.Layer:create())
if nil ~= layer then
layer:createMenu()
layer:createToExtensionMenu()
layer:creatTitleAndSubTitle(timelineSceneIdx)
local function onNodeEvent(event)
if "enter" == event then
layer:onEnter()
end
end
layer:registerScriptHandler(onNodeEvent)
end
return layer
end
function TimelineTestLayer.backCallback()
local newScene = TimelineTestScene.create()
newScene:addChild(backimelineTest())
cc.Director:getInstance():replaceScene(newScene)
end
function TimelineTestLayer.restartCallback()
local newScene = TimelineTestScene.create()
newScene:addChild(restartTimelineTest())
cc.Director:getInstance():replaceScene(newScene)
end
function TimelineTestLayer.nextCallback()
local newScene = TimelineTestScene.create()
newScene:addChild(nextTimelineTest())
cc.Director:getInstance():replaceScene(newScene)
end
function TimelineTestLayer:createMenu()
local menu = cc.Menu:create()
self._backItem = cc.MenuItemImage:create(s_pPathB1, s_pPathB2)
self._backItem:registerScriptTapHandler(self.backCallback)
menu:addChild(self._backItem,itemTagBasic)
self._restarItem = cc.MenuItemImage:create(s_pPathR1, s_pPathR2)
self._restarItem:registerScriptTapHandler(self.restartCallback)
menu:addChild(self._restarItem,itemTagBasic)
self._nextItem = cc.MenuItemImage:create(s_pPathF1, s_pPathF2)
menu:addChild(self._nextItem,itemTagBasic)
self._nextItem:registerScriptTapHandler(self.nextCallback)
local size = cc.Director:getInstance():getWinSize()
self._backItem:setPosition(cc.p(size.width / 2 - self._restarItem:getContentSize().width * 2, self._restarItem:getContentSize().height / 2))
self._restarItem:setPosition(cc.p(size.width / 2, self._restarItem:getContentSize().height / 2))
self._nextItem:setPosition(cc.p(size.width / 2 + self._restarItem:getContentSize().width * 2, self._restarItem:getContentSize().height / 2))
menu:setPosition(cc.p(0, 0))
self:addChild(menu)
end
function TimelineTestLayer.toExtensionMenu()
ccs.ArmatureDataManager:destroyInstance()
local scene = CocoStudioTestMain()
if scene ~= nil then
cc.Director:getInstance():replaceScene(scene)
end
end
function TimelineTestLayer:createToExtensionMenu()
cc.MenuItemFont:setFontName("Arial")
cc.MenuItemFont:setFontSize(24)
local menuItemFont = cc.MenuItemFont:create("Back")
menuItemFont:setPosition(cc.p(VisibleRect:rightBottom().x - 50, VisibleRect:rightBottom().y + 25))
menuItemFont:registerScriptTapHandler(TimelineTestLayer.toExtensionMenu)
local backMenu = cc.Menu:create()
backMenu:addChild(menuItemFont)
backMenu:setPosition(cc.p(0, 0))
self:addChild(backMenu,10)
end
function TimelineTestLayer:creatTitleAndSubTitle(idx)
print("set title")
local title = cc.Label:createWithTTF(TimelineTestLayer.title(idx), "fonts/Thonburi.ttf", 18)
title:setColor(cc.c3b(255,0,0))
self:addChild(title, 1, 10000)
title:setPosition( cc.p(VisibleRect:center().x, VisibleRect:top().y - 30))
local subTitle = nil
if "" ~= TimelineTestLayer.subTitle(idx) then
local subTitle = cc.Label:createWithTTF(TimelineTestLayer.subTitle(idx), "fonts/Thonburi.ttf", 18)
subTitle:setColor(cc.c3b(0,0,0))
self:addChild(subTitle, 1, 10001)
subTitle:setPosition( cc.p(VisibleRect:center().x, VisibleRect:top().y - 60) )
end
end
local TestActionTimeline = class("TestActionTimeline",TimelineTestLayer)
TestActionTimeline.__index = TestActionTimeline
function TestActionTimeline.extend(target)
local t = tolua.getpeer(target)
if not t then
t = {}
tolua.setpeer(target, t)
end
setmetatable(t, TestActionTimeline)
return target
end
function TestActionTimeline:onEnter()
cc.SpriteFrameCache:getInstance():addSpriteFramesWithFile("armature/Cowboy0.plist", "armature/Cowboy0.png")
local node = ccs.NodeReader:getInstance():createNode("ActionTimeline/boy_1.ExportJson")
local action = ccs.ActionTimelineCache:getInstance():createAction("ActionTimeline/boy_1.ExportJson")
node:runAction(action)
action:gotoFrameAndPlay(0, 60, true)
node:setScale(0.4)
node:setPosition(0, 0)
self:addChild(node)
end
function TestActionTimeline.restartCallback()
ccs.ArmatureDataManager:destroyInstance()
local newScene = TimelineTestScene.create()
newScene:addChild(restartTimelineTest())
cc.Director:getInstance():replaceScene(newScene)
end
function TestActionTimeline.create()
local layer = TestActionTimeline.extend(cc.Layer:create())
if nil ~= layer then
layer:createMenu()
layer:createToExtensionMenu()
layer:creatTitleAndSubTitle(timelineSceneIdx)
local function onNodeEvent(event)
if "enter" == event then
layer:onEnter()
end
end
layer:registerScriptHandler(onNodeEvent)
end
return layer
end
local TestChangePlaySection = class("TestChangePlaySection",TimelineTestLayer)
TestChangePlaySection.__index = TestChangePlaySection
function TestChangePlaySection.extend(target)
local t = tolua.getpeer(target)
if not t then
t = {}
tolua.setpeer(target, t)
end
setmetatable(t, TestChangePlaySection)
return target
end
function TestChangePlaySection:onEnter()
cc.SpriteFrameCache:getInstance():addSpriteFramesWithFile("armature/Cowboy0.plist", "armature/Cowboy0.png")
local node = ccs.NodeReader:getInstance():createNode("ActionTimeline/boy_1.ExportJson")
local action = ccs.ActionTimelineCache:getInstance():createAction("ActionTimeline/boy_1.ExportJson")
node:runAction(action)
action:gotoFrameAndPlay(70, action:getDuration(), true)
node:setScale(0.2)
node:setPosition(150, 100)
local function onTouchesEnded(touches, event)
if action:getStartFrame() == 0 then
action:gotoFrameAndPlay(70, action:getDuration(), true)
else
action:gotoFrameAndPlay(0, 60, true)
end
end
local listener = cc.EventListenerTouchAllAtOnce:create()
listener:registerScriptHandler(onTouchesEnded,cc.Handler.EVENT_TOUCHES_ENDED )
local eventDispatcher = self:getEventDispatcher()
eventDispatcher:addEventListenerWithSceneGraphPriority(listener, self)
self:addChild(node)
end
function TestChangePlaySection.restartCallback()
ccs.ArmatureDataManager:destroyInstance()
local newScene = TimelineTestScene.create()
newScene:addChild(restartTimelineTest())
cc.Director:getInstance():replaceScene(newScene)
end
function TestChangePlaySection.create()
local layer = TestChangePlaySection.extend(cc.Layer:create())
if nil ~= layer then
layer:createMenu()
layer:createToExtensionMenu()
layer:creatTitleAndSubTitle(timelineSceneIdx)
local function onNodeEvent(event)
if "enter" == event then
layer:onEnter()
end
end
layer:registerScriptHandler(onNodeEvent)
end
return layer
end
local TestTimelineFrameEvent = class("TestTimelineFrameEvent",TimelineTestLayer)
TestTimelineFrameEvent.__index = TestTimelineFrameEvent
function TestTimelineFrameEvent.extend(target)
local t = tolua.getpeer(target)
if not t then
t = {}
tolua.setpeer(target, t)
end
setmetatable(t, TestTimelineFrameEvent)
return target
end
function TestTimelineFrameEvent:onEnter()
cc.SpriteFrameCache:getInstance():addSpriteFramesWithFile("armature/Cowboy0.plist", "armature/Cowboy0.png")
local node = ccs.NodeReader:getInstance():createNode("ActionTimeline/boy_1.ExportJson")
local action = ccs.ActionTimelineCache:getInstance():createAction("ActionTimeline/boy_1.ExportJson")
node:runAction(action)
action:gotoFrameAndPlay(0, 60, true)
node:setScale(0.2)
node:setPosition(150, 100)
self:addChild(node)
local function onFrameEvent(frame)
if nil == frame then
return
end
local str = frame:getEvent()
if str == "changeColor" then
frame:getNode():setColor(cc.c3b(0, 0, 0))
elseif(str == "endChangeColor") then
frame:getNode():setColor(cc.c3b(255,255,255))
end
end
action:setFrameEventCallFunc(onFrameEvent)
end
function TestTimelineFrameEvent.restartCallback()
ccs.ArmatureDataManager:destroyInstance()
local newScene = TimelineTestScene.create()
newScene:addChild(restartTimelineTest())
cc.Director:getInstance():replaceScene(newScene)
end
function TestTimelineFrameEvent.create()
local layer = TestTimelineFrameEvent.extend(cc.Layer:create())
if nil ~= layer then
layer:createMenu()
layer:createToExtensionMenu()
layer:creatTitleAndSubTitle(timelineSceneIdx)
local function onNodeEvent(event)
if "enter" == event then
layer:onEnter()
end
end
layer:registerScriptHandler(onNodeEvent)
end
return layer
end
local TestTimelinePerformance = class("TestTimelinePerformance",TimelineTestLayer)
TestTimelinePerformance.__index = TestTimelinePerformance
function TestTimelinePerformance.extend(target)
local t = tolua.getpeer(target)
if not t then
t = {}
tolua.setpeer(target, t)
end
setmetatable(t, TestTimelinePerformance)
return target
end
function TestTimelinePerformance:onEnter()
cc.SpriteFrameCache:getInstance():addSpriteFramesWithFile("armature/Cowboy0.plist", "armature/Cowboy0.png")
for i = 1,100 do
local node = ccs.NodeReader:getInstance():createNode("ActionTimeline/boy_1.ExportJson")
local action = ccs.ActionTimelineCache:getInstance():createAction("ActionTimeline/boy_1.ExportJson")
node:runAction(action)
action:gotoFrameAndPlay(70, action:getDuration(), true)
node:setScale(0.1)
node:setPosition((i - 1) * 2, 100)
self:addChild(node)
end
end
function TestTimelinePerformance.restartCallback()
ccs.ArmatureDataManager:destroyInstance()
local newScene = TimelineTestScene.create()
newScene:addChild(restartTimelineTest())
cc.Director:getInstance():replaceScene(newScene)
end
function TestTimelinePerformance.create()
local layer = TestTimelinePerformance.extend(cc.Layer:create())
if nil ~= layer then
layer:createMenu()
layer:createToExtensionMenu()
layer:creatTitleAndSubTitle(timelineSceneIdx)
local function onNodeEvent(event)
if "enter" == event then
layer:onEnter()
end
end
layer:registerScriptHandler(onNodeEvent)
end
return layer
end
local actionlineSceneArr =
{
TestActionTimeline.create,
TestChangePlaySection.create,
TestTimelineFrameEvent.create,
TestTimelinePerformance.create,
}
function nextTimelineTest()
timelineSceneIdx = timelineSceneIdx + 1
timelineSceneIdx = timelineSceneIdx % table.getn(actionlineSceneArr)
if 0 == timelineSceneIdx then
timelineSceneIdx = table.getn(actionlineSceneArr)
end
return actionlineSceneArr[timelineSceneIdx]()
end
function backTimelineTest()
timelineSceneIdx = timelineSceneIdx - 1
if timelineSceneIdx <= 0 then
timelineSceneIdx = timelineSceneIdx + table.getn(actionlineSceneArr)
end
return actionlineSceneArr[timelineSceneIdx]()
end
function restartTimelineTest()
return actionlineSceneArr[timelineSceneIdx]()
end
function runCocoStudioActionTimelineTestScene()
local scene = TimelineTestScene.create()
scene:runThisTest()
cc.Director:getInstance():replaceScene(scene)
end

View File

@ -2,6 +2,7 @@ require "src/CocoStudioTest/CocoStudioGUITest/CocoStudioGUITest"
require "src/CocoStudioTest/CocoStudioSceneTest/CocoStudioSceneTest"
require "src/CocoStudioTest/CocoStudioArmatureTest/CocoStudioArmatureTest"
require "src/CocoStudioTest/CocoStudioUIEditorTest/CocoStudioUIEditorTest"
require "src/CocoStudioTest/CocoStudioActionTimelineTest/CocoStudioActionTimelineTest"
local LINE_SPACE = 40
local ITEM_TAG_BASIC = 1000
@ -35,6 +36,13 @@ local cocoStudioTestItemNames =
runCocoStudioUIEditorTestScene()
end
},
{
itemTitle = "CocoStudioActionTimelineTest",
testScene = function()
runCocoStudioActionTimelineTestScene()
end
},
}
local CocoStudioTestScene = class("CocoStudioTestScene")

View File

@ -30,7 +30,7 @@ headers = %(cocosdir)s/cocos/editor-support/cocostudio/CocoStudio.h
# what classes to produce code for. You can use regular expressions here. When testing the regular
# expression, it will be enclosed in "^$", like this: "^Menu*$".
classes = Armature ArmatureAnimation Skin Bone ArmatureDataManager \w+Data$ ActionManagerEx ComAudio ComController ComAttribute ComRender BatchNode SceneReader GUIReader ActionObject Tween DisplayManager
classes = Armature ArmatureAnimation Skin Bone ArmatureDataManager \w+Data$ ActionManagerEx ComAudio ComController ComAttribute ComRender BatchNode SceneReader GUIReader ActionObject Tween DisplayManager NodeReader ActionTimeline.* .*Frame$ Timeline
# what should we skip? in the format ClassName::[function function]
# ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also
@ -52,7 +52,9 @@ skip = *::[^visit$ copyWith.* onEnter.* onExit.* ^description$ getObjectType .*
GUIReader::[storeFileDesignSize getFileDesignSize getParseCallBackMap getParseObjectMap],
ActionNode::[initWithDictionary],
ActionObject::[initWithDictionary],
BaseData::[copy subtract]
BaseData::[copy subtract],
NodeReader::[getInstance],
ActionTimelineCache::[getInstance]
rename_functions = GUIReader::[shareReader=getInstance purgeGUIReader=destroyInstance],
ActionManagerEx::[shareManager=getInstance purgeActionManager=destroyInstance],