public void SetCursorFocus(Selectable selectable) { this._categoryUI.useCursor = false; CursorFrame.Set(((Graphic)this._cursor).get_rectTransform(), (RectTransform)((Component)selectable).GetComponent <RectTransform>(), (RectTransform)null); ((Behaviour)this._cursor).set_enabled(true); if (Singleton <Input> .Instance.FocusLevel != this._categoryUI.FocusLevel) { Singleton <Input> .Instance.FocusLevel = this._categoryUI.FocusLevel; } if (this._categoryUI.EnabledInput) { return; } this._categoryUI.EnabledInput = true; }
public static CompositeDisposable BindToEnter( bool isExit, params TagSelection.ICursorTagElement[] elements) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type TagSelection.\u003CBindToEnter\u003Ec__AnonStorey4 enterCAnonStorey4_1 = new TagSelection.\u003CBindToEnter\u003Ec__AnonStorey4(); // ISSUE: reference to a compiler-generated field enterCAnonStorey4_1.isExit = isExit; // ISSUE: reference to a compiler-generated field enterCAnonStorey4_1.elements = elements; CompositeDisposable compositeDisposable = new CompositeDisposable(); // ISSUE: reference to a compiler-generated field foreach (TagSelection.ICursorTagElement element in enterCAnonStorey4_1.elements) { TagSelection.ICursorTagElement item = element; CursorFrame.Set(((Graphic)item.cursor).get_rectTransform(), (RectTransform)((Component)item.selectable).GetComponent <RectTransform>(), (RectTransform)null); DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <Image>((IObservable <M0>)Observable.Select <PointerEventData, Image>(Observable.TakeUntilDestroy <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)item.selectable), (Component)item.cursor), (Func <M0, M1>)(_ => item.cursor)), (Action <M0>)(cursor => { // ISSUE: variable of a compiler-generated type TagSelection.\u003CBindToEnter\u003Ec__AnonStorey4 enterCAnonStorey4 = enterCAnonStorey4_1; Image cursor1 = cursor; ((Behaviour)cursor1).set_enabled(true); if (isExit) { return; } foreach (TagSelection.ICursorTagElement cursorTagElement in ((IEnumerable <TagSelection.ICursorTagElement>)elements).Where <TagSelection.ICursorTagElement>((Func <TagSelection.ICursorTagElement, bool>)(x => Object.op_Inequality((Object)x.cursor, (Object)cursor1)))) { ((Behaviour)cursorTagElement.cursor).set_enabled(false); } })), (ICollection <IDisposable>)compositeDisposable); // ISSUE: reference to a compiler-generated field if (enterCAnonStorey4_1.isExit) { DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <PointerEventData>(Observable.TakeUntilDestroy <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerExitAsObservable((UIBehaviour)item.selectable), (Component)item.cursor), (Action <M0>)(_ => ((Behaviour)item.cursor).set_enabled(false))), (ICollection <IDisposable>)compositeDisposable); } } return(compositeDisposable); }
public static CompositeDisposable BindToEnter( bool isExit, Image cursor, params Selectable[] selectables) { CompositeDisposable compositeDisposable = new CompositeDisposable(); foreach (Selectable selectable in selectables) { Selectable item = selectable; DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <PointerEventData>(Observable.Where <PointerEventData>(Observable.TakeUntilDestroy <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)item), (Component)cursor), (Func <M0, bool>)(_ => item.IsInteractable())), (Action <M0>)(_ => { ((Behaviour)cursor).set_enabled(true); CursorFrame.Set(((Graphic)cursor).get_rectTransform(), (RectTransform)((Component)item).GetComponent <RectTransform>(), (RectTransform)null); })), (ICollection <IDisposable>)compositeDisposable); if (isExit) { DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <PointerEventData>(Observable.TakeUntilDestroy <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerExitAsObservable((UIBehaviour)item), (Component)cursor), (Action <M0>)(_ => ((Behaviour)cursor).set_enabled(false))), (ICollection <IDisposable>)compositeDisposable); } } return(compositeDisposable); }