91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

http://blog.csdn.net/ljxfblog 自寫richtext博文配套代碼。

資源截圖

代碼片段和文件信息

#include?“cocos2d.h“
#include?“tolua_fix.h“
#include?“CCLuaValue.h“
#include?“CCLuaEngine.h“
#include?“RichItem.h“
#include?“RichTextUI.h“
#include?“LuaBasicConversions.h“
#include?“LuascriptHandlerMgr.h“

USING_NS_CC;

using?namespace?ui;

int?register_extend_cocos2dx_ui_manual(lua_State*?L);

struct?LuaStudioEventListenerDataEx
{
????Ref*?objTarget;
????int?eventType;????
????LuaStudioEventListenerDataEx(Ref*?_objTarget?int?_eventType)?:?objTarget(_objTarget)eventType(_eventType){}
};

class?LuaCocoStudioEventListenerEx?:?public?Ref
{
public:
????LuaCocoStudioEventListenerEx(){}
????virtual?~LuaCocoStudioEventListenerEx(){}
????
????static?LuaCocoStudioEventListenerEx*?create();
????
????virtual?void?eventCallbackFunc(Ref*?senderint?eventType);
};

LuaCocoStudioEventListenerEx*?LuaCocoStudioEventListenerEx::create()
{
????LuaCocoStudioEventListenerEx*?listener?=?new?LuaCocoStudioEventListenerEx();
????if?(nullptr?==?listener)
????????return?nullptr;
????
????listener->autorelease();
????
????return?listener;
}

void?LuaCocoStudioEventListenerEx::eventCallbackFunc(Ref*?senderint?eventType)
{
????int?handler?=?scriptHandlerMgr::getInstance()->getobjectHandler((void*)this?scriptHandlerMgr::HandlerType::STUDIO_EVENT_LISTENER);????
????if?(0?!=?handler)
????{
????????LuaStudioEventListenerDataEx?eventData(sender?eventType);
????????BasicscriptData?data(this?(void*)&eventData);
????????LuaEngine::getInstance()->handleEvent(scriptHandlerMgr::HandlerType::STUDIO_EVENT_LISTENER?(void*)&data);
????}
}

static?int?lua_cocos2dx_RichTextUI_addEventListenerRichTextUI(lua_State*?L)
{
????if?(nullptr?==?L)
????????return?0;
????
????int?argc?=?0;
????RichTextUI*?self?=?nullptr;
????
#if?COCOS2D_DEBUG?>=?1
????tolua_Error?tolua_err;
if?(!tolua_isusertype(L1“ui::RichTextUI“0&tolua_err))?goto?tolua_lerror;
#endif
????
????self?=?static_cast(tolua_tousertype(L10));
????
#if?COCOS2D_DEBUG?>=?1
if?(nullptr?==?self)?{
tolua_error(L“invalid?‘self‘?in?function?‘lua_cocos2dx_RichTextUI_addEventListenerRichTextUI‘\n“?NULL);
return?0;
}
#endif
????argc?=?lua_gettop(L)?-?1;
????if?(1?==?argc)
????{
#if?COCOS2D_DEBUG?>=?1
????????if?(!toluafix_isfunction(L2“LUA_FUNCTION“0&tolua_err))
????????{
????????????goto?tolua_lerror;
????????}
#endif
????????LuaCocoStudioEventListenerEx*?listener?=?LuaCocoStudioEventListenerEx::create();
????????if?(nullptr?==?listener)
????????{
????????????tolua_error(L“LuaCocoStudioEventListenerEx?create?fail\n“?NULL);
????????????return?0;
????????}
????????
????????LUA_FUNCTION?handler?=?(??toluafix_ref_function(L20));
????????
????????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(

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????4870??2014-05-17?01:15??richedit\RichItem.cpp
?????文件????????3616??2014-05-17?01:09??richedit\RichItem.h
?????文件????????8100??2014-05-18?00:29??richedit\RichTextUI.cpp
?????文件????????2006??2014-05-18?00:18??richedit\RichTextUI.h
?????文件????????1219??2014-05-18?00:19??richedit\gui.pkg
?????文件????????3911??2014-05-17?01:24??richedit\lua_cocos2dx_extend_ui.cpp
?????目錄???????????0??2014-05-18?11:32??richedit\

評論

共有 條評論