public void ApplyTheme(ThemeType theme)
 {
     if (ImageObject != null)
     {
         ImageObject.color = GlobalTheme.ThemeColor((int)theme);
     }
     if (ImageContrastObject != null)
     {
         ImageContrastObject.color = GlobalTheme.ThemeContrastColor((int)theme);
     }
     if (Target != null)
     {
         ColorBlock themedColors = Target.colors;
         themedColors.highlightedColor = GlobalTheme.ThemeColor((int)theme);
         Target.colors = themedColors;
     }
     if (TextWithTheme != null)
     {
         TextWithTheme.color = GlobalTheme.ThemeColor((int)theme);
     }
     if (TextContrastTheme != null)
     {
         TextContrastTheme.color = GlobalTheme.ThemeContrastColor((int)theme);
     }
 }
        public void ApplyTheme()
        {
            if (ImageObject != null)
            {
                ImageObject.color = GlobalTheme.ThemeColor();
            }
            if (ImageContrastObject != null)
            {
                ImageContrastObject.color = GlobalTheme.ThemeContrastColor();
            }
            if (Target != null)
            {
                ColorBlock themedColors = Target.colors;
                themedColors.highlightedColor = GlobalTheme.ThemeColor();
                Target.colors = themedColors;
            }
            if (TextWithTheme != null)
            {
                TextWithTheme.color = GlobalTheme.ThemeColor();
            }
            if (TextContrastTheme != null)
            {
                TextContrastTheme.color = GlobalTheme.ThemeContrastColor();
            }

            Instances.Add(this);
        }
Exemple #3
0
        /// <summary>
        /// 메시지 박스를 호출합니다. 이 메시지 박스는 이후 반드시 비활성화됩니다.
        /// </summary>
        /// <param name="title">메시지 박스의 제목입니다.</param>
        /// <param name="body">메시지의 내용입니다.</param>
        /// <param name="buttons">메시지 박스에 포함될 버튼의 종류들입니다.</param>
        public static void Show(string title, string body, MessageBoxButtonType[] buttons)
        {
            Instance.Clear();

            Instance.Dimmer.SetActive(true);
            Instance.ColorBox.color = GlobalTheme.ThemeColor();
            Instance.TitleText.text = title;
            Instance.BodyText.text  = body;
            for (int i = 0; i < buttons.Length; i++)
            {
                if (buttons[i].Equals(MessageBoxButtonType.Language))
                {
                    Instance.ButtonList.AddLanguage();
                }
                else
                {
                    Instance.ButtonList.Add(buttons[i]);
                }
            }
            Instance.ShouldBeErased = true;
            Instance.gameObject.SetActive(true);
            Instance.MessageAnimator.Play("MessageBoxShow");
            Instance.StartCoroutine(WaitToResponse());
        }
Exemple #4
0
 private void Awake()
 {
     ImageObject.color         = GlobalTheme.ThemeColor((int)Theme);
     ImageContrastObject.color = GlobalTheme.ThemeContrastColor((int)Theme);
 }