Example #1
0
 public static void SetTextWithColor(this UIText self, string text, string colorstr)
 {
     if (string.IsNullOrEmpty(colorstr))
     {
         self.SetText(text);
     }
     else
     {
         self.SetText($"<color={colorstr}>{text}</color>");
     }
 }
Example #2
0
 public static void SetI18NKey(this UIText self, string key)
 {
     if (string.IsNullOrEmpty(key))
     {
         self.SetText("");
         return;
     }
     self.__DisableI18Component();
     self.__text_key = key;
     self.SetI18NText(null);
 }