public override void Initialize(FlowWindowBase.SerializeParamBase param) { base.Initialize(param); this.m_Param = param as UnitListSortWindow.SerializeParam; if (this.m_Param == null) { throw new Exception(this.ToString() + " > Failed serializeParam null."); } SerializeValueBehaviour childComponent = this.GetChildComponent <SerializeValueBehaviour>("sort"); this.m_ValueList = !UnityEngine.Object.op_Inequality((UnityEngine.Object)childComponent, (UnityEngine.Object)null) ? new SerializeValueList() : childComponent.list; GameObject gameObject = this.m_ValueList.GetGameObject("list"); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)gameObject, (UnityEngine.Object)null)) { Toggle[] componentsInChildren = (Toggle[])gameObject.GetComponentsInChildren <Toggle>(); for (int index = 0; index < componentsInChildren.Length; ++index) { try { UnitListSortWindow.SelectType key = (UnitListSortWindow.SelectType)Enum.Parse(typeof(UnitListSortWindow.SelectType), ((UnityEngine.Object)componentsInChildren[index]).get_name()); ButtonEvent component = (ButtonEvent)((Component)componentsInChildren[index]).GetComponent <ButtonEvent>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { ButtonEvent.Event @event = component.GetEvent("UNITSORT_TGL_CHANGE"); if (@event != null) { if ((key & (UnitListSortWindow.SelectType) 16777215) != UnitListSortWindow.SelectType.NONE) { @event.valueList.SetField("section", (int)key); } if ((key & (UnitListSortWindow.SelectType) 251658240) != UnitListSortWindow.SelectType.NONE) { @event.valueList.SetField("alignment", (int)key); } } } this.m_Toggles.Add(key, componentsInChildren[index]); } catch (Exception ex) { Debug.LogError((object)("UnitSortWindow トグル名からSelectTypeを取得できない! > " + ((UnityEngine.Object)componentsInChildren[index]).get_name() + " ( Exception > " + ex.ToString() + " )")); } } } this.LoadSelectType(); this.Close(true); }
public override void Initialize(FlowWindowBase.SerializeParamBase param) { base.Initialize(param); this.m_Param = param as UnitListSortWindow.SerializeParam; if (this.m_Param == null) { throw new Exception(this.ToString() + " > Failed serializeParam null."); } SerializeValueBehaviour childComponent = this.GetChildComponent <SerializeValueBehaviour>("sort"); this.m_ValueList = !UnityEngine.Object.op_Inequality((UnityEngine.Object)childComponent, (UnityEngine.Object)null) ? new SerializeValueList() : childComponent.list; if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_Window, (UnityEngine.Object)null) && UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_Animator, (UnityEngine.Object)null)) { this.CacheToggleParam(((Component)this.m_Animator).get_gameObject()); } this.LoadSelectType(); this.Close(true); }