类型 函数 返回值 无 修订版 2024.3703 版 关键词 广告、Appnext、setButtonColor 另请参阅 appnext.getButtonColor() appnext.*
设置安装按钮的颜色。
appnext.setButtonColor( adKey, buttonColor )
字符串. 为之前创建的广告返回的广告密钥。
字符串. 安装按钮的颜色,以#
的十六进制颜色开头。
local appnext = require( "plugin.appnext" ) local function adListener( event ) print( "Received " .. event.event .. " for " .. event.adKey .. " with message: " .. event.message ) end -- Initialize the Appnext plugin appnext.init( adListener ) -- Create your ads local interstitialPlacementID local platform = system.getInfo( "platformName" ) if ( platform == "iPhone OS" ) then interstitialPlacementID = "YOUR_IOS_INTERSTITIAL_PLACEMENT_ID" elseif ( platform == "Android" ) then interstitialPlacementID = "YOUR_ANDROID_INTERSTITIAL_PLACEMENT_ID" end local interstitialAdKey = appnext.createAd( "interstitial", interstitialPlacementID ) appnext.setButtonColor( interstitialAdKey, "#6AB344" )