예제 #1
0
        protected virtual void Start()
        {
            _colors = FindObjectOfType <AppColors>();
            ColorBlock buttonColors = _target.colors;

            buttonColors.highlightedColor = _colors.Get(AppColors.Type.Highlighted);
            buttonColors.normalColor      = _colors.Get(AppColors.Type.Interactable);
            buttonColors.selectedColor    = _colors.Get(AppColors.Type.Selected);
            _target.colors = buttonColors;
        }
예제 #2
0
 protected virtual void Start()
 {
     _colors                   = FindObjectOfType <AppColors>();
     _graphic.color            = _colors.Get(AppColors.Type.Interactable);
     _selectable.OnSelected   += updateColor;
     _selectable.OnDeselected += updateColor;
     updateColor();
 }
예제 #3
0
 private void updateColor()
 {
     _graphic.color = _selectable.Selected ? _colors.Get(AppColors.Type.Selected) :
                      _colors.Get(AppColors.Type.InteractionElementBackground);
 }
예제 #4
0
 private void onSelect(string arg0)
 {
     _icon.color = _appColors.Get(AppColors.Type.Selected);
 }
예제 #5
0
 protected virtual void Start()
 {
     _colors       = FindObjectOfType <AppColors>();
     _target.color = _colors.Get(_type);
 }