mirror of https://github.com/axmolengine/axmol.git
Cleanup order of fields initialization.
Make initialization order to match declarations. This change twice reduces number of warnings when compiling on MacOS X with Xcode 6.1 Warnings was like "Field 'XXXX' will be initialized after field 'YYYY'"
This commit is contained in:
parent
e99ea7a9fe
commit
2835b094da
|
@ -66,9 +66,9 @@ Camera* Camera::createOrthographic(float zoomX, float zoomY, float nearPlane, fl
|
|||
}
|
||||
|
||||
Camera::Camera()
|
||||
: _cameraFlag(1)
|
||||
, _scene(nullptr)
|
||||
: _scene(nullptr)
|
||||
, _viewProjectionDirty(true)
|
||||
, _cameraFlag(1)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -106,23 +106,23 @@ static inline Tex2F __t(const Vec2 &v)
|
|||
DrawNode::DrawNode()
|
||||
: _vao(0)
|
||||
, _vbo(0)
|
||||
, _vaoGLPoint(0)
|
||||
, _vboGLPoint(0)
|
||||
, _vaoGLLine(0)
|
||||
, _vboGLLine(0)
|
||||
, _bufferCapacity(0)
|
||||
, _bufferCount(0)
|
||||
, _buffer(nullptr)
|
||||
, _dirty(false)
|
||||
, _vaoGLPoint(0)
|
||||
, _vboGLPoint(0)
|
||||
, _bufferCapacityGLPoint(0)
|
||||
, _bufferCountGLPoint(0)
|
||||
, _bufferGLPoint(nullptr)
|
||||
, _pointColor(1,1,1,1)
|
||||
, _pointSize(1)
|
||||
, _dirtyGLPoint(false)
|
||||
, _vaoGLLine(0)
|
||||
, _vboGLLine(0)
|
||||
, _bufferCapacityGLLine(0)
|
||||
, _bufferCountGLLine(0)
|
||||
, _bufferGLLine(nullptr)
|
||||
, _dirty(false)
|
||||
, _dirtyGLPoint(false)
|
||||
, _dirtyGLLine(false)
|
||||
{
|
||||
_blendFunc = BlendFunc::ALPHA_PREMULTIPLIED;
|
||||
|
|
|
@ -116,8 +116,8 @@ TMXLayer::TMXLayer()
|
|||
, _texture(nullptr)
|
||||
, _vertexZvalue(0)
|
||||
, _useAutomaticVertexZ(false)
|
||||
, _dirty(true)
|
||||
, _quadsDirty(true)
|
||||
, _dirty(true)
|
||||
, _vertexBuffer(nullptr)
|
||||
, _vData(nullptr)
|
||||
, _indexBuffer(nullptr)
|
||||
|
|
|
@ -94,9 +94,9 @@ FT_Library FontFreeType::getFTLibrary()
|
|||
|
||||
FontFreeType::FontFreeType(bool distanceFieldEnabled /* = false */,int outline /* = 0 */)
|
||||
: _fontRef(nullptr)
|
||||
, _stroker(nullptr)
|
||||
, _distanceFieldEnabled(distanceFieldEnabled)
|
||||
, _outlineSize(0.0f)
|
||||
,_stroker(nullptr)
|
||||
{
|
||||
if (outline > 0)
|
||||
{
|
||||
|
|
|
@ -235,30 +235,30 @@ bool Label::setCharMap(const std::string& charMapFile, int itemWidth, int itemHe
|
|||
|
||||
Label::Label(FontAtlas *atlas /* = nullptr */, TextHAlignment hAlignment /* = TextHAlignment::LEFT */,
|
||||
TextVAlignment vAlignment /* = TextVAlignment::TOP */,bool useDistanceField /* = false */,bool useA8Shader /* = false */)
|
||||
: _reusedLetter(nullptr)
|
||||
, _commonLineHeight(0.0f)
|
||||
: _isOpacityModifyRGB(false)
|
||||
, _contentDirty(false)
|
||||
, _fontAtlas(atlas)
|
||||
, _textSprite(nullptr)
|
||||
, _compatibleMode(false)
|
||||
, _reusedLetter(nullptr)
|
||||
, _additionalKerning(0.0f)
|
||||
, _commonLineHeight(0.0f)
|
||||
, _lineBreakWithoutSpaces(false)
|
||||
, _horizontalKernings(nullptr)
|
||||
, _maxLineWidth(0)
|
||||
, _labelDimensions(Size::ZERO)
|
||||
, _labelWidth(0)
|
||||
, _labelHeight(0)
|
||||
, _labelDimensions(Size::ZERO)
|
||||
, _hAlignment(hAlignment)
|
||||
, _vAlignment(vAlignment)
|
||||
, _horizontalKernings(nullptr)
|
||||
, _fontAtlas(atlas)
|
||||
, _isOpacityModifyRGB(false)
|
||||
, _currNumLines(-1)
|
||||
, _fontScale(1.0f)
|
||||
, _useDistanceField(useDistanceField)
|
||||
, _useA8Shader(useA8Shader)
|
||||
, _fontScale(1.0f)
|
||||
, _uniformEffectColor(0)
|
||||
, _currNumLines(-1)
|
||||
, _textSprite(nullptr)
|
||||
, _contentDirty(false)
|
||||
, _shadowDirty(false)
|
||||
, _compatibleMode(false)
|
||||
, _insideBounds(true)
|
||||
, _effectColorF(Color4F::BLACK)
|
||||
, _uniformEffectColor(0)
|
||||
, _shadowDirty(false)
|
||||
, _insideBounds(true)
|
||||
{
|
||||
setAnchorPoint(Vec2::ANCHOR_MIDDLE);
|
||||
reset();
|
||||
|
|
|
@ -44,8 +44,8 @@ void BaseLight::setRotationFromDirection( const Vec3 &direction )
|
|||
|
||||
BaseLight::BaseLight()
|
||||
: _intensity(1.0f)
|
||||
, _enabled(true)
|
||||
, _lightFlag(LightFlag::LIGHT0)
|
||||
, _enabled(true)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -82,16 +82,18 @@ Node::Node(void)
|
|||
, _scaleX(1.0f)
|
||||
, _scaleY(1.0f)
|
||||
, _scaleZ(1.0f)
|
||||
, _positionZ(0.0f)
|
||||
, _position(Vec2::ZERO)
|
||||
, _positionZ(0.0f)
|
||||
, _usingNormalizedPosition(false)
|
||||
, _normalizedPositionDirty(false)
|
||||
, _skewX(0.0f)
|
||||
, _skewY(0.0f)
|
||||
, _anchorPointInPoints(Vec2::ZERO)
|
||||
, _anchorPoint(Vec2::ZERO)
|
||||
, _contentSize(Size::ZERO)
|
||||
, _useAdditionalTransform(false)
|
||||
, _transformDirty(true)
|
||||
, _inverseDirty(true)
|
||||
, _useAdditionalTransform(false)
|
||||
, _transformUpdated(true)
|
||||
// children (lazy allocs)
|
||||
// lazy alloc
|
||||
|
@ -100,6 +102,8 @@ Node::Node(void)
|
|||
, _parent(nullptr)
|
||||
// "whole screen" objects. like Scenes and Layers, should set _ignoreAnchorPointForPosition to true
|
||||
, _tag(Node::INVALID_TAG)
|
||||
, _name("")
|
||||
, _hashOfName(0)
|
||||
// userData is always inited as nil
|
||||
, _userData(nullptr)
|
||||
, _userObject(nullptr)
|
||||
|
@ -125,10 +129,6 @@ Node::Node(void)
|
|||
, _realColor(Color3B::WHITE)
|
||||
, _cascadeColorEnabled(false)
|
||||
, _cascadeOpacityEnabled(false)
|
||||
, _usingNormalizedPosition(false)
|
||||
, _normalizedPositionDirty(false)
|
||||
, _name("")
|
||||
, _hashOfName(0)
|
||||
, _cameraMask(1)
|
||||
{
|
||||
// set default scheduler and actionManager
|
||||
|
|
|
@ -40,7 +40,11 @@ NS_CC_BEGIN
|
|||
|
||||
// implementation RenderTexture
|
||||
RenderTexture::RenderTexture()
|
||||
: _FBO(0)
|
||||
: _keepMatrix(false)
|
||||
, _rtTextureRect(Rect::ZERO)
|
||||
, _fullRect(Rect::ZERO)
|
||||
, _fullviewPort(Rect::ZERO)
|
||||
, _FBO(0)
|
||||
, _depthRenderBufffer(0)
|
||||
, _oldFBO(0)
|
||||
, _texture(0)
|
||||
|
@ -53,10 +57,6 @@ RenderTexture::RenderTexture()
|
|||
, _clearStencil(0)
|
||||
, _autoDraw(false)
|
||||
, _sprite(nullptr)
|
||||
, _keepMatrix(false)
|
||||
, _rtTextureRect(Rect::ZERO)
|
||||
, _fullRect(Rect::ZERO)
|
||||
, _fullviewPort(Rect::ZERO)
|
||||
, _saveFileCallback(nullptr)
|
||||
{
|
||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||
|
|
|
@ -259,10 +259,10 @@ bool Sprite::initWithTexture(Texture2D *texture, const Rect& rect, bool rotated)
|
|||
}
|
||||
|
||||
Sprite::Sprite(void)
|
||||
: _shouldBeHidden(false)
|
||||
: _batchNode(nullptr)
|
||||
, _shouldBeHidden(false)
|
||||
, _texture(nullptr)
|
||||
, _insideBounds(true)
|
||||
, _batchNode(nullptr)
|
||||
{
|
||||
#if CC_SPRITE_DEBUG_DRAW
|
||||
_debugDrawNode = DrawNode::create();
|
||||
|
|
|
@ -55,8 +55,8 @@ TextFieldTTF::TextFieldTTF()
|
|||
, _charCount(0)
|
||||
, _inputText("")
|
||||
, _placeHolder("") // prevent Label initWithString assertion
|
||||
, _secureTextEntry(false)
|
||||
, _colorText(Color4B::WHITE)
|
||||
, _secureTextEntry(false)
|
||||
{
|
||||
_colorSpaceHolder.r = _colorSpaceHolder.g = _colorSpaceHolder.b = 127;
|
||||
_colorSpaceHolder.a = 255;
|
||||
|
|
|
@ -247,13 +247,13 @@ void Animate3D::setWeight(float weight)
|
|||
}
|
||||
|
||||
Animate3D::Animate3D()
|
||||
: _absSpeed(1.f)
|
||||
: _state(Animate3D::Animate3DState::Running)
|
||||
, _animation(nullptr)
|
||||
, _absSpeed(1.f)
|
||||
, _weight(1.f)
|
||||
, _start(0.f)
|
||||
, _last(1.f)
|
||||
, _animation(nullptr)
|
||||
, _playReverse(false)
|
||||
, _state(Animate3D::Animate3DState::Running)
|
||||
, _accTransTime(0.0f)
|
||||
, _lastTime(0.0f)
|
||||
{
|
||||
|
|
|
@ -103,8 +103,8 @@ float AnimationCurve<componentSize>::getEndTime() const
|
|||
|
||||
template <int componentSize>
|
||||
AnimationCurve<componentSize>::AnimationCurve()
|
||||
: _keytime(nullptr)
|
||||
, _value(nullptr)
|
||||
: _value(nullptr)
|
||||
, _keytime(nullptr)
|
||||
, _count(0)
|
||||
, _componentSizeByte(0)
|
||||
, _evaluateFun(nullptr)
|
||||
|
|
|
@ -2181,14 +2181,14 @@ Reference* Bundle3D::seekToFirstType(unsigned int type)
|
|||
}
|
||||
|
||||
Bundle3D::Bundle3D()
|
||||
:_isBinary(false),
|
||||
_modelPath(""),
|
||||
: _modelPath(""),
|
||||
_path(""),
|
||||
_version(""),
|
||||
_jsonBuffer(nullptr),
|
||||
_binaryBuffer(nullptr),
|
||||
_referenceCount(0),
|
||||
_references(nullptr)
|
||||
_references(nullptr),
|
||||
_isBinary(false)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -364,10 +364,10 @@ public:
|
|||
}
|
||||
|
||||
Animation3DData(const Animation3DData& other)
|
||||
: _totalTime(other._totalTime)
|
||||
, _translationKeys(other._translationKeys)
|
||||
: _translationKeys(other._translationKeys)
|
||||
, _rotationKeys(other._rotationKeys)
|
||||
, _scaleKeys(other._scaleKeys)
|
||||
, _totalTime(other._totalTime)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -36,14 +36,14 @@ using namespace std;
|
|||
NS_CC_BEGIN
|
||||
|
||||
Mesh::Mesh()
|
||||
: _visible(true)
|
||||
, _texture(nullptr)
|
||||
: _texture(nullptr)
|
||||
, _skin(nullptr)
|
||||
, _visible(true)
|
||||
, _isTransparent(false)
|
||||
, _meshIndexData(nullptr)
|
||||
, _visibleChanged(nullptr)
|
||||
, _glProgramState(nullptr)
|
||||
, _blend(BlendFunc::ALPHA_NON_PREMULTIPLIED)
|
||||
, _isTransparent(false)
|
||||
, _visibleChanged(nullptr)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -33,8 +33,8 @@ static int PALETTE_ROWS = 3;
|
|||
|
||||
MeshSkin::MeshSkin()
|
||||
: _rootBone(nullptr)
|
||||
, _matrixPalette(nullptr)
|
||||
, _skeleton(nullptr)
|
||||
, _matrixPalette(nullptr)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -30,8 +30,8 @@ NS_CC_BEGIN
|
|||
EventController::EventController(ControllerEventType type, Controller* controller, int keyCode)
|
||||
: Event(Type::GAME_CONTROLLER)
|
||||
, _controllerEventType(type)
|
||||
, _keyCode(keyCode)
|
||||
, _controller(controller)
|
||||
, _keyCode(keyCode)
|
||||
, _isConnected(true)
|
||||
{
|
||||
|
||||
|
@ -41,8 +41,8 @@ EventController::EventController(ControllerEventType type, Controller* controlle
|
|||
: Event(Type::GAME_CONTROLLER)
|
||||
, _controllerEventType(type)
|
||||
, _controller(controller)
|
||||
, _isConnected(isConnected)
|
||||
, _keyCode(0)
|
||||
, _isConnected(isConnected)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -30,8 +30,8 @@ NS_CC_BEGIN
|
|||
|
||||
EventFocus::EventFocus(ui::Widget *widgetLoseFocus, ui::Widget* widgetGetFocus)
|
||||
:Event(Type::FOCUS),
|
||||
_widgetLoseFocus(widgetLoseFocus),
|
||||
_widgetGetFocus(widgetGetFocus)
|
||||
_widgetGetFocus(widgetGetFocus),
|
||||
_widgetLoseFocus(widgetLoseFocus)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ using namespace cocos2d;
|
|||
namespace cocosbuilder {
|
||||
|
||||
CCBKeyframe::CCBKeyframe()
|
||||
: _time(0.0f)
|
||||
: _object(nullptr)
|
||||
, _time(0.0f)
|
||||
, _easingType(EasingType::INSTANT)
|
||||
, _easingOpt(0.0f)
|
||||
, _object(nullptr)
|
||||
{}
|
||||
|
||||
CCBKeyframe::~CCBKeyframe()
|
||||
|
|
|
@ -69,12 +69,12 @@ namespace cocostudio
|
|||
WidgetReader::WidgetReader()
|
||||
:_sizePercentX(0.0f),
|
||||
_sizePercentY(0.0f),
|
||||
_isAdaptScreen(false),
|
||||
_width(0.0f),
|
||||
_height(0.0f),
|
||||
_positionPercentX(0.0f),
|
||||
_positionPercentY(0.0f),
|
||||
_opacity(255)
|
||||
_width(0.0f),
|
||||
_height(0.0f),
|
||||
_opacity(255),
|
||||
_isAdaptScreen(false)
|
||||
{
|
||||
valueToInt = [=](const std::string& str) -> int{
|
||||
return atoi(str.c_str());
|
||||
|
|
|
@ -222,15 +222,15 @@ enum WS_MSG {
|
|||
WebSocket::WebSocket()
|
||||
: _readyState(State::CONNECTING)
|
||||
, _port(80)
|
||||
, _pendingFrameDataLen(0)
|
||||
, _currentDataLen(0)
|
||||
, _currentData(nullptr)
|
||||
, _wsHelper(nullptr)
|
||||
, _wsInstance(nullptr)
|
||||
, _wsContext(nullptr)
|
||||
, _delegate(nullptr)
|
||||
, _SSLConnection(0)
|
||||
, _wsProtocols(nullptr)
|
||||
, _pendingFrameDataLen(0)
|
||||
, _currentDataLen(0)
|
||||
, _currentData(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -48,16 +48,16 @@ NS_CC_BEGIN
|
|||
//
|
||||
|
||||
UniformValue::UniformValue()
|
||||
: _useCallback(false)
|
||||
, _uniform(nullptr)
|
||||
: _uniform(nullptr)
|
||||
, _glprogram(nullptr)
|
||||
, _useCallback(false)
|
||||
{
|
||||
}
|
||||
|
||||
UniformValue::UniformValue(Uniform *uniform, GLProgram* glprogram)
|
||||
: _useCallback(false)
|
||||
, _uniform(uniform)
|
||||
: _uniform(uniform)
|
||||
, _glprogram(glprogram)
|
||||
, _useCallback(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -182,15 +182,15 @@ void UniformValue::setMat4(const Mat4& value)
|
|||
//
|
||||
|
||||
VertexAttribValue::VertexAttribValue()
|
||||
: _useCallback(false)
|
||||
, _vertexAttrib(nullptr)
|
||||
: _vertexAttrib(nullptr)
|
||||
, _useCallback(false)
|
||||
, _enabled(false)
|
||||
{
|
||||
}
|
||||
|
||||
VertexAttribValue::VertexAttribValue(VertexAttrib *vertexAttrib)
|
||||
: _useCallback(false)
|
||||
, _vertexAttrib(vertexAttrib)
|
||||
: _vertexAttrib(vertexAttrib)
|
||||
, _useCallback(false)
|
||||
, _enabled(false)
|
||||
{
|
||||
}
|
||||
|
@ -274,10 +274,10 @@ GLProgramState* GLProgramState::getOrCreateWithGLProgram(GLProgram *glprogram)
|
|||
}
|
||||
|
||||
GLProgramState::GLProgramState()
|
||||
: _vertexAttribsFlags(0)
|
||||
, _glprogram(nullptr)
|
||||
: _uniformAttributeValueDirty(true)
|
||||
, _textureUnitIndex(1)
|
||||
, _uniformAttributeValueDirty(true)
|
||||
, _vertexAttribsFlags(0)
|
||||
, _glprogram(nullptr)
|
||||
{
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WP8)
|
||||
/** listen the event that renderer was recreated on Android/WP8 */
|
||||
|
|
|
@ -78,17 +78,17 @@ static const char *s_ambientLightUniformColorName = "u_AmbientLightSour
|
|||
|
||||
MeshCommand::MeshCommand()
|
||||
: _textureID(0)
|
||||
, _blendType(BlendFunc::DISABLE)
|
||||
, _glProgramState(nullptr)
|
||||
, _cullFaceEnabled(false)
|
||||
, _cullFace(GL_BACK)
|
||||
, _depthTestEnabled(false)
|
||||
, _depthWriteEnabled(false)
|
||||
, _blendType(BlendFunc::DISABLE)
|
||||
, _displayColor(1.0f, 1.0f, 1.0f, 1.0f)
|
||||
, _matrixPalette(nullptr)
|
||||
, _matrixPaletteSize(0)
|
||||
, _materialID(0)
|
||||
, _vao(0)
|
||||
, _cullFaceEnabled(false)
|
||||
, _cullFace(GL_BACK)
|
||||
, _depthTestEnabled(false)
|
||||
, _depthWriteEnabled(false)
|
||||
, _lightMask(-1)
|
||||
{
|
||||
_type = RenderCommand::Type::MESH_COMMAND;
|
||||
|
|
|
@ -56,10 +56,10 @@ VertexBuffer* VertexBuffer::create(int sizePerVertex, int vertexNumber)
|
|||
}
|
||||
|
||||
VertexBuffer::VertexBuffer()
|
||||
: _vbo(0)
|
||||
, _vertexNumber(0)
|
||||
: _recreateVBOEventListener(nullptr)
|
||||
, _vbo(0)
|
||||
, _sizePerVertex(0)
|
||||
, _recreateVBOEventListener(nullptr)
|
||||
, _vertexNumber(0)
|
||||
{
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
|
||||
|
|
|
@ -35,17 +35,17 @@ class VertexBuffer;
|
|||
struct CC_DLL VertexStreamAttribute
|
||||
{
|
||||
VertexStreamAttribute()
|
||||
: _offset(0),_semantic(0),_type(0),_size(0), _normalize(false)
|
||||
: _normalize(false),_offset(0),_semantic(0),_type(0),_size(0)
|
||||
{
|
||||
}
|
||||
|
||||
VertexStreamAttribute(int offset, int semantic, int type, int size)
|
||||
: _offset(offset),_semantic(semantic),_type(type),_size(size), _normalize(false)
|
||||
: _normalize(false),_offset(offset),_semantic(semantic),_type(type),_size(size)
|
||||
{
|
||||
}
|
||||
|
||||
VertexStreamAttribute(int offset, int semantic, int type, int size, bool normalize)
|
||||
: _offset(offset),_semantic(semantic),_type(type),_size(size), _normalize(normalize)
|
||||
: _normalize(normalize),_offset(offset),_semantic(semantic),_type(type),_size(size)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ _buttonNormalRenderer(nullptr),
|
|||
_buttonClickedRenderer(nullptr),
|
||||
_buttonDisableRenderer(nullptr),
|
||||
_titleRenderer(nullptr),
|
||||
_zoomScale(0.1f),
|
||||
_normalFileName(""),
|
||||
_clickedFileName(""),
|
||||
_disabledFileName(""),
|
||||
|
@ -65,7 +66,6 @@ _normalTextureScaleXInSize(1.0f),
|
|||
_normalTextureScaleYInSize(1.0f),
|
||||
_pressedTextureScaleXInSize(1.0f),
|
||||
_pressedTextureScaleYInSize(1.0f),
|
||||
_zoomScale(0.1f),
|
||||
_normalTextureLoaded(false),
|
||||
_pressedTextureLoaded(false),
|
||||
_disabledTextureLoaded(false),
|
||||
|
|
|
@ -38,13 +38,13 @@ EditBox::EditBox(void)
|
|||
, _editBoxInputMode(EditBox::InputMode::SINGLE_LINE)
|
||||
, _editBoxInputFlag(EditBox::InputFlag::INTIAL_CAPS_ALL_CHARACTERS)
|
||||
, _keyboardReturnType(KeyboardReturnType::DEFAULT)
|
||||
, _backgroundSprite(nullptr)
|
||||
, _fontSize(-1)
|
||||
, _placeholderFontSize(-1)
|
||||
, _colText(Color3B::WHITE)
|
||||
, _colPlaceHolder(Color3B::GRAY)
|
||||
, _maxLength(0)
|
||||
, _adjustHeight(0.0f)
|
||||
, _backgroundSprite(nullptr)
|
||||
#if CC_ENABLE_SCRIPT_BINDING
|
||||
, _scriptEditBoxHandler(0)
|
||||
#endif
|
||||
|
|
|
@ -51,13 +51,15 @@ static GLint s_layer = -1;
|
|||
IMPLEMENT_CLASS_GUI_INFO(Layout)
|
||||
|
||||
Layout::Layout():
|
||||
_clippingEnabled(false),
|
||||
_backGroundScale9Enabled(false),
|
||||
_backGroundImage(nullptr),
|
||||
_backGroundImageFileName(""),
|
||||
_backGroundImageCapInsets(Rect::ZERO),
|
||||
_colorType(BackGroundColorType::NONE),
|
||||
_bgImageTexType(TextureResType::LOCAL),
|
||||
_backGroundImageTextureSize(Size::ZERO),
|
||||
_backGroundImageColor(Color3B::WHITE),
|
||||
_backGroundImageOpacity(255),
|
||||
_colorRender(nullptr),
|
||||
_gradientRender(nullptr),
|
||||
_cColor(Color3B::WHITE),
|
||||
|
@ -65,14 +67,13 @@ _gStartColor(Color3B::WHITE),
|
|||
_gEndColor(Color3B::WHITE),
|
||||
_alongVector(Vec2(0.0f, -1.0f)),
|
||||
_cOpacity(255),
|
||||
_backGroundImageTextureSize(Size::ZERO),
|
||||
_clippingEnabled(false),
|
||||
_layoutType(Type::ABSOLUTE),
|
||||
_clippingType(ClippingType::STENCIL),
|
||||
_clippingStencil(nullptr),
|
||||
_scissorRectDirty(false),
|
||||
_clippingRect(Rect::ZERO),
|
||||
_clippingParent(nullptr),
|
||||
_doLayoutDirty(true),
|
||||
_clippingRectDirty(true),
|
||||
_currentStencilEnabled(GL_FALSE),
|
||||
_currentStencilWriteMask(~0),
|
||||
|
@ -86,12 +87,11 @@ _currentDepthWriteMask(GL_TRUE),
|
|||
_currentAlphaTestEnabled(GL_FALSE),
|
||||
_currentAlphaTestFunc(GL_ALWAYS),
|
||||
_currentAlphaTestRef(1),
|
||||
_backGroundImageColor(Color3B::WHITE),
|
||||
_backGroundImageOpacity(255),
|
||||
_passFocusToChild(true),
|
||||
_doLayoutDirty(true),
|
||||
_isInterceptTouch(false),
|
||||
_loopFocus(false),
|
||||
_isFocusPassing(false),
|
||||
_isInterceptTouch(false)
|
||||
_passFocusToChild(true),
|
||||
_isFocusPassing(false)
|
||||
{
|
||||
//no-op
|
||||
}
|
||||
|
|
|
@ -31,10 +31,10 @@ NS_CC_BEGIN
|
|||
|
||||
namespace ui {
|
||||
LayoutComponent::LayoutComponent()
|
||||
:_actived(true)
|
||||
,_usingPercentContentSize(false)
|
||||
,_usingPercentPosition(false)
|
||||
: _usingPercentContentSize(false)
|
||||
, _referencePoint(ReferencePoint::BOTTOM_LEFT)
|
||||
, _usingPercentPosition(false)
|
||||
, _actived(true)
|
||||
{
|
||||
_name = __LAYOUT_COMPONENT_NAME;
|
||||
}
|
||||
|
|
|
@ -35,10 +35,10 @@ ListView::ListView():
|
|||
_model(nullptr),
|
||||
_gravity(Gravity::CENTER_VERTICAL),
|
||||
_itemsMargin(0.0f),
|
||||
_listViewEventListener(nullptr),
|
||||
_listViewEventSelector(nullptr),
|
||||
_curSelectedIndex(0),
|
||||
_refreshViewDirty(true),
|
||||
_listViewEventListener(nullptr),
|
||||
_listViewEventSelector(nullptr),
|
||||
_eventCallback(nullptr)
|
||||
{
|
||||
this->setTouchEnabled(true);
|
||||
|
|
|
@ -31,22 +31,22 @@ namespace ui {
|
|||
IMPLEMENT_CLASS_GUI_INFO(PageView)
|
||||
|
||||
PageView::PageView():
|
||||
_isAutoScrolling(false),
|
||||
_autoScrollDistance(0.0f),
|
||||
_autoScrollSpeed(0.0f),
|
||||
_autoScrollDirection(AutoScrollDirection::LEFT),
|
||||
_curPageIdx(0),
|
||||
_touchMoveDirection(TouchDirection::LEFT),
|
||||
_leftBoundaryChild(nullptr),
|
||||
_rightBoundaryChild(nullptr),
|
||||
_leftBoundary(0.0f),
|
||||
_rightBoundary(0.0f),
|
||||
_isAutoScrolling(false),
|
||||
_autoScrollDistance(0.0f),
|
||||
_autoScrollSpeed(0.0f),
|
||||
_autoScrollDirection(AutoScrollDirection::LEFT),
|
||||
_customScrollThreshold(0.0),
|
||||
_usingCustomScrollThreshold(false),
|
||||
_childFocusCancelOffset(5.0f),
|
||||
_pageViewEventListener(nullptr),
|
||||
_pageViewEventSelector(nullptr),
|
||||
_eventCallback(nullptr),
|
||||
_customScrollThreshold(0.0),
|
||||
_usingCustomScrollThreshold(false)
|
||||
_eventCallback(nullptr)
|
||||
{
|
||||
this->setTouchEnabled(true);
|
||||
}
|
||||
|
|
|
@ -45,11 +45,11 @@ namespace ui {
|
|||
, _bottomLeft(nullptr)
|
||||
, _bottom(nullptr)
|
||||
, _bottomRight(nullptr)
|
||||
, _scale9Enabled(true)
|
||||
, _insetLeft(0)
|
||||
, _insetTop(0)
|
||||
, _insetRight(0)
|
||||
, _insetBottom(0)
|
||||
, _scale9Enabled(true)
|
||||
{
|
||||
this->setAnchorPoint(Vec2(0.5,0.5));
|
||||
}
|
||||
|
|
|
@ -57,14 +57,14 @@ _capInsetsBarRenderer(Rect::ZERO),
|
|||
_capInsetsProgressBarRenderer(Rect::ZERO),
|
||||
_sliderEventListener(nullptr),
|
||||
_sliderEventSelector(nullptr),
|
||||
_eventCallback(nullptr),
|
||||
_barTexType(TextureResType::LOCAL),
|
||||
_progressBarTexType(TextureResType::LOCAL),
|
||||
_ballNTexType(TextureResType::LOCAL),
|
||||
_ballPTexType(TextureResType::LOCAL),
|
||||
_ballDTexType(TextureResType::LOCAL),
|
||||
_barRendererAdaptDirty(true),
|
||||
_progressBarRendererDirty(true),
|
||||
_eventCallback(nullptr)
|
||||
_progressBarRendererDirty(true)
|
||||
{
|
||||
setTouchEnabled(true);
|
||||
}
|
||||
|
|
|
@ -141,28 +141,28 @@ _enabled(true),
|
|||
_bright(true),
|
||||
_touchEnabled(false),
|
||||
_highlight(false),
|
||||
_affectByClipping(false),
|
||||
_ignoreSize(false),
|
||||
_propagateTouchEvents(true),
|
||||
_brightStyle(BrightStyle::NONE),
|
||||
_touchBeganPosition(Vec2::ZERO),
|
||||
_touchMovePosition(Vec2::ZERO),
|
||||
_touchEndPosition(Vec2::ZERO),
|
||||
_touchEventListener(nullptr),
|
||||
_touchEventSelector(nullptr),
|
||||
_sizeType(SizeType::ABSOLUTE),
|
||||
_positionType(PositionType::ABSOLUTE),
|
||||
_actionTag(0),
|
||||
_customSize(Size::ZERO),
|
||||
_ignoreSize(false),
|
||||
_affectByClipping(false),
|
||||
_sizeType(SizeType::ABSOLUTE),
|
||||
_sizePercent(Vec2::ZERO),
|
||||
_positionType(PositionType::ABSOLUTE),
|
||||
_positionPercent(Vec2::ZERO),
|
||||
_hitted(false),
|
||||
_touchListener(nullptr),
|
||||
_touchBeganPosition(Vec2::ZERO),
|
||||
_touchMovePosition(Vec2::ZERO),
|
||||
_touchEndPosition(Vec2::ZERO),
|
||||
_flippedX(false),
|
||||
_flippedY(false),
|
||||
_layoutParameterType(LayoutParameter::Type::NONE),
|
||||
_focused(false),
|
||||
_focusEnabled(true),
|
||||
_layoutParameterType(LayoutParameter::Type::NONE),
|
||||
_propagateTouchEvents(true)
|
||||
_touchEventListener(nullptr),
|
||||
_touchEventSelector(nullptr)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -62,8 +62,8 @@ ScrollView::ScrollView()
|
|||
, _touchLength(0.0f)
|
||||
, _minScale(0.0f)
|
||||
, _maxScale(0.0f)
|
||||
, _touchListener(nullptr)
|
||||
, _scissorRestored(false)
|
||||
, _touchListener(nullptr)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -50,20 +50,20 @@ const std::string AssetsManagerEx::BATCH_UPDATE_ID = "@batch_update";
|
|||
|
||||
AssetsManagerEx::AssetsManagerEx(const std::string& manifestUrl, const std::string& storagePath)
|
||||
: _updateState(State::UNCHECKED)
|
||||
, _waitToUpdate(false)
|
||||
, _totalToDownload(0)
|
||||
, _totalWaitToDownload(0)
|
||||
, _percent(0)
|
||||
, _percentByFile(0)
|
||||
, _manifestUrl(manifestUrl)
|
||||
, _assets(nullptr)
|
||||
, _storagePath("")
|
||||
, _cacheVersionPath("")
|
||||
, _cacheManifestPath("")
|
||||
, _tempManifestPath("")
|
||||
, _assets(nullptr)
|
||||
, _manifestUrl(manifestUrl)
|
||||
, _localManifest(nullptr)
|
||||
, _tempManifest(nullptr)
|
||||
, _remoteManifest(nullptr)
|
||||
, _waitToUpdate(false)
|
||||
, _percent(0)
|
||||
, _percentByFile(0)
|
||||
, _totalToDownload(0)
|
||||
, _totalWaitToDownload(0)
|
||||
{
|
||||
// Init variables
|
||||
_eventDispatcher = Director::getInstance()->getEventDispatcher();
|
||||
|
|
|
@ -31,14 +31,14 @@ NS_CC_EXT_BEGIN
|
|||
|
||||
EventAssetsManagerEx::EventAssetsManagerEx(const std::string& eventName, cocos2d::extension::AssetsManagerEx *manager, const EventCode &code, float percent/* = 0 */, float percentByFile/* = 0*/, const std::string& assetId/* = "" */, const std::string& message/* = "" */, int curle_code/* = CURLE_OK*/, int curlm_code/* = CURLM_OK*/)
|
||||
: EventCustom(eventName)
|
||||
, _manager(manager)
|
||||
, _code(code)
|
||||
, _manager(manager)
|
||||
, _message(message)
|
||||
, _assetId(assetId)
|
||||
, _curle_code(curle_code)
|
||||
, _curlm_code(curlm_code)
|
||||
, _percent(percent)
|
||||
, _percentByFile(percentByFile)
|
||||
, _assetId(assetId)
|
||||
, _message(message)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -145,10 +145,10 @@ int downloadProgressFunc(Downloader::ProgressData *ptr, double totalToDownload,
|
|||
}
|
||||
|
||||
Downloader::Downloader()
|
||||
: _onError(nullptr)
|
||||
: _connectionTimeout(DEFAULT_TIMEOUT)
|
||||
, _onError(nullptr)
|
||||
, _onProgress(nullptr)
|
||||
, _onSuccess(nullptr)
|
||||
, _connectionTimeout(DEFAULT_TIMEOUT)
|
||||
, _supportResuming(false)
|
||||
{
|
||||
_fileUtils = FileUtils::getInstance();
|
||||
|
|
Loading…
Reference in New Issue