示例#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);
 }