Example #1
0
 public void Refresh(MonoLevelDebugToggle theToggle)
 {
     for (int i = 0; i < this.toggleList.Count; i++)
     {
         if (this.toggleList[i] != theToggle)
         {
             this.toggleList[i].toggle.isOn = false;
         }
     }
 }
Example #2
0
        private void Start()
        {
            this.toggleList = new List <MonoLevelDebugToggle>();
            int num = 0;

            foreach (string str in DesignDataTemp.LEVEL_LUA_ENTRY_FILE_NAMES["Common"])
            {
                Transform transform = UnityEngine.Object.Instantiate <GameObject>(Miscs.LoadResource <GameObject>("UI/Menus/Widget/DevLevel/DebugLevelToggle", BundleType.RESOURCE_FILE)).transform;
                transform.SetParent(this.scrollArea, false);
                RectTransform transform2 = (RectTransform)transform;
                transform2.anchoredPosition = new Vector3(330f, -60f - (num * 60f), 0f);
                MonoLevelDebugToggle component = transform.GetComponent <MonoLevelDebugToggle>();
                component.luaName          = str;
                component.luaNameText.text = str;
                component.levelDebug       = this;
                this.toggleList.Add(component);
                num++;
            }
            RectTransform scrollArea = (RectTransform)this.scrollArea;

            scrollArea.sizeDelta = new Vector2(0f, num * 60f);
        }