axmol/extensions/fairygui/display/FUILabel.h

48 lines
1.5 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __FUILABEL_H__
#define __FUILABEL_H__
#include "cocos2d.h"
#include "FairyGUIMacros.h"
#include "TextFormat.h"
NS_FGUI_BEGIN
class FUILabel : public axis::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 axis::Color3B& value);
virtual bool setBMFontFilePath(std::string_view bmfontFilePath, const axis::Vec2& imageOffset = axis::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