Esempio n. 1
0
        private void Start()
        {
            NRSettings.OnLoad(() => {
                var img              = transform.GetComponent <Image>();
                SpriteRenderer sr    = GetComponent <SpriteRenderer>();
                TextMeshProUGUI text = GetComponent <TextMeshProUGUI>();

                Color newColor = GenerateColorForType(type);

                if (img)
                {
                    img.color = newColor;
                }

                else if (sr)
                {
                    sr.color = newColor;
                }

                else if (text)
                {
                    text.color = newColor;
                }
            });
        }
Esempio n. 2
0
        void Start()
        {
            Vector3 defaultPos;

            defaultPos.x = 0;
            defaultPos.y = 0;
            defaultPos.z = -10.0f;
            window.GetComponent <RectTransform> ().localPosition = defaultPos;
            window.GetComponent <CanvasGroup> ().alpha           = 0.0f;
            window.SetActive(false);
            ResetColor();
            NRSettings.OnLoad(loadSavedSnaps);
        }
Esempio n. 3
0
        private void Start()
        {
            NRSettings.OnLoad(() => {
                var img = transform.GetComponent <Image>();

                if (img)
                {
                    Color newColor;

                    if (type == NRThemeableType.Left)
                    {
                        newColor = NRSettings.config.leftColor;
                    }
                    else if (type == NRThemeableType.Right)
                    {
                        newColor = NRSettings.config.rightColor;
                    }
                    else
                    {
                        newColor = NRSettings.config.selectedHighlightColor;
                    }



                    float h, s, v;
                    Color.RGBToHSV(newColor, out h, out s, out v);

                    h += hueModifier;
                    s += saturationModifier;
                    v += valueModifier;

                    newColor = Color.HSVToRGB(h, s, v);

                    img.color = new Color(newColor.r, newColor.g, newColor.b, alpha);
                }
            });
        }
Esempio n. 4
0
 private void Start()
 {
     InputManager.LoadHotkeys();
     NRSettings.OnLoad(SetUserColors);
 }
Esempio n. 5
0
 private void Start()
 {
     NRSettings.OnLoad(() => {
         UpdateUI();
     });
 }