Esempio n. 1
0
 public override void Init(UICtrl _uiCtrl, bool _tutorial)
 {
     base.Init(_uiCtrl, _tutorial);
     this.graphics = new Graphic[2]
     {
         (Graphic)((Selectable)this.buttonRotL).get_image(),
         (Graphic)((Selectable)this.buttonRotR).get_image()
     };
     ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.buttonRotL), (Action <M0>)(_ => this.Rotation(90f)));
     ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.buttonRotR), (Action <M0>)(_ => this.Rotation(-90f)));
     ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.visibleReactive, (Action <M0>)(_b =>
     {
         this.canvasGroup.Enable(_b, false);
         foreach (Graphic graphic in this.graphics)
         {
             graphic.set_raycastTarget(_b);
         }
     }));
 }
Esempio n. 2
0
        public override void Init(UICtrl _uiCtrl, bool _tutorial)
        {
            base.Init(_uiCtrl, _tutorial);
            StringBuilder stringBuilder = new StringBuilder();

            if (Singleton <Manager.Map> .IsInstance())
            {
                stringBuilder.AppendFormat("拠点{0}", (object)(Singleton <Manager.Map> .Instance.HousingID + 1));
            }
            if (Singleton <Game> .IsInstance() && Singleton <Game> .Instance.WorldData != null && Singleton <Manager.Map> .IsInstance())
            {
                CraftInfo craftInfo = (CraftInfo)null;
                if (Singleton <Game> .Instance.WorldData.HousingData.CraftInfos.TryGetValue(Singleton <Manager.Map> .Instance.HousingID, out craftInfo))
                {
                    stringBuilder.AppendLine();
                    stringBuilder.AppendFormat("範囲 {0:#} : {1:#} : {2:#}", (object)(float)craftInfo.LimitSize.x, (object)(float)craftInfo.LimitSize.y, (object)(float)craftInfo.LimitSize.z);
                }
            }
            this.textInfo.set_text(stringBuilder.ToString());
        }
Esempio n. 3
0
 public override void Init(UICtrl _uiCtrl, bool _tutorial)
 {
     base.Init(_uiCtrl, _tutorial);
     this.virtualizingTreeView.ItemDataBinding  += new EventHandler <VirtualizingTreeViewItemDataBindingArgs>(this.OnItemDataBinding);
     this.virtualizingTreeView.SelectionChanged += new EventHandler <SelectionChangedArgs>(this.OnSelectionChanged);
     this.virtualizingTreeView.ItemsRemoving    += new EventHandler <ItemsCancelArgs>(this.OnItemsRemoving);
     this.virtualizingTreeView.ItemsRemoved     += new EventHandler <ItemsRemovedArgs>(this.OnItemsRemoved);
     this.virtualizingTreeView.ItemExpanding    += new EventHandler <VirtualizingItemExpandingArgs>(this.OnItemExpanding);
     this.virtualizingTreeView.ItemCollapsed    += new EventHandler <VirtualizingItemCollapsedArgs>(this.OnItemCollapsed);
     this.virtualizingTreeView.ItemBeginDrag    += new EventHandler <ItemArgs>(this.OnItemBeginDrag);
     this.virtualizingTreeView.ItemDrop         += new EventHandler <ItemDropArgs>(this.OnItemDrop);
     this.virtualizingTreeView.ItemBeginDrop    += new EventHandler <ItemDropCancelArgs>(this.OnItemBeginDrop);
     this.virtualizingTreeView.ItemEndDrag      += new EventHandler <ItemArgs>(this.OnItemEndDrag);
     this.virtualizingTreeView.AutoExpand        = true;
     ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.buttonDelete), (Action <M0>)(_ => this.virtualizingTreeView.RemoveSelectedItems()));
     ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.buttonDuplicate), (Action <M0>)(_ => this.Duplicate()));
     ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.buttonFolder), (Action <M0>)(_ => Singleton <UndoRedoManager> .Instance.Do((ICommand) new AddFolderCommand())));
     Singleton <Selection> .Instance.onSelectFunc += new Action <ObjectCtrl[]>(this.OnSelectFunc);
     ((Selectable)this.buttonDelete).set_interactable(false);
     ((Selectable)this.buttonDuplicate).set_interactable(false);
 }
Esempio n. 4
0
        public override void Init(UICtrl _uiCtrl, bool _tutorial)
        {
            base.Init(_uiCtrl, _tutorial);
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable((Button)this.buttonClose), (Action <M0>)(_ => this.Close()));
            foreach (KeyValuePair <int, Manager.Housing.AreaSizeInfo> keyValuePair in Singleton <Manager.Housing> .Instance.dicAreaSizeInfo)
            {
                GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.tabOriginal, this.tabRoot);
                gameObject.SetActive(true);
                SizeTab component = (SizeTab)gameObject.GetComponent <SizeTab>();
                int     type      = keyValuePair.Value.no;
                component.Text = string.Format("{0}X{1}X{2}", (object)((Vector3Int) ref keyValuePair.Value.limitSize).get_x(), (object)((Vector3Int) ref keyValuePair.Value.limitSize).get_y(), (object)((Vector3Int) ref keyValuePair.Value.limitSize).get_z());
                ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(component.toggle), (Func <M0, bool>)(_b => _b)), (Action <M0>)(_ => this.SelectTab(type, false)));
                this.dicTabInfo[type] = new SaveLoadUICtrl.TabInfo()
                {
                    gameObject = gameObject,
                    sizeTab    = component
                };
            }
            for (int index = 0; index < this.buttonsThumbnail.Length; ++index)
            {
                int idx = index;
                ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.buttonsThumbnail[index]), (Action <M0>)(_ =>
                {
                    this.infoLoad.Setup(this.rawsThumbnail[idx].get_texture());
                    this.select = this.thumbnailLimit * this.page + idx;
                }));
            }
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable((Button)this.infoLoad.buttonClose), (Action <M0>)(_ => this.infoLoad.Visible = false));
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable((Button)this.infoLoad.buttonDelete), (Action <M0>)(_ =>
            {
                ConfirmScene.Sentence     = "データを消去しますか?";
                ConfirmScene.OnClickedYes = (Action)(() =>
                {
                    File.Delete(this.listPath[this.select]);
                    this.InitInfo(this.tab);
                    this.SetPage(this.page, true);
                    this.infoLoad.Visible = false;
                });
                ConfirmScene.OnClickedNo = (Action)(() => {});
                Singleton <Game> .Instance.LoadDialog();
            }));
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable((Button)this.infoLoad.buttonLoad), (Action <M0>)(_ =>
            {
                ConfirmScene.Sentence     = "データを読込みますか?\n" + "セットされたアイテムは削除されます。".Coloring("#DE4529FF").Size(24);
                ConfirmScene.OnClickedYes = (Action)(() =>
                {
                    Singleton <Selection> .Instance.SetSelectObjects((ObjectCtrl[])null);
                    this.UICtrl.ListUICtrl.ClearList();
                    Singleton <UndoRedoManager> .Instance.Clear();
                    this.Visible = false;
                    Singleton <CraftScene> .Instance.WorkingUICtrl.Visible = true;
                    Singleton <Manager.Housing> .Instance.LoadAsync(this.listPath[this.select], (Action <bool>)(_b =>
                    {
                        this.UICtrl.ListUICtrl.UpdateUI();
                        Singleton <CraftScene> .Instance.WorkingUICtrl.Visible = false;
                        this.Close();
                    }));
                });
                ConfirmScene.OnClickedNo = (Action)(() => {});
                Singleton <Game> .Instance.LoadDialog();
            }));
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.visibleReactive, (Action <M0>)(_b =>
            {
                this.canvasGroup.Enable(_b, false);
                if (!_b)
                {
                    return;
                }
                this.buttonClose.ClearState();
                this.infoLoad.Visible = false;
            }));
            int housingId = Singleton <CraftScene> .Instance.HousingID;

            Manager.Housing.AreaInfo areaInfo = (Manager.Housing.AreaInfo)null;
            if (Singleton <Manager.Housing> .Instance.dicAreaInfo.TryGetValue(housingId, out areaInfo))
            {
                Manager.Housing.AreaSizeInfo areaSizeInfo = (Manager.Housing.AreaSizeInfo)null;
                if (Singleton <Manager.Housing> .Instance.dicAreaSizeInfo.TryGetValue(areaInfo.size, out areaSizeInfo))
                {
                    foreach (KeyValuePair <int, SaveLoadUICtrl.TabInfo> keyValuePair in this.dicTabInfo)
                    {
                        keyValuePair.Value.Interactable = areaSizeInfo.compatibility.Contains(keyValuePair.Key);
                    }
                }
            }
            this.Visible = false;
        }
Esempio n. 5
0
        public override void Init(UICtrl _uiCtrl, bool _tutorial)
        {
            base.Init(_uiCtrl, _tutorial);
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.buttonAdd), (Action <M0>)(_ => this.UICtrl.AddUICtrl.Active = !this.UICtrl.AddUICtrl.Active));
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.buttonUndo), (Action <M0>)(_ =>
            {
                if (!Singleton <UndoRedoManager> .IsInstance())
                {
                    return;
                }
                Singleton <UndoRedoManager> .Instance.Undo();
            }));
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.buttonRedo), (Action <M0>)(_ =>
            {
                if (!Singleton <UndoRedoManager> .IsInstance())
                {
                    return;
                }
                Singleton <UndoRedoManager> .Instance.Redo();
            }));
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.buttonCamera), (Action <M0>)(_ => this.Camera = !this.Camera));
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.buttonAxis), (Action <M0>)(_ => this.Axis     = !this.Axis));
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.buttonGrid), (Action <M0>)(_ => this.Grid     = !this.Grid));
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.buttonSave), (Action <M0>)(_ => this.Save()));
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.buttonLoad), (Action <M0>)(_ => this.UICtrl.SaveLoadUICtrl.Open()));
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.buttonReset), (Action <M0>)(_ =>
            {
                ConfirmScene.Sentence     = "初期化しますか?\n" + "セットされたアイテムは削除されます。".Coloring("#DE4529FF").Size(24);
                ConfirmScene.OnClickedYes = (Action)(() =>
                {
                    this.UICtrl.ListUICtrl.VirtualizingTreeView.SelectedIndex = -1;
                    Singleton <Manager.Housing> .Instance.ResetObject();
                    this.UICtrl.ListUICtrl.UpdateUI();
                    Singleton <UndoRedoManager> .Instance.Clear();
                });
                ConfirmScene.OnClickedNo = (Action)(() => {});
                Singleton <Game> .Instance.LoadDialog();
            }));
            ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.buttonEnd), (Action <M0>)(_ =>
            {
                if (Singleton <CraftScene> .Instance.IsShortcutUI)
                {
                    return;
                }
                if (Singleton <CraftScene> .Instance.CraftInfo.IsOverlapNow)
                {
                    this.IsMessage = true;
                    MapUIContainer.PushMessageUI("配置に問題があるものが存在します", 2, 1, (Action)(() => this.IsMessage = false));
                }
                else
                {
                    ConfirmScene.Sentence     = "ハウジングを終了しますか?";
                    ConfirmScene.OnClickedYes = (Action)(() =>
                    {
                        Singleton <CraftScene> .Instance.SceneEnd();
                        ObservableExtensions.Subscribe <Unit>((IObservable <M0>)MapUIContainer.StartFade(FadeCanvas.PanelType.Blackout, (FadeType)0, 1f, true), (Action <M0>)(__ => {}), (Action)(() => this.EndHousing()));
                    });
                    ConfirmScene.OnClickedNo = (Action)(() => Singleton <CraftScene> .Instance.IsEndCheck = false);
                    Singleton <Game> .Instance.LoadDialog();
                    Singleton <CraftScene> .Instance.IsEndCheck = true;
                }
            }));
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.cameraReactive, (Action <M0>)(_b => this.spritesCamera.SafeProc <Sprite>(!_b ? 1 : 0, (Action <Sprite>)(_s => ((Selectable)this.buttonCamera).get_image().set_sprite(_s)))));
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.axisReactive, (Action <M0>)(_b =>
            {
                this.spritesAxis.SafeProc <Sprite>(!_b ? 1 : 0, (Action <Sprite>)(_s => ((Selectable)this.buttonAxis).get_image().set_sprite(_s)));
                GuideObject guideObject = Singleton <GuideManager> .Instance.GuideObject;
                if (!Object.op_Implicit((Object)guideObject))
                {
                    return;
                }
                guideObject.visibleOutside = _b;
            }));
            ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.gridReactive, (Action <M0>)(_b =>
            {
                this.spritesGrid.SafeProc <Sprite>(!_b ? 1 : 0, (Action <Sprite>)(_s => ((Selectable)this.buttonGrid).get_image().set_sprite(_s)));
                if (!Singleton <GuideManager> .IsInstance())
                {
                    return;
                }
                Singleton <GuideManager> .Instance.VisibleGrid = _b;
            }));
            CraftCamera craftCamera = this.UICtrl.CraftCamera;

            craftCamera.NoCtrlCondition = craftCamera.NoCtrlCondition + new VirtualCameraController.NoCtrlFunc(this.NoCameraCtrl);
            if (Singleton <UndoRedoManager> .IsInstance())
            {
                Singleton <UndoRedoManager> .Instance.CanUndoChange += new EventHandler <CanhangeArgs>(this.CanUndoChange);
                Singleton <UndoRedoManager> .Instance.CanRedoChange += new EventHandler <CanhangeArgs>(this.CanRedoChange);
            }
            ((Selectable)this.buttonUndo).set_interactable(false);
            ((Selectable)this.buttonRedo).set_interactable(false);
            if (!_tutorial)
            {
                return;
            }
            ((Selectable)this.buttonSave).set_interactable(false);
            ((Selectable)this.buttonLoad).set_interactable(false);
        }
Esempio n. 6
0
 public override void Init(UICtrl _uiCtrl, bool _tutorial)
 {
     base.Init(_uiCtrl, _tutorial);
     ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.itemUI.color1.buttonColor), (Action <M0>)(_ =>
     {
         if (this.itemUI.colorPanel.isOpen && this.itemUI.color1.IsOpen)
         {
             this.itemUI.Close(true);
         }
         else
         {
             this.itemUI.SetOpen(0);
             this.itemUI.colorPanel.Setup(this.OIItem.Color1, (Action <Color>)(_c =>
             {
                 this.itemUI.color1.Color = _c;
                 this.OCItem.Color1       = _c;
             }), false);
         }
     }));
     ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.itemUI.color2.buttonColor), (Action <M0>)(_ =>
     {
         if (this.itemUI.colorPanel.isOpen && this.itemUI.color2.IsOpen)
         {
             this.itemUI.Close(true);
         }
         else
         {
             this.itemUI.SetOpen(1);
             this.itemUI.colorPanel.Setup(this.OIItem.Color2, (Action <Color>)(_c =>
             {
                 this.itemUI.color2.Color = _c;
                 this.OCItem.Color2       = _c;
             }), false);
         }
     }));
     ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.itemUI.color3.buttonColor), (Action <M0>)(_ =>
     {
         if (this.itemUI.colorPanel.isOpen && this.itemUI.color3.IsOpen)
         {
             this.itemUI.Close(true);
         }
         else
         {
             this.itemUI.SetOpen(2);
             this.itemUI.colorPanel.Setup(this.OIItem.Color3, (Action <Color>)(_c =>
             {
                 this.itemUI.color3.Color = _c;
                 this.OCItem.Color3       = _c;
             }), false);
         }
     }));
     ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.itemUI.emissionColor.buttonColor), (Action <M0>)(_ =>
     {
         if (this.itemUI.colorPanel.isOpen && this.itemUI.emissionColor.IsOpen)
         {
             this.itemUI.Close(true);
         }
         else
         {
             float exposure = 0.0f;
             Color32 baseLinearColor;
             SettingUICtrl.DecomposeHdrColor(this.OIItem.EmissionColor, out baseLinearColor, out exposure);
             baseLinearColor.a = (__Null)(int)byte.MaxValue;
             this.itemUI.SetOpen(3);
             this.itemUI.colorPanel.Setup(Color32.op_Implicit(baseLinearColor), (Action <Color>)(_c =>
             {
                 _c = Color.op_Multiply(_c, Mathf.Pow(2f, exposure));
                 this.itemUI.emissionColor.Color = _c;
                 this.OCItem.EmissionColor       = _c;
             }), false);
         }
     }));
     ObservableExtensions.Subscribe <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(this.itemUI.option.toggle), (Action <M0>)(_b =>
     {
         if (this.OCItem == null)
         {
             return;
         }
         this.OCItem.VisibleOption = _b;
     }));
     ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.itemUI.init.buttonInit), (Action <M0>)(_ =>
     {
         if (this.OCItem == null)
         {
             return;
         }
         this.OCItem.ResetColor();
         this.itemUI.Close(true);
         this.itemUI.color1.Color        = this.OCItem.Color1;
         this.itemUI.color2.Color        = this.OCItem.Color2;
         this.itemUI.color3.Color        = this.OCItem.Color3;
         this.itemUI.emissionColor.Color = this.OCItem.EmissionColor;
     }));
     this.itemUI.colorPanel.onClose += (Action)(() => this.itemUI.Close(false));
     ObservableExtensions.Subscribe <string>((IObservable <M0>)UnityUIComponentExtensions.OnEndEditAsObservable(this.folderUI.inputName), (Action <M0>)(_s =>
     {
         this.OIFolder.Name = _s;
         this.UICtrl.ListUICtrl.RefreshList();
     }));
     Singleton <Selection> .Instance.onSelectFunc += new Action <ObjectCtrl[]>(this.OnSelect);
 }
Esempio n. 7
0
 public override void Init(UICtrl _uiCtrl, bool _tutorial)
 {
     base.Init(_uiCtrl, _tutorial);
     foreach (KeyValuePair <int, Manager.Housing.CategoryInfo> keyValuePair in Singleton <Manager.Housing> .Instance.dicCategoryInfo)
     {
         GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.objCategory, this.togglesRoot);
         gameObject.SetActive(true);
         TabUI tab = (TabUI)gameObject.GetComponent <TabUI>();
         tab.rawImage.set_texture((Texture)keyValuePair.Value.Thumbnail);
         Toggle toggleSelect = tab.toggleSelect;
         toggleSelect.set_isOn(false);
         int c = keyValuePair.Key;
         ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(toggleSelect), (Func <M0, bool>)(_b => _b)), (Action <M0>)(_ => this.Category = c));
         DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <PointerEventData>(Observable.TakeUntilDestroy <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)toggleSelect), (Component)tab.imageCursor), (Action <M0>)(_ => ((Behaviour)tab.imageCursor).set_enabled(true))), gameObject);
         DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <PointerEventData>(Observable.TakeUntilDestroy <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerExitAsObservable((UIBehaviour)toggleSelect), (Component)tab.imageCursor), (Action <M0>)(_ => ((Behaviour)tab.imageCursor).set_enabled(false))), gameObject);
     }
     ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable((Button)this.buttonClose), (Action <M0>)(_ => this.Active = false));
     ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.buttonAdd), (Action <M0>)(_ =>
     {
         AddUICtrl.FileInfo fileInfo = this.fileInfos.SafeGet <AddUICtrl.FileInfo>(this.Select);
         if (fileInfo != null)
         {
             Singleton <UndoRedoManager> .Instance.Do((ICommand) new AddItemCommand(fileInfo.no));
             Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_L);
         }
         this.Active = false;
     }));
     ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.buttonActivate), (Action <M0>)(_ =>
     {
         ConfirmScene.Sentence     = "作成しますか";
         ConfirmScene.OnClickedYes = (Action)(() =>
         {
             AddUICtrl.FileInfo fileInfo = this.fileInfos.SafeGet <AddUICtrl.FileInfo>(this.Select);
             if (fileInfo == null)
             {
                 return;
             }
             fileInfo.SetUnlock();
             this.Visible = true;
             ((ReactiveProperty <int>) this.selectReactive).SetValueAndForceNotify(this.Select);
             this.view.RefreshAllShownItem();
             Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Craft);
         });
         ConfirmScene.OnClickedNo = (Action)(() => this.Visible = true);
         Singleton <Game> .Instance.LoadDialog();
         this.Visible = false;
     }));
     ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.activeReactive, (Action <M0>)(_b =>
     {
         this.Visible = _b;
         if (!_b)
         {
             return;
         }
         this.isForceUpdate = true;
         ((ReactiveProperty <int>) this.selectReactive).SetValueAndForceNotify(-1);
         this.buttonClose.ClearState();
     }));
     ObservableExtensions.Subscribe <int>((IObservable <M0>) this.categoryReactive, (Action <M0>)(_i =>
     {
         this.CreateList(_i);
         Manager.Housing.CategoryInfo categoryInfo = (Manager.Housing.CategoryInfo)null;
         if (Singleton <Manager.Housing> .Instance.dicCategoryInfo.TryGetValue(_i, out categoryInfo))
         {
             this.textCategory.set_text(categoryInfo.name);
             this.imageCategory.set_texture((Texture)categoryInfo.Thumbnail);
         }
         else
         {
             Debug.LogErrorFormat("存在しないカテゴリー[{0}]", new object[1]
             {
                 (object)_i
             });
         }
     }));
     ObservableExtensions.Subscribe <int>((IObservable <M0>) this.selectReactive, (Action <M0>)(_i =>
     {
         AddUICtrl.FileInfo fileInfo = this.fileInfos.SafeGet <AddUICtrl.FileInfo>(_i);
         if (fileInfo != null)
         {
             if (fileInfo.Unlock)
             {
                 this.cgCraft.Enable(false, false);
                 bool flag            = !Singleton <Manager.Housing> .Instance.CheckLimitNum(fileInfo.no);
                 this.ButtonAddEnable = !flag;
                 ((Behaviour)this.textItemLimit).set_enabled(flag);
             }
             else
             {
                 this.cgCraft.Enable(true, false);
                 ((Selectable)this.buttonActivate).set_interactable(this.materialUI.UpdateUI(fileInfo.loadInfo));
                 this.ButtonAddEnable = false;
                 ((Behaviour)this.textItemLimit).set_enabled(false);
             }
             this.textName.set_text(fileInfo.loadInfo.name);
             this.textText.set_text(fileInfo.loadInfo.text);
             ((Behaviour)this.imagesInfo[0]).set_enabled(fileInfo.loadInfo.isAccess);
             ((Behaviour)this.imagesInfo[1]).set_enabled(fileInfo.loadInfo.isAction);
             ((Behaviour)this.imagesInfo[2]).set_enabled(fileInfo.loadInfo.isHPoint);
             this.cgInfo.Enable(true, false);
         }
         else
         {
             this.cgInfo.Enable(false, false);
             this.cgCraft.Enable(false, false);
             this.ButtonAddEnable = false;
             ((Behaviour)this.textItemLimit).set_enabled(false);
             if (!this.isForceUpdate)
             {
                 return;
             }
             this.view.RefreshAllShownItem();
             this.isForceUpdate = false;
         }
     }));
     ((ReactiveProperty <int>) this.categoryReactive).SetValueAndForceNotify(-1);
 }