mirror of https://github.com/axmolengine/axmol.git
48 lines
1.5 KiB
C++
48 lines
1.5 KiB
C++
#ifndef __FUILABEL_H__
|
||
#define __FUILABEL_H__
|
||
|
||
#include "cocos2d.h"
|
||
#include "FairyGUIMacros.h"
|
||
#include "TextFormat.h"
|
||
|
||
NS_FGUI_BEGIN
|
||
|
||
class FUILabel : public ax::Label
|
||
{
|
||
public:
|
||
FUILabel();
|
||
virtual ~FUILabel();
|
||
|
||
CREATE_FUNC(FUILabel);
|
||
|
||
std::string_view getText() const { return getString(); }
|
||
void setText(std::string_view value);
|
||
|
||
TextFormat* getTextFormat() const { return _textFormat; }
|
||
void applyTextFormat();
|
||
|
||
void setUnderlineColor(const ax::Color3B& value);
|
||
|
||
virtual bool setBMFontFilePath(std::string_view bmfontFilePath, const ax::Vec2& imageOffset = ax::Vec2::ZERO, float fontSize = 0) override;
|
||
|
||
void setGrayed(bool value);
|
||
protected:
|
||
/*
|
||
ע<>⣡<EFBFBD><E2A3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˱<EFBFBD><CBB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD>cocos2d<32><64>Դ<EFBFBD>룬<EFBFBD>ļ<EFBFBD>2d/CCLabel.h<><68><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC>672<37>У<EFBFBD>ΪupdateBMFontScale<6C><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>virtual<61><6C><EFBFBD>η<EFBFBD><CEB7><EFBFBD>
|
||
<20><>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><C7BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8>ΪFontFnt<6E><74><EFBFBD>͵Ĵ<CDB5><C4B4>룬<EFBFBD><EBA3AC><EFBFBD><EFBFBD><EFBFBD>Dz<EFBFBD>ʹ<EFBFBD><CAB9>FontFnt<6E><74>FontFntֻ֧<D6BB>ִ<EFBFBD><D6B4>ⲿ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>BMFontConfiguration<6F>Ƕ<EFBFBD><C7B6><EFBFBD><EFBFBD><EFBFBD>cpp<70><70>ġ<EFBFBD><C4A1><EFBFBD>
|
||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
*/
|
||
virtual void updateBMFontScale() override;
|
||
|
||
private:
|
||
TextFormat* _textFormat;
|
||
std::string _fontName;
|
||
int _fontSize;
|
||
bool _bmFontCanTint;
|
||
bool _grayed;
|
||
};
|
||
|
||
NS_FGUI_END
|
||
|
||
#endif
|