axmol/extensions/fairygui/display/FUILabel.h

48 lines
1.5 KiB
C
Raw Normal View History

2020-08-04 12:31:33 +08:00
#ifndef __FUILABEL_H__
#define __FUILABEL_H__
#include "cocos2d.h"
#include "FairyGUIMacros.h"
#include "TextFormat.h"
NS_FGUI_BEGIN
class FUILabel : public axis::Label
2020-08-04 12:31:33 +08:00
{
public:
FUILabel();
virtual ~FUILabel();
CREATE_FUNC(FUILabel);
std::string_view getText() const { return getString(); }
void setText(std::string_view value);
2020-08-04 12:31:33 +08:00
TextFormat* getTextFormat() const { return _textFormat; }
void applyTextFormat();
void setUnderlineColor(const axis::Color3B& value);
virtual bool setBMFontFilePath(std::string_view bmfontFilePath, const axis::Vec2& imageOffset = axis::Vec2::ZERO, float fontSize = 0) override;
2020-08-04 12:31:33 +08:00
void setGrayed(bool value);
protected:
/*
ע<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˱<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>޸<EFBFBD>cocos2d<EFBFBD><EFBFBD>Դ<EFBFBD><EFBFBD>ļ<EFBFBD>2d/CCLabel.h<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><EFBFBD>672<EFBFBD>У<EFBFBD>ΪupdateBMFontScale<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>virtual<EFBFBD><EFBFBD><EFBFBD>η<EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>ΪFontFnt<EFBFBD><EFBFBD><EFBFBD>͵Ĵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Dz<EFBFBD>ʹ<EFBFBD><EFBFBD>FontFnt<EFBFBD><EFBFBD>FontFntֻ֧<EFBFBD>ִ<EFBFBD><EFBFBD>ⲿ<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>BMFontConfiguration<EFBFBD>Ƕ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>cpp<EFBFBD><EFBFBD>ġ<EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD>д<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
2020-08-04 12:31:33 +08:00
*/
virtual void updateBMFontScale() override;
private:
TextFormat* _textFormat;
std::string _fontName;
int _fontSize;
bool _bmFontCanTint;
bool _grayed;
};
NS_FGUI_END
#endif