示例#1
0
        private void OnUnitSelect(long uniqueID)
        {
            if (!Object.op_Inequality((Object)this.mUnitListWindow, (Object)null) || !this.mUnitListWindow.IsEnabled())
            {
                return;
            }
            UnitListRootWindow rootWindow = this.mUnitListWindow.rootWindow;

            if (rootWindow == null || rootWindow.GetEditType() != UnitListWindow.EditType.DEFAULT)
            {
                return;
            }
            UnitListRootWindow.ListData listData = rootWindow.GetListData("unitlist");
            if (listData != null)
            {
                this.mCurrentTab           = rootWindow.GetCurrentTab();
                this.mCurrentTabAnchorePos = rootWindow.GetCurrentTabAnchore();
                this.mCurrentUnit          = uniqueID;
                this.mUEMain.UnitList      = listData.GetUniqs();
            }
            else
            {
                List <long>     longList = new List <long>();
                List <UnitData> units    = MonoSingleton <GameManager> .Instance.Player.Units;
                for (int index = 0; index < units.Count; ++index)
                {
                    longList.Add(units[index].UniqueID);
                }
                this.mUEMain.UnitList = longList;
            }
            this.mUEMain.Refresh(uniqueID, 0L, false);
            this.mUEMain.OnUserClose = new UnitEnhanceV3.CloseEvent(this.OnUEWindowClosedByUser);
            ButtonEvent.Invoke("UNITLIST_BTN_CLOSE", (object)null);
            this.mUnitListWindow.Enabled(false);
        }
示例#2
0
 public void RefreshTabMask()
 {
     if (this.support != null || this.param == null || (this.partyMainSlot != -1 || this.partySubSlot != -1))
     {
         this.tabMask = UnitListRootWindow.Tab.ALL;
     }
     else
     {
         this.tabMask = UnitListRootWindow.GetTabMask(this);
     }
 }
 private IEnumerator InitUnitInventoryWindow(UnitListRootWindow window, long unique_id)
 {
     // ISSUE: object of a compiler-generated type is created
     return((IEnumerator) new UnitManagementWindow.\u003CInitUnitInventoryWindow\u003Ec__Iterator16E()
     {
         window = window,
         unique_id = unique_id,
         \u003C\u0024\u003Ewindow = window,
         \u003C\u0024\u003Eunique_id = unique_id,
         \u003C\u003Ef__this = this
     });
 }
        private void OnUnitSelect(long uniqueID)
        {
            if (Object.op_Equality((Object)this.mUnitListWindow, (Object)null) || !this.mUnitListWindow.IsEnabled())
            {
                return;
            }
            UnitListRootWindow rootWindow = this.mUnitListWindow.rootWindow;

            if (rootWindow == null || rootWindow.GetEditType() != UnitListWindow.EditType.DEFAULT)
            {
                return;
            }
            this.StartCoroutine(this.InitUnitInventoryWindow(rootWindow, uniqueID));
        }
示例#5
0
 protected override void Awake()
 {
     base.Awake();
     this.m_WindowController.Initialize((FlowNode)this);
     this.m_WindowController.Add((FlowWindowBase.SerializeParamBase) this.m_RootWindowParam);
     this.m_WindowController.Add((FlowWindowBase.SerializeParamBase) this.m_SortWindowParam);
     this.m_WindowController.Add((FlowWindowBase.SerializeParamBase) this.m_FilterWindowParam);
     this.m_RootWindow   = this.m_WindowController.GetWindow <UnitListRootWindow>();
     this.m_SortWindow   = this.m_WindowController.GetWindow <UnitListSortWindow>();
     this.m_FilterWindow = this.m_WindowController.GetWindow <UnitListFilterWindow>();
     if (this.m_RootWindow != null)
     {
         this.m_RootWindow.SetRoot(this);
     }
     if (this.m_SortWindow != null)
     {
         this.m_SortWindow.SetRoot(this);
     }
     if (this.m_FilterWindow == null)
     {
         return;
     }
     this.m_FilterWindow.SetRoot(this);
 }
示例#6
0
 protected override void OnDestroy()
 {
     this.m_RootWindow = (UnitListRootWindow)null;
     this.m_WindowController.Release();
     base.OnDestroy();
 }