mirror of https://github.com/axmolengine/axmol.git
Update cocos2d basic lua files and LabelTestNew.lua
This commit is contained in:
parent
65f007f5ff
commit
2f9dbb7142
|
@ -8,11 +8,11 @@ local dp_pointSize = 1.0
|
|||
|
||||
local SHADER_NAME_POSITION_U_COLOR = "ShaderPosition_uColor"
|
||||
|
||||
local targetPlatform = CCApplication:getInstance():getTargetPlatform()
|
||||
local targetPlatform = cc.Application:getInstance():getTargetPlatform()
|
||||
|
||||
local function lazy_init()
|
||||
if not dp_initialized then
|
||||
dp_shader = CCShaderCache:getInstance():getProgram(SHADER_NAME_POSITION_U_COLOR)
|
||||
dp_shader = cc.ShaderCache:getInstance():getProgram(SHADER_NAME_POSITION_U_COLOR)
|
||||
--dp_shader:retain()
|
||||
if nil ~= dp_shader then
|
||||
dp_colorLocation = gl.getUniformLocation( dp_shader:getProgram(), "u_color")
|
||||
|
@ -52,7 +52,7 @@ function ccDrawColor4f(r,g,b,a)
|
|||
end
|
||||
|
||||
function ccPointSize(pointSize)
|
||||
dp_pointSize = pointSize * CCDirector:getInstance():getContentScaleFactor()
|
||||
dp_pointSize = pointSize * cc.Director:getInstance():getContentScaleFactor()
|
||||
end
|
||||
|
||||
function ccDrawColor4B(r,g,b,a)
|
||||
|
|
|
@ -3,6 +3,7 @@ require "cocos.cocos2d.Cocos2d"
|
|||
require "cocos.cocos2d.Cocos2dConstants"
|
||||
require "cocos.cocos2d.extern"
|
||||
require "cocos.cocos2d.bitExtend"
|
||||
require "cocos.cocos2d.DrawPrimitives"
|
||||
|
||||
-- opengl
|
||||
require "cocos.cocos2d.Opengl"
|
||||
|
@ -27,11 +28,15 @@ require "cocos.extension.ExtensionConstants"
|
|||
-- network
|
||||
require "cocos.network.NetworkConstants"
|
||||
|
||||
-- Spine
|
||||
require "cocos.spine.SpineConstants"
|
||||
|
||||
if CC_USE_DEPRECATED_API then
|
||||
-- CCLuaEngine
|
||||
require "cocos.cocos2d.DeprecatedCocos2dClass"
|
||||
require "cocos.cocos2d.DeprecatedCocos2dEnum"
|
||||
require "cocos.cocos2d.DeprecatedCocos2dFunc"
|
||||
require "cocos.cocos2d.DeprecatedOpenglEnum"
|
||||
|
||||
-- register_cocostudio_module
|
||||
require "cocos.cocostudio.DeprecatedCocoStudioClass"
|
||||
|
|
|
@ -1278,8 +1278,8 @@ local LabelCrashTest = {}
|
|||
function LabelCrashTest.create()
|
||||
local layer = cc.Layer:create()
|
||||
Helper.initWithLayer(layer)
|
||||
Helper.titleLabel:setString("New Label + .TTF")
|
||||
Helper.subtitleLabel:setString("Testing rendering base on DistanceField")
|
||||
Helper.titleLabel:setString("New Label Crash Test")
|
||||
Helper.subtitleLabel:setString("Not crash and show [Test123] when using unknown character.")
|
||||
|
||||
local ttfConfig = {}
|
||||
ttfConfig.fontFilePath = "fonts/arial.ttf"
|
||||
|
|
Loading…
Reference in New Issue