mirror of https://github.com/axmolengine/axmol.git
issue #4900, refactor
This commit is contained in:
parent
92d9120967
commit
ca4a7a7e53
|
@ -65,7 +65,7 @@ public:
|
|||
* create a Text object with textContent, fontName and fontSize
|
||||
* the fontName could be a system font name or a TTF file path.
|
||||
* Usage: Text *text = Text::create("Hello", "Arial", 20); //create a system font UIText
|
||||
* Text *text = Text::create("xxx\xxx.ttf", "Arial", 20); //create a TTF font UIText
|
||||
* Text *text = Text::create("Hello", "xxx\xxx.ttf", 20); //create a TTF font UIText
|
||||
*/
|
||||
static Text* create(const std::string& textContent,
|
||||
const std::string& fontName,
|
||||
|
@ -106,8 +106,8 @@ public:
|
|||
* If you are trying to use a system font, you could just pass a font name
|
||||
* If you are trying to use a TTF, you should pass a file path to the TTF file
|
||||
* Usage: Text *text = Text::create("Hello", "Arial", 20); //create a system font UIText
|
||||
* text->setFontName("Marfelt"); // call this method will change the system font
|
||||
* text->setFontName("xxxx/xxx.ttf");
|
||||
* text->setFontName("Marfelt"); // it will change the font to system font no matter the previous font type is TTF or system font
|
||||
* text->setFontName("xxxx/xxx.ttf"); //it will change the font to TTF font no matter the previous font type is TTF or system font
|
||||
* @param font name.
|
||||
*/
|
||||
void setFontName(const std::string& name);
|
||||
|
|
Loading…
Reference in New Issue