mirror of https://github.com/axmolengine/axmol.git
add function for ui button
This commit is contained in:
parent
a456a3b917
commit
90df276067
|
@ -24,11 +24,11 @@ THE SOFTWARE.
|
|||
|
||||
#include "ui/UIButton.h"
|
||||
#include "ui/UIScale9Sprite.h"
|
||||
#include "ui/UIHelper.h"
|
||||
#include "2d/CCLabel.h"
|
||||
#include "2d/CCSprite.h"
|
||||
#include "2d/CCActionInterval.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
#include "ui/UIHelper.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
@ -842,7 +842,6 @@ Size Button::getNormalSize() const
|
|||
{
|
||||
titleSize = _titleRenderer->getContentSize();
|
||||
}
|
||||
|
||||
Size imageSize;
|
||||
if (_buttonNormalRenderer != nullptr)
|
||||
{
|
||||
|
@ -854,6 +853,10 @@ Size Button::getNormalSize() const
|
|||
return Size(width,height);
|
||||
}
|
||||
|
||||
Size Button::getNormalTextureSize() const
|
||||
{
|
||||
return _normalTextureSize;
|
||||
}
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -212,6 +212,7 @@ CC_CONSTRUCTOR_ACCESS:
|
|||
const std::string& disableImage = "",
|
||||
TextureResType texType = TextureResType::LOCAL);
|
||||
|
||||
virtual Size getNormalTextureSize() const;
|
||||
|
||||
protected:
|
||||
virtual void initRenderer() override;
|
||||
|
|
Loading…
Reference in New Issue