private void OnDeleteOKClick() { if (this._deleteRequestUI.IsActiveControl) { this._deleteRequestUI.DoClose(); } RecyclingInfoPanelUI infoPanelUi = this._recyclingUI.InfoPanelUI; if (Object.op_Equality((Object)infoPanelUi, (Object)null) || !infoPanelUi.IsNumberInput) { return; } ValueTuple <ItemListController, ItemListController, ItemNodeUI, int, ButtonType> itemInfo = infoPanelUi.GetItemInfo(); ItemNodeUI itemNodeUi = (ItemNodeUI)itemInfo.Item3; StuffItem source = !Object.op_Inequality((Object)itemNodeUi, (Object)null) ? (StuffItem)null : itemNodeUi.Item; if (Object.op_Equality((Object)itemNodeUi, (Object)null) || source == null) { return; } int sel = (int)itemInfo.Item4; StuffItem stuffItem = new StuffItem(source); stuffItem.Count = Mathf.Min(source.Count, infoPanelUi.InputNumber); bool flag = source.Count <= stuffItem.Count; this.ListController.RemoveItem(sel, stuffItem); if (!flag) { return; } this._itemListUI.ForceSetNonSelect(); infoPanelUi.DetachItem(); }
private void SendItem(RecyclingInfoPanelUI panelUI) { if (Object.op_Equality((Object)panelUI, (Object)null) || !panelUI.IsActiveItemInfo || !panelUI.IsNumberInput) { return; } ValueTuple <ItemListController, ItemListController, ItemNodeUI, int, ButtonType> itemInfo = panelUI.GetItemInfo(); this.SendItem(panelUI.InputNumber, ((ItemListController)itemInfo.Item1).PanelType, (ItemListController)itemInfo.Item1, (ItemListController)itemInfo.Item2, (int)itemInfo.Item4, (ItemNodeUI)itemInfo.Item3); }
protected override void Awake() { base.Awake(); if (Object.op_Equality((Object)this._rootCanvasGroup, (Object)null)) { this._rootCanvasGroup = (CanvasGroup)((Component)this).GetComponent <CanvasGroup>(); } if (Object.op_Equality((Object)this._rootRectTransform, (Object)null)) { this._rootRectTransform = (RectTransform)((Component)this).GetComponent <RectTransform>(); } if (Object.op_Equality((Object)this._infoPanelUI, (Object)null)) { this._infoPanelUI = (RecyclingInfoPanelUI)((Component)this).GetComponentInChildren <RecyclingInfoPanelUI>(true); } if (Object.op_Equality((Object)this._decidedItemSlotUI, (Object)null)) { this._decidedItemSlotUI = (RecyclingDecidedItemSlotUI)((Component)this).GetComponentInChildren <RecyclingDecidedItemSlotUI>(true); } if (Object.op_Equality((Object)this._createItemStockUI, (Object)null)) { this._createItemStockUI = (RecyclingCreateItemStockUI)((Component)this).GetComponentInChildren <RecyclingCreateItemStockUI>(true); } if (Object.op_Equality((Object)this._createPanelUI, (Object)null)) { this._createPanelUI = (RecyclingCreatePanelUI)((Component)this).GetComponentInChildren <RecyclingCreatePanelUI>(true); } if (Object.op_Equality((Object)this._rootCanvasGroup, (Object)null) || Object.op_Equality((Object)this._rootRectTransform, (Object)null) || (Object.op_Equality((Object)this._infoPanelUI, (Object)null) || Object.op_Equality((Object)this._decidedItemSlotUI, (Object)null)) || (Object.op_Equality((Object)this._createItemStockUI, (Object)null) || !Object.op_Equality((Object)this._createPanelUI, (Object)null))) { ; } if (!Singleton <Resources> .IsInstance()) { return; } DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <Unit>((IObservable <M0>)Singleton <Resources> .Instance.LoadMapResourceStream, (Action <M0>)(__ => { IEnumerator settingCoroutine = this.ItemFilterSettingCoroutine(); DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <Unit>((IObservable <M0>)Observable.FromCoroutine((Func <IEnumerator>)(() => settingCoroutine), false), (Action <M0>)(_ => {}), (Action <Exception>)(_ => {}), (Action)(() => this.InventoryUISetting())), (Component)this); })), (Component)this); }