コード例 #1
0
 public static void SetButtonUnderlineColor(this Button parent, Color color)
 {
     HMUI.ImageView img = parent.GetComponentsInChildren <HMUI.ImageView>().FirstOrDefault(x => x.name == "Underline");
     if (img != null)
     {
         img.color = color;
     }
 }
コード例 #2
0
 public static void SetButtonBackgroundActive(this Button parent, bool active)
 {
     HMUI.ImageView img = parent.GetComponentsInChildren <HMUI.ImageView>().Last(x => x.name == "BG");
     if (img != null)
     {
         img.gameObject.SetActive(active);
     }
 }
コード例 #3
0
 public static void SetButtonBorder(this Button button, Color color)
 {
     HMUI.ImageView img = button.GetComponentsInChildren <HMUI.ImageView>().FirstOrDefault(x => x.name == "Border");
     if (img != null)
     {
         img.color0     = color;
         img.color1     = color;
         img.color      = color;
         img.fillMethod = Image.FillMethod.Horizontal;
         img.SetAllDirty();
     }
 }