mirror of https://github.com/axmolengine/axmol.git
add lua ui binding
This commit is contained in:
parent
dcc98ef79f
commit
026ef95b07
|
@ -2,197 +2,176 @@
|
|||
--------------------------------
|
||||
-- @module ScrollView
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] isClippingToBounds
|
||||
-- @function [parent=#ScrollView] scrollToTop
|
||||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] scrollToPercentHorizontal
|
||||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #float float
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] isInertiaScrollEnabled
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] setContainer
|
||||
-- @param self
|
||||
-- @param #cc.Node node
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] onTouchEnded
|
||||
-- @param self
|
||||
-- @param #cc.Touch touch
|
||||
-- @param #cc.Event event
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] setContentOffsetInDuration
|
||||
-- @function [parent=#ScrollView] scrollToPercentBothDirection
|
||||
-- @param self
|
||||
-- @param #point_table point
|
||||
-- @param #float float
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] setZoomScaleInDuration
|
||||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #float float
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] setBounceable
|
||||
-- @param self
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] getDirection
|
||||
-- @param self
|
||||
-- @return ScrollView::Direction#ScrollView::Direction ret (return value: cc.ScrollView::Direction)
|
||||
-- @return SCROLLVIEW_DIR#SCROLLVIEW_DIR ret (return value: ccui.SCROLLVIEW_DIR)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] getContainer
|
||||
-- @param self
|
||||
-- @return Node#Node ret (return value: cc.Node)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] updateTweenAction
|
||||
-- @function [parent=#ScrollView] scrollToBottomLeft
|
||||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #string str
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] getZoomScale
|
||||
-- @function [parent=#ScrollView] getInnerContainer
|
||||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
-- @return Layout#Layout ret (return value: ccui.Layout)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] updateInset
|
||||
-- @function [parent=#ScrollView] jumpToBottom
|
||||
-- @param self
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] initWithViewSize
|
||||
-- @param self
|
||||
-- @param #size_table size
|
||||
-- @param #cc.Node node
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] pause
|
||||
-- @param self
|
||||
-- @param #cc.Ref ref
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] setDirection
|
||||
-- @param self
|
||||
-- @param #cc.ScrollView::Direction direction
|
||||
-- @param #ccui.SCROLLVIEW_DIR scrollview_dir
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] init
|
||||
-- @function [parent=#ScrollView] scrollToTopLeft
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] setContentOffset
|
||||
-- @param self
|
||||
-- @param #point_table point
|
||||
-- @param #float float
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] isDragging
|
||||
-- @function [parent=#ScrollView] jumpToTopRight
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] isTouchEnabled
|
||||
-- @function [parent=#ScrollView] jumpToBottomLeft
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] isBounceable
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] setTouchEnabled
|
||||
-- @param self
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] onTouchMoved
|
||||
-- @param self
|
||||
-- @param #cc.Touch touch
|
||||
-- @param #cc.Event event
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] getContentOffset
|
||||
-- @param self
|
||||
-- @return point_table#point_table ret (return value: point_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] resume
|
||||
-- @param self
|
||||
-- @param #cc.Ref ref
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] setClippingToBounds
|
||||
-- @param self
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] setViewSize
|
||||
-- @function [parent=#ScrollView] setInnerContainerSize
|
||||
-- @param self
|
||||
-- @param #size_table size
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] onTouchCancelled
|
||||
-- @param self
|
||||
-- @param #cc.Touch touch
|
||||
-- @param #cc.Event event
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] getViewSize
|
||||
-- @function [parent=#ScrollView] getInnerContainerSize
|
||||
-- @param self
|
||||
-- @return size_table#size_table ret (return value: size_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] maxContainerOffset
|
||||
-- @param self
|
||||
-- @return point_table#point_table ret (return value: point_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] onTouchBegan
|
||||
-- @param self
|
||||
-- @param #cc.Touch touch
|
||||
-- @param #cc.Event event
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] isTouchMoved
|
||||
-- @function [parent=#ScrollView] isBounceEnabled
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] isNodeVisible
|
||||
-- @function [parent=#ScrollView] jumpToPercentVertical
|
||||
-- @param self
|
||||
-- @param #cc.Node node
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
-- @param #float float
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] minContainerOffset
|
||||
-- @function [parent=#ScrollView] setInertiaScrollEnabled
|
||||
-- @param self
|
||||
-- @return point_table#point_table ret (return value: point_table)
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- overload function: setZoomScale(float, bool)
|
||||
--
|
||||
-- overload function: setZoomScale(float)
|
||||
--
|
||||
-- @function [parent=#ScrollView] setZoomScale
|
||||
-- @function [parent=#ScrollView] jumpToTopLeft
|
||||
-- @param self
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] jumpToPercentHorizontal
|
||||
-- @param self
|
||||
-- @param #float float
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] jumpToBottomRight
|
||||
-- @param self
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] setBounceEnabled
|
||||
-- @param self
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] jumpToTop
|
||||
-- @param self
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] scrollToLeft
|
||||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #bool bool
|
||||
|
||||
|
||||
--------------------------------
|
||||
-- overload function: create()
|
||||
--
|
||||
-- overload function: create(size_table, cc.Node)
|
||||
--
|
||||
-- @function [parent=#ScrollView] create
|
||||
-- @function [parent=#ScrollView] jumpToPercentBothDirection
|
||||
-- @param self
|
||||
-- @param #size_table size
|
||||
-- @param #cc.Node node
|
||||
-- @return ScrollView#ScrollView ret (retunr value: cc.ScrollView)
|
||||
|
||||
-- @param #point_table point
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] scrollToPercentVertical
|
||||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #float float
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] scrollToBottom
|
||||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] scrollToBottomRight
|
||||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] jumpToLeft
|
||||
-- @param self
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] scrollToRight
|
||||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] jumpToRight
|
||||
-- @param self
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] scrollToTopRight
|
||||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] create
|
||||
-- @param self
|
||||
-- @return ScrollView#ScrollView ret (return value: ccui.ScrollView)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] createInstance
|
||||
-- @param self
|
||||
-- @return Ref#Ref ret (return value: cc.Ref)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ScrollView] ScrollView
|
||||
-- @param self
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
c9cf8f3050b95aec88a2452e60fe492252ad30c3
|
|
@ -0,0 +1,351 @@
|
|||
#ifndef __cocos2dx_ui_h__
|
||||
#define __cocos2dx_ui_h__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "tolua++.h"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
int register_all_cocos2dx_ui(lua_State* tolua_S);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __cocos2dx_ui_h__
|
|
@ -33,7 +33,7 @@
|
|||
#include "lua_cocos2dx_manual.hpp"
|
||||
#include "lua_cocos2dx_extension_manual.h"
|
||||
#include "lua_cocos2dx_coco_studio_manual.hpp"
|
||||
#include "lua_cocos2dx_gui_manual.hpp"
|
||||
#include "lua_cocos2dx_ui_manual.hpp"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
|
|
@ -63,8 +63,8 @@ extern "C" {
|
|||
#include "lua_cocos2dx_spine_manual.hpp"
|
||||
#include "lua_cocos2dx_physics_auto.hpp"
|
||||
#include "lua_cocos2dx_physics_manual.hpp"
|
||||
#include "lua_cocos2dx_gui_auto.hpp"
|
||||
#include "lua_cocos2dx_gui_manual.hpp"
|
||||
#include "lua_cocos2dx_ui_auto.hpp"
|
||||
#include "lua_cocos2dx_ui_manual.hpp"
|
||||
|
||||
namespace {
|
||||
int lua_print(lua_State * luastate)
|
||||
|
|
|
@ -0,0 +1,765 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
#include "lua_cocos2dx_gui_manual.hpp"
|
||||
#include "cocos2d.h"
|
||||
#include "tolua_fix.h"
|
||||
#include "LuaBasicConversions.h"
|
||||
#include "LuaScriptHandlerMgr.h"
|
||||
#include "CCLuaValue.h"
|
||||
#include "CocosGUI.h"
|
||||
#include "CCLuaEngine.h"
|
||||
|
||||
using namespace ui;
|
||||
|
||||
class LuaCocoStudioEventListener:public Ref
|
||||
{
|
||||
public:
|
||||
LuaCocoStudioEventListener();
|
||||
virtual ~LuaCocoStudioEventListener();
|
||||
|
||||
static LuaCocoStudioEventListener* create();
|
||||
|
||||
virtual void eventCallbackFunc(Ref* sender,int eventType);
|
||||
};
|
||||
|
||||
LuaCocoStudioEventListener::LuaCocoStudioEventListener()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
LuaCocoStudioEventListener::~LuaCocoStudioEventListener()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
LuaCocoStudioEventListener* LuaCocoStudioEventListener::create()
|
||||
{
|
||||
LuaCocoStudioEventListener* listener = new LuaCocoStudioEventListener();
|
||||
if (nullptr == listener)
|
||||
return nullptr;
|
||||
|
||||
listener->autorelease();
|
||||
|
||||
return listener;
|
||||
}
|
||||
|
||||
void LuaCocoStudioEventListener::eventCallbackFunc(Ref* sender,int eventType)
|
||||
{
|
||||
int handler = ScriptHandlerMgr::getInstance()->getObjectHandler((void*)this, ScriptHandlerMgr::HandlerType::STUDIO_EVENT_LISTENER);
|
||||
|
||||
if (0 != handler)
|
||||
{
|
||||
LuaStudioEventListenerData eventData(sender,eventType);
|
||||
BasicScriptData data(this,(void*)&eventData);
|
||||
LuaEngine::getInstance()->handleEvent(ScriptHandlerMgr::HandlerType::STUDIO_EVENT_LISTENER, (void*)&data);
|
||||
}
|
||||
}
|
||||
|
||||
static int lua_cocos2dx_Widget_addTouchEventListener(lua_State* L)
|
||||
{
|
||||
if (nullptr == L)
|
||||
return 0;
|
||||
|
||||
int argc = 0;
|
||||
Widget* self = nullptr;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_isusertype(L,1,"ccui.Widget",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
self = static_cast<Widget*>(tolua_tousertype(L,1,0));
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (nullptr == self) {
|
||||
tolua_error(L,"invalid 'self' in function 'lua_cocos2dx_Widget_addTouchEventListener'\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
|
||||
LuaCocoStudioEventListener* listener = LuaCocoStudioEventListener::create();
|
||||
if (nullptr == listener)
|
||||
{
|
||||
tolua_error(L,"LuaCocoStudioEventListener create fail\n", NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LUA_FUNCTION handler = ( toluafix_ref_function(L,2,0));
|
||||
|
||||
ScriptHandlerMgr::getInstance()->addObjectHandler((void*)listener, handler, ScriptHandlerMgr::HandlerType::STUDIO_EVENT_LISTENER);
|
||||
|
||||
__Dictionary* dict = static_cast<__Dictionary*>(self->getUserObject());
|
||||
if (nullptr == dict)
|
||||
{
|
||||
dict = Dictionary::create();
|
||||
self->setUserObject(dict);
|
||||
}
|
||||
dict->setObject(listener, "widgetTouchEvent");
|
||||
|
||||
self->addTouchEventListener(listener, toucheventselector(LuaCocoStudioEventListener::eventCallbackFunc));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
CCLOG("'addTouchEventListener' function of Widget has wrong number of arguments: %d, was expecting %d\n", argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'addTouchEventListener'.",&tolua_err);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void extendWidget(lua_State* L)
|
||||
{
|
||||
lua_pushstring(L, "ccui.Widget");
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
tolua_function(L, "addTouchEventListener", lua_cocos2dx_Widget_addTouchEventListener);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
static int lua_cocos2dx_CheckBox_addEventListenerCheckBox(lua_State* L)
|
||||
{
|
||||
if (nullptr == L)
|
||||
return 0;
|
||||
|
||||
int argc = 0;
|
||||
CheckBox* self = nullptr;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_isusertype(L,1,"ccui.CheckBox",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
self = static_cast<CheckBox*>(tolua_tousertype(L,1,0));
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (nullptr == self) {
|
||||
tolua_error(L,"invalid 'self' in function 'lua_cocos2dx_CheckBox_addEventListenerCheckBox'\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
|
||||
LuaCocoStudioEventListener* listener = LuaCocoStudioEventListener::create();
|
||||
if (nullptr == listener)
|
||||
{
|
||||
tolua_error(L,"LuaCocoStudioEventListener create fail\n", NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LUA_FUNCTION handler = ( toluafix_ref_function(L,2,0));
|
||||
|
||||
ScriptHandlerMgr::getInstance()->addObjectHandler((void*)listener, handler, ScriptHandlerMgr::HandlerType::STUDIO_EVENT_LISTENER);
|
||||
|
||||
__Dictionary* dict = static_cast<__Dictionary*>(self->getUserObject());
|
||||
if (nullptr == dict)
|
||||
{
|
||||
dict = Dictionary::create();
|
||||
self->setUserObject(dict);
|
||||
}
|
||||
dict->setObject(listener, "checkBoxEventListener");
|
||||
|
||||
self->addEventListenerCheckBox(listener, checkboxselectedeventselector(LuaCocoStudioEventListener::eventCallbackFunc));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
CCLOG("'addEventListenerCheckBox' function of CheckBox has wrong number of arguments: %d, was expecting %d\n", argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'addEventListenerCheckBox'.",&tolua_err);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static void extendCheckBox(lua_State* L)
|
||||
{
|
||||
lua_pushstring(L, "ccui.CheckBox");
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
tolua_function(L, "addEventListenerCheckBox", lua_cocos2dx_CheckBox_addEventListenerCheckBox);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
static int lua_cocos2dx_Slider_addEventListenerSlider(lua_State* L)
|
||||
{
|
||||
if (nullptr == L)
|
||||
return 0;
|
||||
|
||||
int argc = 0;
|
||||
Slider* self = nullptr;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_isusertype(L,1,"ccui.Slider",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
self = static_cast<Slider*>(tolua_tousertype(L,1,0));
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (nullptr == self) {
|
||||
tolua_error(L,"invalid 'self' in function 'lua_cocos2dx_Slider_addEventListenerSlider'\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
|
||||
LuaCocoStudioEventListener* listener = LuaCocoStudioEventListener::create();
|
||||
if (nullptr == listener)
|
||||
{
|
||||
tolua_error(L,"LuaCocoStudioEventListener create fail\n", NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LUA_FUNCTION handler = ( toluafix_ref_function(L,2,0));
|
||||
|
||||
ScriptHandlerMgr::getInstance()->addObjectHandler((void*)listener, handler, ScriptHandlerMgr::HandlerType::STUDIO_EVENT_LISTENER);
|
||||
|
||||
__Dictionary* dict = static_cast<__Dictionary*>(self->getUserObject());
|
||||
if (nullptr == dict)
|
||||
{
|
||||
dict = Dictionary::create();
|
||||
self->setUserObject(dict);
|
||||
}
|
||||
dict->setObject(listener, "sliderEventListener");
|
||||
|
||||
self->addEventListenerSlider(listener, sliderpercentchangedselector(LuaCocoStudioEventListener::eventCallbackFunc));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
CCLOG("'addEventListenerSlider' function of Slider has wrong number of arguments: %d, was expecting %d\n", argc, 1);
|
||||
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'addEventListenerSlider'.",&tolua_err);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void extendSlider(lua_State* L)
|
||||
{
|
||||
lua_pushstring(L, "ccui.Slider");
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
tolua_function(L, "addEventListenerSlider", lua_cocos2dx_Slider_addEventListenerSlider);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
static int lua_cocos2dx_TextField_addEventListenerTextField(lua_State* L)
|
||||
{
|
||||
if (nullptr == L)
|
||||
return 0;
|
||||
|
||||
int argc = 0;
|
||||
TextField* self = nullptr;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_isusertype(L,1,"ccui.TextField",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
self = static_cast<TextField*>(tolua_tousertype(L,1,0));
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (nullptr == self) {
|
||||
tolua_error(L,"invalid 'self' in function 'lua_cocos2dx_TextField_addEventListenerTextField'\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
|
||||
LuaCocoStudioEventListener* listener = LuaCocoStudioEventListener::create();
|
||||
if (nullptr == listener)
|
||||
{
|
||||
tolua_error(L,"LuaCocoStudioEventListener create fail\n", NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LUA_FUNCTION handler = ( toluafix_ref_function(L,2,0));
|
||||
|
||||
ScriptHandlerMgr::getInstance()->addObjectHandler((void*)listener, handler, ScriptHandlerMgr::HandlerType::STUDIO_EVENT_LISTENER);
|
||||
|
||||
__Dictionary* dict = static_cast<__Dictionary*>(self->getUserObject());
|
||||
if (nullptr == dict)
|
||||
{
|
||||
dict = Dictionary::create();
|
||||
self->setUserObject(dict);
|
||||
}
|
||||
dict->setObject(listener, "textfieldEventListener");
|
||||
|
||||
self->addEventListenerTextField(listener, textfieldeventselector(LuaCocoStudioEventListener::eventCallbackFunc));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
CCLOG("'addEventListenerTextField' function of TextField has wrong number of arguments: %d, was expecting %d\n", argc, 1);
|
||||
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'addEventListenerTextField'.",&tolua_err);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void extendTextField(lua_State* L)
|
||||
{
|
||||
lua_pushstring(L, "ccui.TextField");
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
tolua_function(L, "addEventListenerTextField", lua_cocos2dx_TextField_addEventListenerTextField);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
static int lua_cocos2dx_PageView_addEventListenerPageView(lua_State* L)
|
||||
{
|
||||
if (nullptr == L)
|
||||
return 0;
|
||||
|
||||
int argc = 0;
|
||||
PageView* self = nullptr;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_isusertype(L,1,"ccui.PageView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
self = static_cast<PageView*>(tolua_tousertype(L,1,0));
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (nullptr == self) {
|
||||
tolua_error(L,"invalid 'self' in function 'lua_cocos2dx_PageView_addEventListenerPageView'\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
|
||||
LuaCocoStudioEventListener* listener = LuaCocoStudioEventListener::create();
|
||||
if (nullptr == listener)
|
||||
{
|
||||
tolua_error(L,"LuaCocoStudioEventListener create fail\n", NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LUA_FUNCTION handler = ( toluafix_ref_function(L,2,0));
|
||||
|
||||
ScriptHandlerMgr::getInstance()->addObjectHandler((void*)listener, handler, ScriptHandlerMgr::HandlerType::STUDIO_EVENT_LISTENER);
|
||||
|
||||
__Dictionary* dict = static_cast<__Dictionary*>(self->getUserObject());
|
||||
if (nullptr == dict)
|
||||
{
|
||||
dict = Dictionary::create();
|
||||
self->setUserObject(dict);
|
||||
}
|
||||
dict->setObject(listener, "pageViewEventListener");
|
||||
|
||||
self->addEventListenerPageView(listener, pagevieweventselector(LuaCocoStudioEventListener::eventCallbackFunc));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
CCLOG("'addEventListenerPageView' function of PageView has wrong number of arguments: %d, was expecting %d\n", argc, 1);
|
||||
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'addEventListenerPageView'.",&tolua_err);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void extendPageView(lua_State* L)
|
||||
{
|
||||
lua_pushstring(L, "ccui.PageView");
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
tolua_function(L, "addEventListenerPageView", lua_cocos2dx_PageView_addEventListenerPageView);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
static int lua_cocos2dx_ScrollView_addEventListenerScrollView(lua_State* L)
|
||||
{
|
||||
if (nullptr == L)
|
||||
return 0;
|
||||
|
||||
int argc = 0;
|
||||
ScrollView* self = nullptr;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_isusertype(L,1,"ccui.ScrollView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
self = static_cast<ScrollView*>(tolua_tousertype(L,1,0));
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (nullptr == self) {
|
||||
tolua_error(L,"invalid 'self' in function 'lua_cocos2dx_ScrollView_addEventListenerScrollView'\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
|
||||
LuaCocoStudioEventListener* listener = LuaCocoStudioEventListener::create();
|
||||
if (nullptr == listener)
|
||||
{
|
||||
tolua_error(L,"LuaCocoStudioEventListener create fail\n", NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LUA_FUNCTION handler = ( toluafix_ref_function(L,2,0));
|
||||
|
||||
ScriptHandlerMgr::getInstance()->addObjectHandler((void*)listener, handler, ScriptHandlerMgr::HandlerType::STUDIO_EVENT_LISTENER);
|
||||
|
||||
__Dictionary* dict = static_cast<__Dictionary*>(self->getUserObject());
|
||||
if (nullptr == dict)
|
||||
{
|
||||
dict = Dictionary::create();
|
||||
self->setUserObject(dict);
|
||||
}
|
||||
dict->setObject(listener, "scrollViewEventListener");
|
||||
|
||||
self->addEventListenerScrollView(listener, scrollvieweventselector(LuaCocoStudioEventListener::eventCallbackFunc));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
CCLOG("'addEventListenerScrollView' function of ScrollView has wrong number of arguments: %d, was expecting %d\n", argc, 1);
|
||||
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'addEventListenerScrollView'.",&tolua_err);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void extendScrollView(lua_State* L)
|
||||
{
|
||||
lua_pushstring(L, "ccui.ScrollView");
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
tolua_function(L, "addEventListenerScrollView", lua_cocos2dx_ScrollView_addEventListenerScrollView);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
static int lua_cocos2dx_ListView_addEventListenerListView(lua_State* L)
|
||||
{
|
||||
if (nullptr == L)
|
||||
return 0;
|
||||
|
||||
int argc = 0;
|
||||
ListView* self = nullptr;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_isusertype(L,1,"ccui.ListView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
self = static_cast<ListView*>(tolua_tousertype(L,1,0));
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (nullptr == self) {
|
||||
tolua_error(L,"invalid 'self' in function 'lua_cocos2dx_ListView_addEventListenerListView'\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
|
||||
LuaCocoStudioEventListener* listener = LuaCocoStudioEventListener::create();
|
||||
if (nullptr == listener)
|
||||
{
|
||||
tolua_error(L,"LuaCocoStudioEventListener create fail\n", NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
LUA_FUNCTION handler = ( toluafix_ref_function(L,2,0));
|
||||
|
||||
ScriptHandlerMgr::getInstance()->addObjectHandler((void*)listener, handler, ScriptHandlerMgr::HandlerType::STUDIO_EVENT_LISTENER);
|
||||
|
||||
__Dictionary* dict = static_cast<__Dictionary*>(self->getUserObject());
|
||||
if (nullptr == dict)
|
||||
{
|
||||
dict = Dictionary::create();
|
||||
self->setUserObject(dict);
|
||||
}
|
||||
dict->setObject(listener, "listViewEventListener");
|
||||
|
||||
self->addEventListenerListView(listener, listvieweventselector(LuaCocoStudioEventListener::eventCallbackFunc));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
CCLOG("'addEventListenerListView' function of ListView has wrong number of arguments: %d, was expecting %d\n", argc, 1);
|
||||
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'addEventListenerListView'.",&tolua_err);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void extendListView(lua_State* L)
|
||||
{
|
||||
lua_pushstring(L, "ccui.ListView");
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
tolua_function(L, "addEventListenerListView", lua_cocos2dx_ListView_addEventListenerListView);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
static int lua_cocos2dx_LayoutParameter_setMargin(lua_State* L)
|
||||
{
|
||||
if (nullptr == L)
|
||||
return 0;
|
||||
|
||||
int argc = 0;
|
||||
LayoutParameter* self = nullptr;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_isusertype(L,1,"ccui.LayoutParameter",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
self = static_cast<LayoutParameter*>(tolua_tousertype(L,1,0));
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (nullptr == self) {
|
||||
tolua_error(L,"invalid 'self' in function 'lua_cocos2dx_LayoutParameter_setMargin'\n", NULL);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
argc = lua_gettop(L) - 1;
|
||||
|
||||
if (1 == argc)
|
||||
{
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_istable(L, 2, 0, &tolua_err))
|
||||
{
|
||||
goto tolua_lerror;
|
||||
}
|
||||
#endif
|
||||
|
||||
Margin margin;
|
||||
lua_pushstring(L, "left");
|
||||
lua_gettable(L,2);
|
||||
margin.left = lua_isnil(L,-1) ? 0 : lua_tonumber(L,-1);
|
||||
lua_pop(L,1);
|
||||
|
||||
lua_pushstring(L, "top");
|
||||
lua_gettable(L,2);
|
||||
margin.top = lua_isnil(L,-1) ? 0 : lua_tonumber(L,-1);
|
||||
lua_pop(L,1);
|
||||
|
||||
lua_pushstring(L, "right");
|
||||
lua_gettable(L,2);
|
||||
margin.right = lua_isnil(L,-1) ? 0 : lua_tonumber(L,-1);
|
||||
lua_pop(L,1);
|
||||
|
||||
lua_pushstring(L, "bottom");
|
||||
lua_gettable(L,2);
|
||||
margin.bottom = lua_isnil(L,-1) ? 0 : lua_tonumber(L,-1);
|
||||
lua_pop(L,1);
|
||||
|
||||
self->setMargin(margin);
|
||||
return 0;
|
||||
}
|
||||
|
||||
CCLOG("'setMargin' function of LayoutParameter has wrong number of arguments: %d, was expecting %d\n", argc, 1);
|
||||
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'setMargin'.",&tolua_err);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int lua_cocos2dx_LayoutParameter_getMargin(lua_State* L)
|
||||
{
|
||||
if (nullptr == L)
|
||||
return 0;
|
||||
|
||||
int argc = 0;
|
||||
LayoutParameter* self = nullptr;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_isusertype(L,1,"ccui.LayoutParameter",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
self = static_cast<LayoutParameter*>(tolua_tousertype(L,1,0));
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (nullptr == self) {
|
||||
tolua_error(L,"invalid 'self' in function 'lua_cocos2dx_LayoutParameter_getMargin'\n", NULL);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
argc = lua_gettop(L) - 1;
|
||||
|
||||
if (0 == argc)
|
||||
{
|
||||
Margin margin = self->getMargin();
|
||||
|
||||
lua_newtable(L);
|
||||
|
||||
lua_pushstring(L, "left");
|
||||
lua_pushnumber(L, (lua_Number) margin.left);
|
||||
lua_rawset(L, -3);
|
||||
|
||||
lua_pushstring(L, "top");
|
||||
lua_pushnumber(L, (lua_Number) margin.top);
|
||||
lua_rawset(L, -3);
|
||||
|
||||
lua_pushstring(L, "right");
|
||||
lua_pushnumber(L, (lua_Number) margin.right);
|
||||
lua_rawset(L, -3);
|
||||
|
||||
lua_pushstring(L, "bottom");
|
||||
lua_pushnumber(L, (lua_Number) margin.bottom);
|
||||
lua_rawset(L, -3);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
CCLOG("'getMargin' function of LayoutParameter has wrong number of arguments: %d, was expecting %d\n", argc, 0);
|
||||
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(L,"#ferror in function 'getMargin'.",&tolua_err);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void extendLayoutParameter(lua_State* L)
|
||||
{
|
||||
lua_pushstring(L, "ccui.LayoutParameter");
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
tolua_function(L, "setMargin", lua_cocos2dx_LayoutParameter_setMargin);
|
||||
tolua_function(L, "getMargin", lua_cocos2dx_LayoutParameter_getMargin);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
int register_all_cocos2dx_ui_manual(lua_State* L)
|
||||
{
|
||||
if (nullptr == L)
|
||||
return 0;
|
||||
extendWidget(L);
|
||||
extendCheckBox(L);
|
||||
extendSlider(L);
|
||||
extendTextField(L);
|
||||
extendPageView(L);
|
||||
extendScrollView(L);
|
||||
extendListView(L);
|
||||
extendLayoutParameter(L);
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2013-2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
#ifndef COCOS_SCRIPTING_LUA_BINDINGS_LUA_COCOS2DX_GUI_MANUAL_H
|
||||
#define COCOS_SCRIPTING_LUA_BINDINGS_LUA_COCOS2DX_GUI_MANUAL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "tolua++.h"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "CCRef.h"
|
||||
|
||||
TOLUA_API int register_all_cocos2dx_ui_manual(lua_State* L);
|
||||
|
||||
struct LuaStudioEventListenerData
|
||||
{
|
||||
cocos2d::Ref* objTarget;
|
||||
int eventType;
|
||||
|
||||
LuaStudioEventListenerData(cocos2d::Ref* _objTarget, int _eventType):objTarget(_objTarget),eventType(_eventType)
|
||||
{
|
||||
}
|
||||
};
|
||||
#endif // #ifndef COCOS_SCRIPTING_LUA_BINDINGS_LUA_COCOS2DX_GUI_MANUAL_H
|
|
@ -17,10 +17,6 @@
|
|||
1AACE7BC18BC45C200215002 /* lua_cocos2dx_extension_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE74C18BC45C200215002 /* lua_cocos2dx_extension_auto.cpp */; };
|
||||
1AACE7BD18BC45C200215002 /* lua_cocos2dx_extension_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1AACE74D18BC45C200215002 /* lua_cocos2dx_extension_auto.hpp */; };
|
||||
1AACE7BE18BC45C200215002 /* lua_cocos2dx_extension_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1AACE74D18BC45C200215002 /* lua_cocos2dx_extension_auto.hpp */; };
|
||||
1AACE7C118BC45C200215002 /* lua_cocos2dx_gui_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE74F18BC45C200215002 /* lua_cocos2dx_gui_auto.cpp */; };
|
||||
1AACE7C218BC45C200215002 /* lua_cocos2dx_gui_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE74F18BC45C200215002 /* lua_cocos2dx_gui_auto.cpp */; };
|
||||
1AACE7C318BC45C200215002 /* lua_cocos2dx_gui_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1AACE75018BC45C200215002 /* lua_cocos2dx_gui_auto.hpp */; };
|
||||
1AACE7C418BC45C200215002 /* lua_cocos2dx_gui_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1AACE75018BC45C200215002 /* lua_cocos2dx_gui_auto.hpp */; };
|
||||
1AACE7C718BC45C200215002 /* lua_cocos2dx_physics_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE75218BC45C200215002 /* lua_cocos2dx_physics_auto.cpp */; };
|
||||
1AACE7C818BC45C200215002 /* lua_cocos2dx_physics_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE75218BC45C200215002 /* lua_cocos2dx_physics_auto.cpp */; };
|
||||
1AACE7C918BC45C200215002 /* lua_cocos2dx_physics_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1AACE75318BC45C200215002 /* lua_cocos2dx_physics_auto.hpp */; };
|
||||
|
@ -69,10 +65,6 @@
|
|||
1AACE7FA18BC45C200215002 /* lua_cocos2dx_extension_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE76E18BC45C200215002 /* lua_cocos2dx_extension_manual.cpp */; };
|
||||
1AACE7FB18BC45C200215002 /* lua_cocos2dx_extension_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AACE76F18BC45C200215002 /* lua_cocos2dx_extension_manual.h */; };
|
||||
1AACE7FC18BC45C200215002 /* lua_cocos2dx_extension_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AACE76F18BC45C200215002 /* lua_cocos2dx_extension_manual.h */; };
|
||||
1AACE7FD18BC45C200215002 /* lua_cocos2dx_gui_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE77018BC45C200215002 /* lua_cocos2dx_gui_manual.cpp */; };
|
||||
1AACE7FE18BC45C200215002 /* lua_cocos2dx_gui_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE77018BC45C200215002 /* lua_cocos2dx_gui_manual.cpp */; };
|
||||
1AACE7FF18BC45C200215002 /* lua_cocos2dx_gui_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1AACE77118BC45C200215002 /* lua_cocos2dx_gui_manual.hpp */; };
|
||||
1AACE80018BC45C200215002 /* lua_cocos2dx_gui_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1AACE77118BC45C200215002 /* lua_cocos2dx_gui_manual.hpp */; };
|
||||
1AACE80118BC45C200215002 /* lua_cocos2dx_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE77218BC45C200215002 /* lua_cocos2dx_manual.cpp */; };
|
||||
1AACE80218BC45C200215002 /* lua_cocos2dx_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AACE77218BC45C200215002 /* lua_cocos2dx_manual.cpp */; };
|
||||
1AACE80318BC45C200215002 /* lua_cocos2dx_manual.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 1AACE77318BC45C200215002 /* lua_cocos2dx_manual.hpp */; };
|
||||
|
@ -207,6 +199,10 @@
|
|||
1ABCA26F18CD8F7D0087CE3A /* usocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABCA22E18CD8F7D0087CE3A /* usocket.h */; };
|
||||
1ABCA27018CD8F7D0087CE3A /* usocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABCA22E18CD8F7D0087CE3A /* usocket.h */; };
|
||||
1ABCA36318CD9D7F0087CE3A /* libluajit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1ABCA1F618CD8F5F0087CE3A /* libluajit.a */; };
|
||||
2905FAD018CF12E600240AA3 /* lua_cocos2dx_ui_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FACE18CF12E600240AA3 /* lua_cocos2dx_ui_auto.cpp */; };
|
||||
2905FAD118CF12E600240AA3 /* lua_cocos2dx_ui_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FACE18CF12E600240AA3 /* lua_cocos2dx_ui_auto.cpp */; };
|
||||
2905FAD218CF12E600240AA3 /* lua_cocos2dx_ui_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 2905FACF18CF12E600240AA3 /* lua_cocos2dx_ui_auto.hpp */; };
|
||||
2905FAD318CF12E600240AA3 /* lua_cocos2dx_ui_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 2905FACF18CF12E600240AA3 /* lua_cocos2dx_ui_auto.hpp */; };
|
||||
C0FEF4D618BE0E70001F446C /* lua_debugger.c in Sources */ = {isa = PBXBuildFile; fileRef = C0FEF4D418BE0E70001F446C /* lua_debugger.c */; };
|
||||
C0FEF4D718BE0E70001F446C /* lua_debugger.c in Sources */ = {isa = PBXBuildFile; fileRef = C0FEF4D418BE0E70001F446C /* lua_debugger.c */; };
|
||||
C0FEF4D818BE0E70001F446C /* lua_debugger.h in Headers */ = {isa = PBXBuildFile; fileRef = C0FEF4D518BE0E70001F446C /* lua_debugger.h */; };
|
||||
|
@ -221,8 +217,6 @@
|
|||
1AACE74A18BC45C200215002 /* lua_cocos2dx_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_auto.hpp; sourceTree = "<group>"; };
|
||||
1AACE74C18BC45C200215002 /* lua_cocos2dx_extension_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_extension_auto.cpp; sourceTree = "<group>"; };
|
||||
1AACE74D18BC45C200215002 /* lua_cocos2dx_extension_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_extension_auto.hpp; sourceTree = "<group>"; };
|
||||
1AACE74F18BC45C200215002 /* lua_cocos2dx_gui_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_gui_auto.cpp; sourceTree = "<group>"; };
|
||||
1AACE75018BC45C200215002 /* lua_cocos2dx_gui_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_gui_auto.hpp; sourceTree = "<group>"; };
|
||||
1AACE75218BC45C200215002 /* lua_cocos2dx_physics_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_physics_auto.cpp; sourceTree = "<group>"; };
|
||||
1AACE75318BC45C200215002 /* lua_cocos2dx_physics_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_physics_auto.hpp; sourceTree = "<group>"; };
|
||||
1AACE75518BC45C200215002 /* lua_cocos2dx_spine_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_spine_auto.cpp; sourceTree = "<group>"; };
|
||||
|
@ -247,8 +241,6 @@
|
|||
1AACE76D18BC45C200215002 /* lua_cocos2dx_deprecated.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lua_cocos2dx_deprecated.h; sourceTree = "<group>"; };
|
||||
1AACE76E18BC45C200215002 /* lua_cocos2dx_extension_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_extension_manual.cpp; sourceTree = "<group>"; };
|
||||
1AACE76F18BC45C200215002 /* lua_cocos2dx_extension_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lua_cocos2dx_extension_manual.h; sourceTree = "<group>"; };
|
||||
1AACE77018BC45C200215002 /* lua_cocos2dx_gui_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_gui_manual.cpp; sourceTree = "<group>"; };
|
||||
1AACE77118BC45C200215002 /* lua_cocos2dx_gui_manual.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_gui_manual.hpp; sourceTree = "<group>"; };
|
||||
1AACE77218BC45C200215002 /* lua_cocos2dx_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_manual.cpp; sourceTree = "<group>"; };
|
||||
1AACE77318BC45C200215002 /* lua_cocos2dx_manual.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_manual.hpp; sourceTree = "<group>"; };
|
||||
1AACE77418BC45C200215002 /* lua_cocos2dx_physics_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_physics_manual.cpp; sourceTree = "<group>"; };
|
||||
|
@ -317,6 +309,8 @@
|
|||
1ABCA22C18CD8F7D0087CE3A /* unix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unix.h; sourceTree = "<group>"; };
|
||||
1ABCA22D18CD8F7D0087CE3A /* usocket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = usocket.c; sourceTree = "<group>"; };
|
||||
1ABCA22E18CD8F7D0087CE3A /* usocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = usocket.h; sourceTree = "<group>"; };
|
||||
2905FACE18CF12E600240AA3 /* lua_cocos2dx_ui_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_ui_auto.cpp; sourceTree = "<group>"; };
|
||||
2905FACF18CF12E600240AA3 /* lua_cocos2dx_ui_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_ui_auto.hpp; sourceTree = "<group>"; };
|
||||
C0FEF4D418BE0E70001F446C /* lua_debugger.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lua_debugger.c; sourceTree = "<group>"; };
|
||||
C0FEF4D518BE0E70001F446C /* lua_debugger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lua_debugger.h; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
@ -355,12 +349,12 @@
|
|||
1AACE74818BC45C200215002 /* auto */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2905FACE18CF12E600240AA3 /* lua_cocos2dx_ui_auto.cpp */,
|
||||
2905FACF18CF12E600240AA3 /* lua_cocos2dx_ui_auto.hpp */,
|
||||
1AACE74918BC45C200215002 /* lua_cocos2dx_auto.cpp */,
|
||||
1AACE74A18BC45C200215002 /* lua_cocos2dx_auto.hpp */,
|
||||
1AACE74C18BC45C200215002 /* lua_cocos2dx_extension_auto.cpp */,
|
||||
1AACE74D18BC45C200215002 /* lua_cocos2dx_extension_auto.hpp */,
|
||||
1AACE74F18BC45C200215002 /* lua_cocos2dx_gui_auto.cpp */,
|
||||
1AACE75018BC45C200215002 /* lua_cocos2dx_gui_auto.hpp */,
|
||||
1AACE75218BC45C200215002 /* lua_cocos2dx_physics_auto.cpp */,
|
||||
1AACE75318BC45C200215002 /* lua_cocos2dx_physics_auto.hpp */,
|
||||
1AACE75518BC45C200215002 /* lua_cocos2dx_spine_auto.cpp */,
|
||||
|
@ -395,8 +389,6 @@
|
|||
1AACE76D18BC45C200215002 /* lua_cocos2dx_deprecated.h */,
|
||||
1AACE76E18BC45C200215002 /* lua_cocos2dx_extension_manual.cpp */,
|
||||
1AACE76F18BC45C200215002 /* lua_cocos2dx_extension_manual.h */,
|
||||
1AACE77018BC45C200215002 /* lua_cocos2dx_gui_manual.cpp */,
|
||||
1AACE77118BC45C200215002 /* lua_cocos2dx_gui_manual.hpp */,
|
||||
1AACE77218BC45C200215002 /* lua_cocos2dx_manual.cpp */,
|
||||
1AACE77318BC45C200215002 /* lua_cocos2dx_manual.hpp */,
|
||||
1AACE77418BC45C200215002 /* lua_cocos2dx_physics_manual.cpp */,
|
||||
|
@ -581,10 +573,9 @@
|
|||
1ABCA24418CD8F7D0087CE3A /* luasocket_buffer.h in Headers */,
|
||||
1AACE82418BC45C200215002 /* LuaScriptHandlerMgr.h in Headers */,
|
||||
1AACE7FC18BC45C200215002 /* lua_cocos2dx_extension_manual.h in Headers */,
|
||||
1AACE80018BC45C200215002 /* lua_cocos2dx_gui_manual.hpp in Headers */,
|
||||
2905FAD318CF12E600240AA3 /* lua_cocos2dx_ui_auto.hpp in Headers */,
|
||||
1AACE7EC18BC45C200215002 /* CCLuaValue.h in Headers */,
|
||||
1AACE80C18BC45C200215002 /* lua_cocos2dx_spine_manual.hpp in Headers */,
|
||||
1AACE7C418BC45C200215002 /* lua_cocos2dx_gui_auto.hpp in Headers */,
|
||||
1ABCA25018CD8F7D0087CE3A /* options.h in Headers */,
|
||||
1ABCA1F118CD8F470087CE3A /* lualib.h in Headers */,
|
||||
1ABCA20318CD8F6E0087CE3A /* tolua_event.h in Headers */,
|
||||
|
@ -639,10 +630,9 @@
|
|||
1ABCA24318CD8F7D0087CE3A /* luasocket_buffer.h in Headers */,
|
||||
1AACE82318BC45C200215002 /* LuaScriptHandlerMgr.h in Headers */,
|
||||
1AACE7FB18BC45C200215002 /* lua_cocos2dx_extension_manual.h in Headers */,
|
||||
1AACE7FF18BC45C200215002 /* lua_cocos2dx_gui_manual.hpp in Headers */,
|
||||
2905FAD218CF12E600240AA3 /* lua_cocos2dx_ui_auto.hpp in Headers */,
|
||||
1AACE7EB18BC45C200215002 /* CCLuaValue.h in Headers */,
|
||||
1AACE80B18BC45C200215002 /* lua_cocos2dx_spine_manual.hpp in Headers */,
|
||||
1AACE7C318BC45C200215002 /* lua_cocos2dx_gui_auto.hpp in Headers */,
|
||||
1ABCA24F18CD8F7D0087CE3A /* options.h in Headers */,
|
||||
1ABCA1F018CD8F470087CE3A /* lualib.h in Headers */,
|
||||
1ABCA20218CD8F6E0087CE3A /* tolua_event.h in Headers */,
|
||||
|
@ -741,7 +731,6 @@
|
|||
1ABCA24E18CD8F7D0087CE3A /* options.c in Sources */,
|
||||
1A262AB918BEEF5900D2DB92 /* tolua_fix.cpp in Sources */,
|
||||
1AACE81E18BC45C200215002 /* LuaOpengl.cpp in Sources */,
|
||||
1AACE7C218BC45C200215002 /* lua_cocos2dx_gui_auto.cpp in Sources */,
|
||||
1AACE7CE18BC45C200215002 /* lua_cocos2dx_spine_auto.cpp in Sources */,
|
||||
1AACE80218BC45C200215002 /* lua_cocos2dx_manual.cpp in Sources */,
|
||||
1ABCA24618CD8F7D0087CE3A /* luasocket_io.c in Sources */,
|
||||
|
@ -769,6 +758,7 @@
|
|||
1AACE7DA18BC45C200215002 /* CCBProxy.cpp in Sources */,
|
||||
1AACE81618BC45C200215002 /* lua_xml_http_request.cpp in Sources */,
|
||||
1ABCA23A18CD8F7D0087CE3A /* inet.c in Sources */,
|
||||
2905FAD118CF12E600240AA3 /* lua_cocos2dx_ui_auto.cpp in Sources */,
|
||||
1AACE7E218BC45C200215002 /* CCLuaEngine.cpp in Sources */,
|
||||
1ABCA26E18CD8F7D0087CE3A /* usocket.c in Sources */,
|
||||
1AACE81218BC45C200215002 /* Lua_web_socket.cpp in Sources */,
|
||||
|
@ -783,7 +773,6 @@
|
|||
1ABCA20718CD8F6E0087CE3A /* tolua_map.c in Sources */,
|
||||
1ABCA25618CD8F7D0087CE3A /* serial.c in Sources */,
|
||||
1ABCA20B18CD8F6E0087CE3A /* tolua_to.c in Sources */,
|
||||
1AACE7FE18BC45C200215002 /* lua_cocos2dx_gui_manual.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -798,7 +787,6 @@
|
|||
1ABCA24D18CD8F7D0087CE3A /* options.c in Sources */,
|
||||
1A262AB818BEEF5900D2DB92 /* tolua_fix.cpp in Sources */,
|
||||
1AACE81D18BC45C200215002 /* LuaOpengl.cpp in Sources */,
|
||||
1AACE7C118BC45C200215002 /* lua_cocos2dx_gui_auto.cpp in Sources */,
|
||||
1AACE7CD18BC45C200215002 /* lua_cocos2dx_spine_auto.cpp in Sources */,
|
||||
1AACE80118BC45C200215002 /* lua_cocos2dx_manual.cpp in Sources */,
|
||||
1ABCA24518CD8F7D0087CE3A /* luasocket_io.c in Sources */,
|
||||
|
@ -826,6 +814,7 @@
|
|||
1AACE7D918BC45C200215002 /* CCBProxy.cpp in Sources */,
|
||||
1AACE81518BC45C200215002 /* lua_xml_http_request.cpp in Sources */,
|
||||
1ABCA23918CD8F7D0087CE3A /* inet.c in Sources */,
|
||||
2905FAD018CF12E600240AA3 /* lua_cocos2dx_ui_auto.cpp in Sources */,
|
||||
1AACE7E118BC45C200215002 /* CCLuaEngine.cpp in Sources */,
|
||||
1ABCA26D18CD8F7D0087CE3A /* usocket.c in Sources */,
|
||||
1AACE81118BC45C200215002 /* Lua_web_socket.cpp in Sources */,
|
||||
|
@ -840,7 +829,6 @@
|
|||
1ABCA20618CD8F6E0087CE3A /* tolua_map.c in Sources */,
|
||||
1ABCA25518CD8F7D0087CE3A /* serial.c in Sources */,
|
||||
1ABCA20A18CD8F6E0087CE3A /* tolua_to.c in Sources */,
|
||||
1AACE7FD18BC45C200215002 /* lua_cocos2dx_gui_manual.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[cocos2dx_gui]
|
||||
[cocos2dx_ui]
|
||||
# the prefix to be added to the generated functions. You might or might not use this in your own
|
||||
# templates
|
||||
prefix = cocos2dx_ui
|
||||
|
@ -16,7 +16,7 @@ android_flags = -D_SIZE_T_DEFINED_
|
|||
clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include
|
||||
clang_flags = -nostdinc -x c++ -std=c++11
|
||||
|
||||
cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/2d -I%(cocosdir)s/cocos/base -I%(cocosdir)s/cocos/gui -I%(cocosdir)s/cocos/physics -I%(cocosdir)s/cocos/2d/platform -I%(cocosdir)s/cocos/2d/platform/android -I%(cocosdir)s/cocos/math/kazmath -I%(cocosdir)s/extensions -I%(cocosdir)s/external -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s
|
||||
cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/2d -I%(cocosdir)s/cocos/base -I%(cocosdir)s/cocos/ui -I%(cocosdir)s/cocos/physics -I%(cocosdir)s/cocos/2d/platform -I%(cocosdir)s/cocos/2d/platform/android -I%(cocosdir)s/cocos/math/kazmath -I%(cocosdir)s/extensions -I%(cocosdir)s/external -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s
|
||||
|
||||
cocos_flags = -DANDROID -DCOCOS2D_JAVASCRIPT
|
||||
|
||||
|
@ -26,7 +26,7 @@ cxxgenerator_headers =
|
|||
extra_arguments = %(android_headers)s %(clang_headers)s %(cxxgenerator_headers)s %(cocos_headers)s %(android_flags)s %(clang_flags)s %(cocos_flags)s %(extra_flags)s
|
||||
|
||||
# what headers to parse
|
||||
headers = %(cocosdir)s/cocos/gui/CocosGUI.h
|
||||
headers = %(cocosdir)s/cocos/ui/CocosGUI.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*$".
|
||||
|
|
Loading…
Reference in New Issue