issue #5183, add deprecated function for Widget

This commit is contained in:
andyque 2014-05-19 17:43:27 +08:00
parent a9e1c50897
commit 834a72315a
2 changed files with 11 additions and 1 deletions

View File

@ -876,6 +876,11 @@ LayoutParameter* Widget::getLayoutParameter()
{
return dynamic_cast<LayoutParameter*>(_layoutParameterDictionary.at((int)_layoutParameterType));
}
LayoutParameter* Widget::getLayoutParameter(LayoutParameter::Type type)
{
return dynamic_cast<LayoutParameter*>(_layoutParameterDictionary.at((int)type));
}
std::string Widget::getDescription() const
{

View File

@ -485,6 +485,8 @@ public:
* @return LayoutParameter
*/
LayoutParameter* getLayoutParameter() override;
CC_DEPRECATED_ATTRIBUTE LayoutParameter* getLayoutParameter(LayoutParameter::Type type);
/**
* Ignore the widget size
@ -672,9 +674,12 @@ protected:
Size _size;
Size _customSize;
bool _ignoreSize;
bool _affectByClipping;
SizeType _sizeType;
Vec2 _sizePercent;
bool _affectByClipping;
PositionType _positionType;
Vec2 _positionPercent;
bool _reorderWidgetChildDirty;