当前位置: 首页>>代码示例>>C++>>正文


C++ MOAILuaState::SetField方法代码示例

本文整理汇总了C++中MOAILuaState::SetField方法的典型用法代码示例。如果您正苦于以下问题:C++ MOAILuaState::SetField方法的具体用法?C++ MOAILuaState::SetField怎么用?C++ MOAILuaState::SetField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MOAILuaState的用法示例。


在下文中一共展示了MOAILuaState::SetField方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: RegisterLuaClass

//----------------------------------------------------------------//
void MOAIFacebookAndroid::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "DIALOG_DID_COMPLETE",		( u32 ) DIALOG_DID_COMPLETE );
	state.SetField ( -1, "DIALOG_DID_NOT_COMPLETE",	( u32 ) DIALOG_DID_NOT_COMPLETE );
	state.SetField ( -1, "SESSION_DID_LOGIN",		( u32 ) SESSION_DID_LOGIN );
	state.SetField ( -1, "SESSION_DID_NOT_LOGIN",	( u32 ) SESSION_DID_NOT_LOGIN );
	
	luaL_Reg regTable [] = {
		{ "getExpirationDate", _getExpirationDate },	
		{ "getToken",		_getToken },
		{ "graphRequest",	_graphRequest },
		{ "init",			_init },
		{ "login",			_login },
		{ "logout",			_logout },
		{ "postToFeed",		_postToFeed },
		{ "sendRequest",	_sendRequest },
		{ "sessionValid",	_sessionValid },
		{ "setListener",	_setListener },
		{ "setToken",		_setToken },
		{ "extendToken",	_extendToken },
		{ "setExpirationDate", _setExpirationDate },		
		{ NULL, NULL }
	};

	luaL_register ( state, 0, regTable );
}
开发者ID:flimshaw,项目名称:moai-dev,代码行数:27,代码来源:MOAIFacebookAndroid.cpp

示例2: RegisterLuaClass

//----------------------------------------------------------------//
void MOAIApp::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "PAYMENT_QUEUE_TRANSACTION",	( u32 )PAYMENT_QUEUE_TRANSACTION );
	state.SetField ( -1, "PAYMENT_QUEUE_ERROR",			( u32 )PAYMENT_QUEUE_ERROR );
	state.SetField ( -1, "PRODUCT_REQUEST_RESPONSE",	( u32 )PRODUCT_REQUEST_RESPONSE );
	
	state.SetField ( -1, "DOMAIN_DOCUMENTS",			( u32 )DOMAIN_DOCUMENTS );
	state.SetField ( -1, "DOMAIN_APP_SUPPORT",			( u32 )DOMAIN_APP_SUPPORT );

	state.SetField ( -1, "TRANSACTION_STATE_PURCHASING",( u32 )TRANSACTION_STATE_PURCHASING );
	state.SetField ( -1, "TRANSACTION_STATE_PURCHASED", ( u32 )TRANSACTION_STATE_PURCHASED );
	state.SetField ( -1, "TRANSACTION_STATE_FAILED",    ( u32 )TRANSACTION_STATE_FAILED );
	state.SetField ( -1, "TRANSACTION_STATE_RESTORED",  ( u32 )TRANSACTION_STATE_RESTORED );
	state.SetField ( -1, "TRANSACTION_STATE_CANCELLED", ( u32 )TRANSACTION_STATE_CANCELLED );
	
	luaL_Reg regTable[] = {
		{ "alert",								_alert },

		{ "canMakePayments",					_canMakePayments },
		{ "restoreCompletedTransactions",		_restoreCompletedTransactions },
		{ "requestPaymentForProduct",			_requestPaymentForProduct },
		{ "requestProductIdentifiers",			_requestProductIdentifiers },

		{ "setListener",						_setListener },
		{ "getDirectoryInDomain",				_getDirectoryInDomain },
		{ "openURL",							_openURL },
		{ "openURLPOP",							_openURLPOP },
		{ NULL, NULL }
	};

	luaL_register( state, 0, regTable );
}
开发者ID:Heyzap,项目名称:moai-dev,代码行数:33,代码来源:MOAIApp.cpp

示例3: RegisterLuaClass

//----------------------------------------------------------------//
void MOAIParticleForce::RegisterLuaClass ( MOAILuaState& state ) {

	this->MOAITransform::RegisterLuaClass ( state );
	
	state.SetField ( -1, "FORCE", ( u32 )FORCE );
	state.SetField ( -1, "GRAVITY", ( u32 )GRAVITY );
	state.SetField ( -1, "OFFSET", ( u32 )OFFSET );
}
开发者ID:LionK1tty,项目名称:moai-dev,代码行数:9,代码来源:MOAIParticleForce.cpp

示例4: RegisterLuaClass

//----------------------------------------------------------------//
void MOAIVertexFormat::RegisterLuaClass ( MOAILuaState& state ) {
	
	state.SetField ( -1, "GL_BYTE", ( u32 )ZGL_TYPE_BYTE );
	//state.SetField ( -1, "GL_FIXED", ( u32 )GL_FIXED );
	state.SetField ( -1, "GL_FLOAT", ( u32 )ZGL_TYPE_FLOAT );
	state.SetField ( -1, "GL_SHORT", ( u32 )ZGL_TYPE_SHORT );
	state.SetField ( -1, "GL_UNSIGNED_BYTE", ( u32 )ZGL_TYPE_UNSIGNED_BYTE );
	state.SetField ( -1, "GL_UNSIGNED_SHORT", ( u32 )ZGL_TYPE_UNSIGNED_SHORT );
}
开发者ID:Heyzap,项目名称:moai-dev,代码行数:10,代码来源:MOAIVertexFormat.cpp

示例5: RegisterLuaClass

//----------------------------------------------------------------//
void MOAIAnimCurve::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "ATTR_TIME", MOAIAnimCurveAttr::Pack ( ATTR_TIME ));
	state.SetField ( -1, "ATTR_VALUE", MOAIAnimCurveAttr::Pack ( ATTR_VALUE ));

	state.SetField ( -1, "CLAMP", ( u32 ) CLAMP );
	state.SetField ( -1, "WRAP", ( u32 ) WRAP );
	state.SetField ( -1, "MIRROR", ( u32 ) MIRROR );
	state.SetField ( -1, "APPEND", ( u32 ) APPEND );
}
开发者ID:leonlee,项目名称:moai-1.1-build-2,代码行数:11,代码来源:MOAIAnimCurve.cpp

示例6: SerializeOut

//----------------------------------------------------------------//
void MOAIGlyph::SerializeOut ( MOAILuaState& state ) {

    state.SetField ( -1, "mCode", this->mCode );
    state.SetField ( -1, "mPageID", this->mPageID );

    state.SetField ( -1, "mWidth", this->mWidth );
    state.SetField ( -1, "mHeight", this->mHeight );
    state.SetField ( -1, "mAdvanceX", this->mAdvanceX );
    state.SetField ( -1, "mBearingX", this->mBearingX );
    state.SetField ( -1, "mBearingY", this->mBearingY );

    state.SetField ( -1, "mSrcX", this->mSrcX );
    state.SetField ( -1, "mSrcY", this->mSrcY );

    if ( this->mKernTable.Size ()) {
        lua_newtable ( state );
        for ( u32 i = 0; i < this->mKernTable.Size (); ++i ) {

            lua_pushnumber ( state, i + 1 );
            lua_newtable ( state );

            state.SetField ( -1, "mName", this->mKernTable [ i ].mName );
            state.SetField ( -1, "mX", this->mKernTable [ i ].mX );
            state.SetField ( -1, "mY", this->mKernTable [ i ].mY );

            lua_settable ( state, -3 );
        }
        lua_setfield ( state, -2, "mKernTable" );
    }
}
开发者ID:,项目名称:,代码行数:31,代码来源:

示例7: RegisterLuaClass

//----------------------------------------------------------------//
void MOAITstoreGamecenterAndroid::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "AUTH_RESPONSE_SUCCESS",		( u32 )AUTH_RESPONSE_SUCCESS );
	state.SetField ( -1, "AUTH_RESPONSE_EXITED",		( u32 )AUTH_RESPONSE_EXITED );
	state.SetField ( -1, "DISABLE_GAMECENTER_RESPONSE",	( u32 )DISABLE_GAMECENTER_RESPONSE );
	state.SetField ( -1, "GET_RANKLIST_RESPONSE",		( u32 )GET_RANKLIST_RESPONSE );
	state.SetField ( -1, "SET_POINT_RESPONSE",			( u32 )SET_POINT_RESPONSE );
	state.SetField ( -1, "GET_USERINFO_RESPONSE",		( u32 )GET_USERINFO_RESPONSE );

	state.SetField ( -1, "GAMECENTER_INSTALLED",		( u32 )GAMECENTER_INSTALLED );
	state.SetField ( -1, "GAMECENTER_UPGRADING",		( u32 )GAMECENTER_UPGRADING );
	state.SetField ( -1, "GAMECENTER_NOT_INSTALLED",	( u32 )GAMECENTER_NOT_INSTALLED );

	luaL_Reg regTable [] = {
		{ "openGallery",				_openGallery },
		{ "getUserInfo",				_getUserInfo },
		{ "setUserInfo",				_setUserInfo },
		{ "authTstore",					_authTstore	},
		{ "checkTstoreInstalled",		_checkTstoreInstalled },
		{ "disableGamecenter",  	    _disableGamecenter },
		{ "enableGamecenter",      		_enableGamecenter },
		{ "getRankList",     			_getRankList },
		{ "installGamecenter",      	_installGamecenter },
		{ "installTstore",      		_installTstore },
		{ "invokeTstoreJoinPage",  		_invokeTstoreJoinPage },
		{ "setListener",      			_setListener },
		{ "setPoint",      				_setPoint },
		{ "startGamecenter",      		_startGamecenter },
		{ NULL, NULL }
	};

	luaL_register ( state, 0, regTable );
}
开发者ID:Limingming2,项目名称:meyume-moai-1-6,代码行数:34,代码来源:MOAITstoreGamecenterAndroid.cpp

示例8: RegisterLuaClass

//----------------------------------------------------------------//
void MOAIEnvironment::RegisterLuaClass ( MOAILuaState& state ) {
	MOAIGlobalEventSource::RegisterLuaClass ( state );

	state.SetField ( -1, "EVENT_VALUE_CHANGED", ( u32 )EVENT_VALUE_CHANGED );

	state.SetField ( -1, "CONNECTION_TYPE_NONE", ( u32 )CONNECTION_TYPE_NONE );
	state.SetField ( -1, "CONNECTION_TYPE_WIFI", ( u32 )CONNECTION_TYPE_WIFI );
	state.SetField ( -1, "CONNECTION_TYPE_WWAN", ( u32 )CONNECTION_TYPE_WWAN );
	
	state.SetField ( -1, "OS_BRAND_ANDROID", OS_BRAND_ANDROID );
	state.SetField ( -1, "OS_BRAND_IOS", OS_BRAND_IOS );
	state.SetField ( -1, "OS_BRAND_OSX", OS_BRAND_OSX );
	state.SetField ( -1, "OS_BRAND_LINUX", OS_BRAND_LINUX );
	state.SetField ( -1, "OS_BRAND_WINDOWS", OS_BRAND_WINDOWS );
	state.SetField ( -1, "OS_BRAND_UNAVAILABLE", OS_BRAND_UNAVAILABLE );

	luaL_Reg regTable [] = {
		{ "generateGUID",		_generateGUID },
		{ "getListener",		&MOAIGlobalEventSource::_getListener < MOAIEnvironment > },
		{ "getMACAddress",		_getMACAddress },
		{ "setListener",		&MOAIGlobalEventSource::_setListener < MOAIEnvironment > },
		{ "setValue",			_setValue },
		{ NULL, NULL }
	};

	luaL_register( state, 0, regTable );
}
开发者ID:Chenhx,项目名称:moai-dev,代码行数:28,代码来源:MOAIEnvironment.cpp

示例9: RegisterLuaClass

//----------------------------------------------------------------//
void MOAIDialogAndroid::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "DIALOG_RESULT_POSITIVE",	( u32 )DIALOG_RESULT_POSITIVE );
	state.SetField ( -1, "DIALOG_RESULT_NEUTRAL",	( u32 )DIALOG_RESULT_NEUTRAL );
	state.SetField ( -1, "DIALOG_RESULT_NEGATIVE",	( u32 )DIALOG_RESULT_NEGATIVE );
	state.SetField ( -1, "DIALOG_RESULT_CANCEL",	( u32 )DIALOG_RESULT_CANCEL );

	luaL_Reg regTable [] = {
		{ "showDialog",	_showDialog },
		{ NULL, NULL }
	};

	luaL_register ( state, 0, regTable );
}
开发者ID:LionK1tty,项目名称:moai-dev,代码行数:15,代码来源:MOAIDialogAndroid.cpp

示例10: RegisterLuaClass

//----------------------------------------------------------------//
void MOAIChartBoostAndroid::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "INTERSTITIAL_LOAD_FAILED",	( u32 )INTERSTITIAL_LOAD_FAILED );
	state.SetField ( -1, "INTERSTITIAL_DISMISSED", 		( u32 )INTERSTITIAL_DISMISSED );

	luaL_Reg regTable [] = {
		{ "init",				_init },
		{ "loadInterstitial",	_loadInterstitial },
		{ "setListener",		_setListener },
		{ "showInterstitial",	_showInterstitial },
		{ NULL, NULL }
	};

	luaL_register ( state, 0, regTable );
}
开发者ID:LionK1tty,项目名称:moai-dev,代码行数:16,代码来源:MOAIChartBoostAndroid.cpp

示例11:

//----------------------------------------------------------------//
void MOAIGfxQuad2D::RegisterLuaClass ( MOAILuaState& state ) {

	this->MOAIDeck2D::RegisterLuaClass ( state );
	
	state.SetField ( -1, "FILTER_POINT", ( u32 )GL_NEAREST );
	state.SetField ( -1, "FILTER_BILERP", ( u32 )GL_LINEAR );
}
开发者ID:SimonRen,项目名称:moai-beta,代码行数:8,代码来源:MOAIGfxQuad2D.cpp

示例12: RegisterLuaClass

//----------------------------------------------------------------//
void MOAIDebugLines::RegisterLuaClass ( MOAILuaState& state ) {

	luaL_Reg regTable[] = {
		{ "setStyle",			_setStyle },
		{ "showStyle",			_showStyle },
		{ NULL, NULL }
	};

	luaL_register( state, 0, regTable );
	
	state.SetField ( -1, "PARTITION_CELLS",			( u32 )PARTITION_CELLS );
	state.SetField ( -1, "PARTITION_PADDED_CELLS",	( u32 )PARTITION_PADDED_CELLS );
	state.SetField ( -1, "PROP_MODEL_BOUNDS",		( u32 )PROP_MODEL_BOUNDS );
	state.SetField ( -1, "PROP_WORLD_BOUNDS",		( u32 )PROP_WORLD_BOUNDS );
	state.SetField ( -1, "TEXT_BOX",				( u32 )TEXT_BOX );
}
开发者ID:,项目名称:,代码行数:17,代码来源:

示例13: RegisterLuaClass

//----------------------------------------------------------------//
void MOAIMoviePlayerAndroid::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "MOVIE_PLAYER_READY", 		( u32 )MOVIE_PLAYER_READY );
	state.SetField ( -1, "MOVIE_PLAYER_COMPLETED",	( u32 )MOVIE_PLAYER_COMPLETED );

	luaL_Reg regTable[] = {
		{ "init",			_init },
		{ "pause",			_pause },
		{ "play",			_play },
		{ "setListener",	_setListener },
		{ "stop",			_stop },
		{ NULL, NULL }	
	};

	luaL_register ( state, 0, regTable );
}
开发者ID:Limingming2,项目名称:meyume-moai-1-6,代码行数:17,代码来源:MOAIMoviePlayerAndroid.cpp

示例14: RegisterLuaClass

//----------------------------------------------------------------//
void MOAIAppAndroid::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "SESSION_START",		    ( u32 )SESSION_START );
	state.SetField ( -1, "SESSION_END",			    ( u32 )SESSION_END );
	state.SetField ( -1, "BACK_BUTTON_PRESSED",		( u32 )BACK_BUTTON_PRESSED );

	luaL_Reg regTable [] = {
		{ "getUTCTime",				_getUTCTime },
		{ "getStatusBarHeight",		_getStatusBarHeight },
		{ "openURL",				_openURL },
		{ "setListener",			_setListener },
		{ "share",					_share },
		{ NULL, NULL }
	};

	luaL_register ( state, 0, regTable );
}
开发者ID:flimshaw,项目名称:moai-dev,代码行数:18,代码来源:MOAIAppAndroid.cpp

示例15: RegisterLuaClass

//----------------------------------------------------------------//
void MOAIDataBuffer::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "NO_INFLATE",		( u32 )NO_INFLATE );
	state.SetField ( -1, "FORCE_INFLATE",	( u32 )FORCE_INFLATE );
	state.SetField ( -1, "INFLATE_ON_EXT",	( u32 )INFLATE_ON_EXT );

	luaL_Reg regTable [] = {
		{ "base64Decode",	_base64Decode },
		{ "base64Encode",	_base64Encode },
		{ "deflate",		_deflate },
		{ "hexDecode",		_hexDecode },
		{ "hexEncode",		_hexEncode },
		{ "inflate",		_inflate },
		{ "toCppHeader",	_toCppHeader },
		{ NULL, NULL }
	};

	luaL_register ( state, 0, regTable );
}
开发者ID:JakobssonAndre,项目名称:moai-dev,代码行数:20,代码来源:MOAIDataBuffer.cpp


注:本文中的MOAILuaState::SetField方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。