private bool ToggleHasChanged(Toggle toggle, string key)
        {
            DataMe me = DataManager.Me.Data[0];

            if (!me.ConfigFlags.ContainsKey(key))
            {
                return(false);
            }
            return(toggle.isOn != me.ConfigFlags[key]);
        }
        private void SetToggle(Toggle toggle, string key)
        {
            DataMe me = DataManager.Me.Data[0];

            if (!me.ConfigFlags.ContainsKey(key))
            {
                toggle.isOn         = false;
                toggle.interactable = false;
            }
            else
            {
                toggle.isOn         = me.ConfigFlags[key];
                toggle.interactable = true;
            }
        }
Beispiel #3
0
        public void Refresh()
        {
            if (DataManager.Me.Data == null)
            {
                SetMainContacts(new DataUser[0]);
                SetOtherContacts(new DataUser[0]);
                return;
            }

            DataMe me = DataManager.Me.Data[0];

            DataUser[] mainContacts = RelationsToContacts(me.Relationships);
            SetMainContacts(mainContacts);
            SetOtherContacts(me.Contacts);
        }