mirror of https://github.com/axmolengine/axmol.git
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into developNewUI
This commit is contained in:
commit
bebdfd8e55
|
@ -101,7 +101,7 @@ void ActionNode::initWithDictionary(const rapidjson::Value& dic,Object* root)
|
|||
actionFrame->setFrameIndex(frameInex);
|
||||
actionFrame->setScaleX(scaleX);
|
||||
actionFrame->setScaleY(scaleY);
|
||||
auto cActionArray = _frameArray.at((int)kKeyframeMove);
|
||||
auto cActionArray = _frameArray.at((int)kKeyframeScale);
|
||||
cActionArray->pushBack(actionFrame);
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ void ActionNode::initWithDictionary(const rapidjson::Value& dic,Object* root)
|
|||
actionFrame->autorelease();
|
||||
actionFrame->setFrameIndex(frameInex);
|
||||
actionFrame->setRotation(rotation);
|
||||
auto cActionArray = _frameArray.at((int)kKeyframeMove);
|
||||
auto cActionArray = _frameArray.at((int)kKeyframeRotate);
|
||||
cActionArray->pushBack(actionFrame);
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ void ActionNode::initWithDictionary(const rapidjson::Value& dic,Object* root)
|
|||
actionFrame->autorelease();
|
||||
actionFrame->setFrameIndex(frameInex);
|
||||
actionFrame->setOpacity(opacity);
|
||||
auto cActionArray = _frameArray.at((int)kKeyframeMove);
|
||||
auto cActionArray = _frameArray.at((int)kKeyframeTint);
|
||||
cActionArray->pushBack(actionFrame);
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ void ActionNode::initWithDictionary(const rapidjson::Value& dic,Object* root)
|
|||
actionFrame->autorelease();
|
||||
actionFrame->setFrameIndex(frameInex);
|
||||
actionFrame->setColor(Color3B(colorR,colorG,colorB));
|
||||
auto cActionArray = _frameArray.at((int)kKeyframeMove);
|
||||
auto cActionArray = _frameArray.at((int)kKeyframeFade);
|
||||
cActionArray->pushBack(actionFrame);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -328,7 +328,7 @@ void ArmatureAnimation::gotoAndPause(int frameIndex)
|
|||
pause();
|
||||
}
|
||||
|
||||
long ArmatureAnimation::getMovementCount() const
|
||||
ssize_t ArmatureAnimation::getMovementCount() const
|
||||
{
|
||||
return _animationData->getMovementCount();
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ public:
|
|||
/**
|
||||
* Get movement count
|
||||
*/
|
||||
long getMovementCount() const;
|
||||
ssize_t getMovementCount() const;
|
||||
|
||||
void update(float dt);
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ const std::string& Text::getStringValue()
|
|||
return _labelRenderer->getString();
|
||||
}
|
||||
|
||||
size_t Text::getStringLength()
|
||||
ssize_t Text::getStringLength()
|
||||
{
|
||||
return _labelRenderer->getString().size();
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
*
|
||||
* @return string length.
|
||||
*/
|
||||
size_t getStringLength();
|
||||
ssize_t getStringLength();
|
||||
|
||||
/**
|
||||
* Sets the font size of label.
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit e20a9d8a7afa860d5dc2f414602a10b2060201e2
|
||||
Subproject commit d8d1c134c31e7f1b4e78af1d2c80597275f61e41
|
|
@ -33,7 +33,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual void scrollViewDidScroll(ScrollView* view)
|
||||
virtual void scrollViewDidScroll(ScrollView* view) override
|
||||
{
|
||||
js_proxy_t * p = jsb_get_native_proxy(view);
|
||||
if (!p) return;
|
||||
|
@ -42,7 +42,7 @@ public:
|
|||
ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(_JSDelegate), "scrollViewDidScroll", 1, &arg, NULL);
|
||||
}
|
||||
|
||||
virtual void scrollViewDidZoom(ScrollView* view)
|
||||
virtual void scrollViewDidZoom(ScrollView* view) override
|
||||
{
|
||||
js_proxy_t * p = jsb_get_native_proxy(view);
|
||||
if (!p) return;
|
||||
|
@ -119,32 +119,32 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual void scrollViewDidScroll(ScrollView* view)
|
||||
virtual void scrollViewDidScroll(ScrollView* view) override
|
||||
{
|
||||
callJSDelegate(view, "scrollViewDidScroll");
|
||||
}
|
||||
|
||||
virtual void scrollViewDidZoom(ScrollView* view)
|
||||
virtual void scrollViewDidZoom(ScrollView* view) override
|
||||
{
|
||||
callJSDelegate(view, "scrollViewDidZoom");
|
||||
}
|
||||
|
||||
virtual void tableCellTouched(TableView* table, TableViewCell* cell)
|
||||
virtual void tableCellTouched(TableView* table, TableViewCell* cell) override
|
||||
{
|
||||
callJSDelegate(table, cell, "tableCellTouched");
|
||||
}
|
||||
|
||||
virtual void tableCellHighlight(TableView* table, TableViewCell* cell)
|
||||
virtual void tableCellHighlight(TableView* table, TableViewCell* cell) override
|
||||
{
|
||||
callJSDelegate(table, cell, "tableCellHighlight");
|
||||
}
|
||||
|
||||
virtual void tableCellUnhighlight(TableView* table, TableViewCell* cell)
|
||||
virtual void tableCellUnhighlight(TableView* table, TableViewCell* cell) override
|
||||
{
|
||||
callJSDelegate(table, cell, "tableCellUnhighlight");
|
||||
}
|
||||
|
||||
virtual void tableCellWillRecycle(TableView* table, TableViewCell* cell)
|
||||
virtual void tableCellWillRecycle(TableView* table, TableViewCell* cell) override
|
||||
{
|
||||
callJSDelegate(table, cell, "tableCellWillRecycle");
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual Size tableCellSizeForIndex(TableView *table, ssize_t idx)
|
||||
virtual Size tableCellSizeForIndex(TableView *table, ssize_t idx) override
|
||||
{
|
||||
jsval ret;
|
||||
bool ok = callJSDelegate(table, idx, "tableCellSizeForIndex", ret);
|
||||
|
@ -268,7 +268,7 @@ public:
|
|||
|
||||
}
|
||||
|
||||
virtual TableViewCell* tableCellAtIndex(TableView *table, ssize_t idx)
|
||||
virtual TableViewCell* tableCellAtIndex(TableView *table, ssize_t idx) override
|
||||
{
|
||||
jsval ret;
|
||||
bool ok = callJSDelegate(table, idx, "tableCellAtIndex", ret);
|
||||
|
@ -288,7 +288,7 @@ public:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
virtual ssize_t numberOfCellsInTableView(TableView *table)
|
||||
virtual ssize_t numberOfCellsInTableView(TableView *table) override
|
||||
{
|
||||
jsval ret;
|
||||
bool ok = callJSDelegate(table, "numberOfCellsInTableView", ret);
|
||||
|
@ -508,7 +508,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual void editBoxEditingDidBegin(EditBox* editBox)
|
||||
virtual void editBoxEditingDidBegin(EditBox* editBox) override
|
||||
{
|
||||
js_proxy_t * p = jsb_get_native_proxy(editBox);
|
||||
if (!p) return;
|
||||
|
@ -517,7 +517,7 @@ public:
|
|||
ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(_JSDelegate), "editBoxEditingDidBegin", 1, &arg, NULL);
|
||||
}
|
||||
|
||||
virtual void editBoxEditingDidEnd(EditBox* editBox)
|
||||
virtual void editBoxEditingDidEnd(EditBox* editBox) override
|
||||
{
|
||||
js_proxy_t * p = jsb_get_native_proxy(editBox);
|
||||
if (!p) return;
|
||||
|
@ -526,7 +526,7 @@ public:
|
|||
ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(_JSDelegate), "editBoxEditingDidEnd", 1, &arg, NULL);
|
||||
}
|
||||
|
||||
virtual void editBoxTextChanged(EditBox* editBox, const std::string& text)
|
||||
virtual void editBoxTextChanged(EditBox* editBox, const std::string& text) override
|
||||
{
|
||||
js_proxy_t * p = jsb_get_native_proxy(editBox);
|
||||
if (!p) return;
|
||||
|
@ -539,7 +539,7 @@ public:
|
|||
ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(_JSDelegate), "editBoxTextChanged", 2, dataVal, NULL);
|
||||
}
|
||||
|
||||
virtual void editBoxReturn(EditBox* editBox)
|
||||
virtual void editBoxReturn(EditBox* editBox) override
|
||||
{
|
||||
js_proxy_t * p = jsb_get_native_proxy(editBox);
|
||||
if (!p) return;
|
||||
|
|
|
@ -1197,9 +1197,13 @@ JSBool jsval_to_ccvaluevector(JSContext* cx, jsval v, cocos2d::ValueVector* ret)
|
|||
return JS_TRUE;
|
||||
}
|
||||
|
||||
JSBool jsval_to_ssize( JSContext *cx, jsval vp, ssize_t* ret)
|
||||
JSBool jsval_to_ssize( JSContext *cx, jsval vp, ssize_t* size)
|
||||
{
|
||||
return jsval_to_long(cx, vp, reinterpret_cast<long*>(ret));
|
||||
JSBool ret = JS_FALSE;
|
||||
int32_t sizeInt32 = 0;
|
||||
ret = jsval_to_int32(cx, vp, &sizeInt32);
|
||||
*size = sizeInt32;
|
||||
return ret;
|
||||
}
|
||||
|
||||
JSBool jsval_to_std_vector_string( JSContext *cx, jsval vp, std::vector<std::string>* ret)
|
||||
|
@ -2192,5 +2196,6 @@ jsval ccvaluevector_to_jsval(JSContext* cx, const cocos2d::ValueVector& v)
|
|||
|
||||
jsval ssize_to_jsval(JSContext *cx, ssize_t v)
|
||||
{
|
||||
return long_to_jsval(cx, v);
|
||||
CCASSERT(v < INT_MAX, "The size should not bigger than 32 bit (int32_t).");
|
||||
return int32_to_jsval(cx, static_cast<int>(v));
|
||||
}
|
||||
|
|
|
@ -132,6 +132,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\lua\luajit\prebuilt\win32\*.*" "$
|
|||
<ClCompile Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_auto.cpp" />
|
||||
<ClCompile Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_extension_auto.cpp" />
|
||||
<ClCompile Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_gui_auto.cpp" />
|
||||
<ClCompile Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_physics_auto.cpp" />
|
||||
<ClCompile Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_spine_auto.cpp" />
|
||||
<ClCompile Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_studio_auto.cpp" />
|
||||
<ClCompile Include="CCBProxy.cpp" />
|
||||
|
@ -149,6 +150,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\lua\luajit\prebuilt\win32\*.*" "$
|
|||
<ClCompile Include="lua_cocos2dx_extension_manual.cpp" />
|
||||
<ClCompile Include="lua_cocos2dx_gui_manual.cpp" />
|
||||
<ClCompile Include="lua_cocos2dx_manual.cpp" />
|
||||
<ClCompile Include="lua_cocos2dx_physics_manual.cpp" />
|
||||
<ClCompile Include="lua_cocos2dx_spine_manual.cpp" />
|
||||
<ClCompile Include="Lua_web_socket.cpp" />
|
||||
<ClCompile Include="lua_xml_http_request.cpp" />
|
||||
|
@ -164,6 +166,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\lua\luajit\prebuilt\win32\*.*" "$
|
|||
<ClInclude Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_auto.hpp" />
|
||||
<ClInclude Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_extension_auto.hpp" />
|
||||
<ClInclude Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_gui_auto.hpp" />
|
||||
<ClInclude Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_physics_auto.hpp" />
|
||||
<ClInclude Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_spine_auto.hpp" />
|
||||
<ClInclude Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_studio_auto.hpp" />
|
||||
<ClInclude Include="CCBProxy.h" />
|
||||
|
@ -181,6 +184,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\lua\luajit\prebuilt\win32\*.*" "$
|
|||
<ClInclude Include="lua_cocos2dx_extension_manual.h" />
|
||||
<ClInclude Include="lua_cocos2dx_gui_manual.hpp" />
|
||||
<ClInclude Include="lua_cocos2dx_manual.hpp" />
|
||||
<ClInclude Include="lua_cocos2dx_physics_manual.hpp" />
|
||||
<ClInclude Include="lua_cocos2dx_spine_manual.hpp" />
|
||||
<ClInclude Include="Lua_web_socket.h" />
|
||||
<ClInclude Include="lua_xml_http_request.h" />
|
||||
|
@ -190,6 +194,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\..\external\lua\luajit\prebuilt\win32\*.*" "$
|
|||
<None Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_auto_api.js" />
|
||||
<None Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_extension_auto_api.js" />
|
||||
<None Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_gui_auto_api.js" />
|
||||
<None Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_physics_auto_api.js" />
|
||||
<None Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_spine_auto_api.js" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
|
|
@ -105,6 +105,12 @@
|
|||
<ClCompile Include="lua_cocos2dx_gui_manual.cpp">
|
||||
<Filter>cocos2dx_support</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="lua_cocos2dx_physics_manual.cpp">
|
||||
<Filter>cocos2dx_support</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_physics_auto.cpp">
|
||||
<Filter>cocos2dx_support\generated</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_auto.hpp">
|
||||
|
@ -197,6 +203,12 @@
|
|||
<ClInclude Include="lua_cocos2dx_gui_manual.hpp">
|
||||
<Filter>cocos2dx_support</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="lua_cocos2dx_physics_manual.hpp">
|
||||
<Filter>cocos2dx_support</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_physics_auto.hpp">
|
||||
<Filter>cocos2dx_support\generated</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_auto_api.js">
|
||||
|
@ -211,5 +223,8 @@
|
|||
<None Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_gui_auto_api.js">
|
||||
<Filter>cocos2dx_support\generated</Filter>
|
||||
</None>
|
||||
<None Include="..\..\auto-generated\lua-bindings\lua_cocos2dx_physics_auto_api.js">
|
||||
<Filter>cocos2dx_support\generated</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -485,10 +485,17 @@ void ScrollView::addChild(Node * child, int zOrder, int tag)
|
|||
}
|
||||
}
|
||||
|
||||
void ScrollView::beforeDraw()
|
||||
{
|
||||
_beforeDrawCommand.init(0, _vertexZ);
|
||||
_beforeDrawCommand.func = CC_CALLBACK_0(ScrollView::onBeforeDraw, this);
|
||||
Director::getInstance()->getRenderer()->addCommand(&_beforeDrawCommand);
|
||||
}
|
||||
|
||||
/**
|
||||
* clip this view so that outside of the visible bounds can be hidden.
|
||||
*/
|
||||
void ScrollView::beforeDraw()
|
||||
void ScrollView::onBeforeDraw()
|
||||
{
|
||||
if (_clippingToBounds)
|
||||
{
|
||||
|
@ -513,11 +520,18 @@ void ScrollView::beforeDraw()
|
|||
}
|
||||
}
|
||||
|
||||
void ScrollView::afterDraw()
|
||||
{
|
||||
_afterDrawCommand.init(0, _vertexZ);
|
||||
_afterDrawCommand.func = CC_CALLBACK_0(ScrollView::onAfterDraw, this);
|
||||
Director::getInstance()->getRenderer()->addCommand(&_afterDrawCommand);
|
||||
}
|
||||
|
||||
/**
|
||||
* retract what's done in beforeDraw so that there's no side effect to
|
||||
* other nodes.
|
||||
*/
|
||||
void ScrollView::afterDraw()
|
||||
void ScrollView::onAfterDraw()
|
||||
{
|
||||
if (_clippingToBounds)
|
||||
{
|
||||
|
|
|
@ -254,11 +254,13 @@ protected:
|
|||
* clip this view so that outside of the visible bounds can be hidden.
|
||||
*/
|
||||
void beforeDraw();
|
||||
void onBeforeDraw();
|
||||
/**
|
||||
* retract what's done in beforeDraw so that there's no side effect to
|
||||
* other nodes.
|
||||
*/
|
||||
void afterDraw();
|
||||
void onAfterDraw();
|
||||
/**
|
||||
* Zoom handling
|
||||
*/
|
||||
|
@ -351,6 +353,9 @@ protected:
|
|||
|
||||
/** Touch listener */
|
||||
EventListenerTouchOneByOne* _touchListener;
|
||||
|
||||
CustomCommand _beforeDrawCommand;
|
||||
CustomCommand _afterDrawCommand;
|
||||
};
|
||||
|
||||
// end of GUI group
|
||||
|
|
|
@ -33,24 +33,14 @@ void TableViewCell::reset()
|
|||
_idx = CC_INVALID_INDEX;
|
||||
}
|
||||
|
||||
void TableViewCell::setObjectID(long uIdx)
|
||||
{
|
||||
_idx = uIdx;
|
||||
}
|
||||
|
||||
long TableViewCell::getObjectID()
|
||||
ssize_t TableViewCell::getIdx()
|
||||
{
|
||||
return _idx;
|
||||
}
|
||||
|
||||
long TableViewCell::getIdx()
|
||||
void TableViewCell::setIdx(ssize_t idx)
|
||||
{
|
||||
return _idx;
|
||||
}
|
||||
|
||||
void TableViewCell::setIdx(long uIdx)
|
||||
{
|
||||
_idx = uIdx;
|
||||
_idx = idx;
|
||||
}
|
||||
|
||||
NS_CC_EXT_END
|
||||
|
|
|
@ -41,17 +41,15 @@ public:
|
|||
/**
|
||||
* The index used internally by SWTableView and its subclasses
|
||||
*/
|
||||
long getIdx();
|
||||
void setIdx(long uIdx);
|
||||
ssize_t getIdx();
|
||||
void setIdx(ssize_t uIdx);
|
||||
/**
|
||||
* Cleans up any resources linked to this cell and resets <code>idx</code> property.
|
||||
*/
|
||||
void reset();
|
||||
|
||||
void setObjectID(long uIdx);
|
||||
long getObjectID();
|
||||
private:
|
||||
long _idx;
|
||||
ssize_t _idx;
|
||||
};
|
||||
|
||||
NS_CC_EXT_END
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 1b9d0c8c432617c696a71c3c099a88c5b8bd921d
|
||||
Subproject commit 301c8e9f6ba2f9d9d6012f6581cb40eddcc3840a
|
|
@ -1 +1 @@
|
|||
Subproject commit c842ccaa4b31121ac5f7be99ca64cafeb8d422c5
|
||||
Subproject commit 71a0aa4bc70743ae2078f4a43217987751ff17ec
|
Loading…
Reference in New Issue