private void StartNewGame() { ObservableExtensions.Subscribe <string>((IObservable <M0>)UnityUIComponentExtensions.OnEndEditAsObservable(this.worldNameInput.input), (Action <M0>)(str => { if (str.IsNullOrEmpty()) { str = this.initWorldName; this.worldNameInput.input.set_text(str); } this.worldNameInput.textDummy.set_text(str); this.selectWorldData.Name = str; })); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnNewGameBack), (Action <M0>)(_ => this.BackToLoad())); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.btnNewGameBack), (Action <M0>)(_ => Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Select))); ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnNewGameEntry), (Func <M0, bool>)(_ => !Singleton <Scene> .Instance.IsFadeNow)), (Action <M0>)(_ => { Debug.Log((object)this.selectWorldData.Name); this.objNewGameRoot.SetActiveIfDifferent(false); ((UnityEngine.Component) this.lcwFemale).get_gameObject().SetActiveIfDifferent(true); this.lcwFemale.ReCreateList(true, true); Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_L); })); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.btnNewGameEntry), (Action <M0>)(_ => Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Select))); ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((UnityEngine.Component) this), (Func <M0, bool>)(_ => this.objNewGameRoot.get_activeSelf())), (Action <M0>)(_ => { bool isFocused = this.worldNameInput.input.get_isFocused(); this.worldNameInput.objDummy.SetActiveIfDifferent(!isFocused); ((Behaviour)this.worldNameInput.inputText).set_enabled(isFocused); })); }
protected override void Start() { base.Start(); this.UpdateBirthDayDD(); this.customBase.lstInputField.Add(this.inpName); this.customBase.actUpdateCvsChara += new Action(((CvsBase) this).UpdateCustomUI); if (Object.op_Implicit((Object) this.inpName)) this.inpName.ActivateInputField(); if (Object.op_Implicit((Object) this.inpName)) ObservableExtensions.Subscribe<string>((IObservable<M0>) UnityUIComponentExtensions.OnEndEditAsObservable(this.inpName), (Action<M0>) (str => { this.parameter.fullname = str; this.customBase.changeCharaName = true; })); this.randomName.Initialize(); if (Object.op_Implicit((Object) this.btnRandom)) ObservableExtensions.Subscribe<Unit>((IObservable<M0>) UnityUIComponentExtensions.OnClickAsObservable(this.btnRandom), (Action<M0>) (_ => { this.inpName.set_text(this.randomName.GetRandName(this.chaCtrl.sex)); this.parameter.fullname = this.inpName.get_text(); this.customBase.changeCharaName = true; })); // ISSUE: method pointer ((UnityEvent<int>) this.ddBirthMonth.get_onValueChanged()).AddListener(new UnityAction<int>((object) this, __methodptr(\u003CStart\u003Em__2))); // ISSUE: method pointer ((UnityEvent<int>) this.ddBirthDay.get_onValueChanged()).AddListener(new UnityAction<int>((object) this, __methodptr(\u003CStart\u003Em__3))); }
private void Start() { this.customBase.lstInputField.Add(this.inpName); if (!Object.op_Inequality((Object)null, (Object)this.inpName)) { return; } ObservableExtensions.Subscribe <string>((IObservable <M0>)UnityUIComponentExtensions.OnEndEditAsObservable(this.inpName), (Action <M0>)(buf => { if (!Object.op_Inequality((Object)null, (Object)this.textNameDummy)) { return; } this.textNameDummy.set_text(this.inpName.get_text()); })); if (Object.op_Inequality((Object)null, (Object)this.objNameDummy)) { ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable(this.objNameDummy), (Action <M0>)(_ => { bool isFocused = this.inpName.get_isFocused(); if (this.objNameDummy.get_activeSelf() != isFocused) { return; } this.objNameDummy.SetActiveIfDifferent(!isFocused); })); } if (Object.op_Inequality((Object)null, (Object)this.btnBack)) { ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnBack), (Action <M0>)(_ => { Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Cancel); this.customBase.customCtrl.showInputCoordinate = false; })); } if (!Object.op_Inequality((Object)null, (Object)this.btnEntry)) { return; } ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((Component)this.btnEntry), (Action <M0>)(_ => ((Selectable)this.btnEntry).set_interactable(!this.inpName.get_text().IsNullOrEmpty()))); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnEntry), (Action <M0>)(_ => { Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Save); this.customBase.customCtrl.showInputCoordinate = false; if (this.actEntry == null) { return; } this.actEntry(this.inpName.get_text()); })); }
private void Start() { this.handleName = Singleton <GameSystem> .Instance.HandleName; this.inpHandleName.set_text(this.handleName); this.inpHandleName.ActivateInputField(); ObservableExtensions.Subscribe <string>((IObservable <M0>)UnityUIComponentExtensions.OnEndEditAsObservable(this.inpHandleName), (Action <M0>)(buf => { this.notIllusion = !(buf == "イリュージョン公式"); this.handleName = buf; })); if (Object.op_Implicit((Object)this.btnYes)) { TextMeshProUGUI text = (TextMeshProUGUI)((Component)this.btnYes).GetComponentInChildren <TextMeshProUGUI>(true); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((Component)this.btnYes), (Action <M0>)(_ => { bool flag = !this.handleName.IsNullOrEmpty() && this.notIllusion; ((Selectable)this.btnYes).set_interactable(flag); if (!Object.op_Implicit((Object)text)) { return; } ((Graphic)text).set_color(new Color((float)((Graphic)text).get_color().r, (float)((Graphic)text).get_color().g, (float)((Graphic)text).get_color().b, !flag ? 0.5f : 1f)); })); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnYes), (Action <M0>)(_ => { Singleton <GameSystem> .Instance.SaveHandleName(this.handleName); Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_S); ((Component)this.cvsChangeScene).get_gameObject().SetActive(true); if ("Uploader" == this.backSceneName || "Downloader" == this.backSceneName) { Singleton <Scene> .Instance.UnLoad(); } else { Singleton <Scene> .Instance.LoadReserve(new Scene.Data() { levelName = "NetworkCheckScene", isAdd = false, isFade = true, isAsync = true }, true); } })); } if (!Object.op_Implicit((Object)this.btnNo)) { return; } ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnNo), (Action <M0>)(_ => { Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Cancel); if ("Uploader" == this.backSceneName || "Downloader" == this.backSceneName) { Singleton <Scene> .Instance.UnLoad(); } else { Singleton <Scene> .Instance.LoadReserve(new Scene.Data() { levelName = "Title", isFade = true }, false); } })); }
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); }
private void Start() { ReadOnlyReactiveProperty <bool> reactiveProperty1 = (ReadOnlyReactiveProperty <bool>)ReactivePropertyExtensions.ToReadOnlyReactiveProperty <bool>((IObservable <M0>)Observable.Select <int, bool>((IObservable <M0>) this._count, (Func <M0, M1>)(i => i > 1))); ReadOnlyReactiveProperty <bool> reactiveProperty2 = (ReadOnlyReactiveProperty <bool>)ReactivePropertyExtensions.ToReadOnlyReactiveProperty <bool>((IObservable <M0>)Observable.Select <int, bool>((IObservable <M0>) this._count, (Func <M0, M1>)(i => i < this.MaxCount))); List <IObservable <int> > source = new List <IObservable <int> >(); // ISSUE: object of a compiler-generated type is created using (IEnumerator <\u003C\u003E__AnonType27 <Button, int> > enumerator = ((IEnumerable <Button>) this._addButtons).Select <Button, \u003C\u003E__AnonType27 <Button, int> >((Func <Button, int, \u003C\u003E__AnonType27 <Button, int> >)((bt, index) => new \u003C\u003E__AnonType27 <Button, int>(bt, index != 0 ? index * 10 : 1))).Where <\u003C\u003E__AnonType27 <Button, int> >((Func <\u003C\u003E__AnonType27 <Button, int>, bool>)(bt => bt != null)).GetEnumerator()) { while (((IEnumerator)enumerator).MoveNext()) { // ISSUE: variable of a compiler-generated type \u003C\u003E__AnonType27 <Button, int> item = enumerator.Current; UnityUIComponentExtensions.SubscribeToInteractable((IObservable <bool>)reactiveProperty2, (Selectable)item.bt); source.Add((IObservable <int>)Observable.Select <Unit, int>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(item.bt), (Func <M0, M1>)(_ => item.add))); } } // ISSUE: object of a compiler-generated type is created using (IEnumerator <\u003C\u003E__AnonType27 <Button, int> > enumerator = ((IEnumerable <Button>) this._subButtons).Select <Button, \u003C\u003E__AnonType27 <Button, int> >((Func <Button, int, \u003C\u003E__AnonType27 <Button, int> >)((bt, index) => new \u003C\u003E__AnonType27 <Button, int>(bt, index != 0 ? index * 10 : 1))).Where <\u003C\u003E__AnonType27 <Button, int> >((Func <\u003C\u003E__AnonType27 <Button, int>, bool>)(bt => bt != null)).GetEnumerator()) { while (((IEnumerator)enumerator).MoveNext()) { // ISSUE: variable of a compiler-generated type \u003C\u003E__AnonType27 <Button, int> item = enumerator.Current; UnityUIComponentExtensions.SubscribeToInteractable((IObservable <bool>)reactiveProperty1, (Selectable)item.bt); source.Add((IObservable <int>)Observable.Select <Unit, int>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(item.bt), (Func <M0, M1>)(_ => - item.add))); } } if (source.Any <IObservable <int> >()) { ObservableExtensions.Subscribe <int>((IObservable <M0>)Observable.Select <int, int>(Observable.Merge <int>((IEnumerable <IObservable <M0> >)source), (Func <M0, M1>)(value => Mathf.Clamp(((ReactiveProperty <int>) this._count).get_Value() + value, 1, this.MaxCount))), (Action <M0>)(value => { ((ReactiveProperty <int>) this._count).set_Value(value); Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_S); })); } if (!Object.op_Inequality((Object)this._inputCounter, (Object)null)) { return; } ObservableExtensions.Subscribe <int>((IObservable <M0>) this._count, (Action <M0>)(i => this._inputCounter.set_text(i.ToString()))); ObservableExtensions.Subscribe <BaseEventData>(Observable.Take <BaseEventData>((IObservable <M0>)ObservableTriggerExtensions.OnSelectAsObservable((UIBehaviour)this._inputCounter), 1), (Action <M0>)(_ => { Transform transform = ((Component)this._inputCounter).get_transform().Find(((Object)this._inputCounter).get_name() + " Input Caret"); if (!Object.op_Inequality((Object)transform, (Object)null)) { return; } RectTransform component = (RectTransform)((Component)transform).GetComponent <RectTransform>(); RectTransform rectTransform = ((Graphic)this._countText).get_rectTransform(); component.set_anchoredPosition(rectTransform.get_anchoredPosition()); component.set_sizeDelta(rectTransform.get_sizeDelta()); })); ObservableExtensions.Subscribe <int>((IObservable <M0>)Observable.Select <string, int>((IObservable <M0>)UnityUIComponentExtensions.OnEndEditAsObservable(this._inputCounter), (Func <M0, M1>)(text => { int result; int.TryParse(text, out result); return(Mathf.Clamp(result, 1, this.MaxCount)); })), (Action <M0>)(n => { ((ReactiveProperty <int>) this._count).SetValueAndForceNotify(n); Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_S); })); }