27 TextElement(std::string text,
int size, CST_Color* color = 0,
int font_type = NORMAL,
int wrapped_width = 0);
30 void setText(
const std::string& text);
31 void setSize(
int size);
32 void setColor(
const CST_Color& color);
33 void setFont(
int font_type);
34 void setWrappedWidth(
int wrapped_width);
37 void update(
bool forceUpdate =
false);
38 std::string text =
"";
41 std::string customFontPath =
"";
43 static std::map<std::string, std::string> i18nCache;
44 static std::vector<std::pair<std::string, std::string>> getAvailableLanguages();
45 static void loadI18nCache(std::string locale);
46 static std::string curLang;
49 static bool useSimplifiedChineseFont;
50 static bool useKoreanFont;
51 static bool useJapaneseFont;
53 static std::map<std::string, int> forcedLangFonts;
58 CST_Color textColor = (CST_Color){ 0xff, 0xff, 0xff, 0xff };
59 int textFont = NORMAL;
60 int textWrappedWidth = 0;
63 static const char *fontPaths[];
void update(bool forceUpdate=false)
update TextElement with changes