public void Init(EventDelegate.Callback cb) { this.ValueChangeEvent = cb; this.mSlider = GameUITools.FindGameObject("ValueBar", base.gameObject).GetComponent<UISlider>(); EventDelegate.Add(this.mSlider.onChange, new EventDelegate.Callback(this.OnValueChange)); this.mValue = GameUITools.FindUILabel("Thumb/Tips/Value", this.mSlider.gameObject); GameUITools.RegisterClickEvent("Min", new UIEventListener.VoidDelegate(this.OnMinClick), base.gameObject); GameUITools.RegisterClickEvent("Max", new UIEventListener.VoidDelegate(this.OnMaxClick), base.gameObject); }
public void setInputSubmitCallback(EventDelegate.Callback callback) { EventDelegate.Add(mInput.onSubmit, callback); }
public GetGoldShopEvent(EventDelegate.Callback callback) { base.eventDelegate = new EventDelegate(callback); InitEvent += InitResponse; }
/// <summary> /// 窗口隐藏 /// </summary> /// <param name="OnComplete"></param> public void Hide(EventDelegate.Callback OnComplete) { TweenScale tweenScale = TweenScale.Begin(this.gameObj, 0.25f, Vector3.zero); tweenScale.SetOnFinished(OnComplete); }
void InitPoseCallback() { string gridName = "/UI Root/PresetButtonPanel/ItemPresetsViewer/Scroll View/Grid"; GameObject goGrid = GameObject.Find(gridName); if (goGrid != null) { if (poseButtonCallback == null) { poseButtonCallback = new EventDelegate.Callback(ClickPoseCallback); } foreach (Transform t in goGrid.transform) { GameObject go = t.gameObject; UIButton uiButton = go.GetComponent<UIButton>(); EventDelegate.Add(uiButton.onClick, poseButtonCallback); } } }
public SkillsetListEvent(EventDelegate.Callback callback) { base.eventDelegate = new EventDelegate(callback); InitEvent += InitResponse; }
public void EnterAnimation(EventDelegate.Callback callBack) { twPosition.PlayForward(); EventDelegate.Set(twPosition.onFinished, callBack); }
// Token: 0x06000640 RID: 1600 RVA: 0x00036173 File Offset: 0x00034373 public void AddOnFinished(EventDelegate.Callback del) { EventDelegate.Add(this.onFinished, del); }
private void Cache() { this.mCached = true; if (this.mRawDelegate) { return; } if ((this.mCachedCallback == null || this.mCachedCallback.Target as MonoBehaviour != this.mTarget || EventDelegate.GetMethodName(this.mCachedCallback) != this.mMethodName) && this.mTarget != null && !string.IsNullOrEmpty(this.mMethodName)) { Type type = this.mTarget.GetType(); try { this.mMethod = type.GetMethod(this.mMethodName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); } catch (Exception ex) { Debug.LogError(string.Concat(new object[] { "Failed to bind ", type, ".", this.mMethodName, "\n", ex.Message })); return; } if (this.mMethod == null) { Debug.LogError(string.Concat(new object[] { "Could not find method '", this.mMethodName, "' on ", this.mTarget.GetType() }), this.mTarget); return; } if (this.mMethod.ReturnType != typeof(void)) { Debug.LogError(string.Concat(new object[] { this.mTarget.GetType(), ".", this.mMethodName, " must have a 'void' return type." }), this.mTarget); return; } ParameterInfo[] parameters = this.mMethod.GetParameters(); if (parameters.Length == 0) { this.mCachedCallback = (EventDelegate.Callback)Delegate.CreateDelegate(typeof(EventDelegate.Callback), this.mTarget, this.mMethodName); this.mArgs = null; this.mParameters = null; return; } this.mCachedCallback = null; if (this.mParameters == null || this.mParameters.Length != parameters.Length) { this.mParameters = new EventDelegate.Parameter[parameters.Length]; int i = 0; int num = this.mParameters.Length; while (i < num) { this.mParameters[i] = new EventDelegate.Parameter(); i++; } } int j = 0; int num2 = this.mParameters.Length; while (j < num2) { this.mParameters[j].expectedType = parameters[j].ParameterType; j++; } } }
public void FadeIn(EventDelegate.Callback onFinish) { _tweenFadeIn.AddOnFinished(onFinish); _tweenFadeIn.PlayForward(); }
public void RemoveTextureAsyncCallback(eDynamicAtlasType type, EventDelegate.Callback onTextureAsyncSucceeded, EventDelegate.Callback onTextureAsyncFailed) { DynamicAtlas atlas = GetDynamicAtlas(type); if (atlas != null) { EventDelegate.Remove(atlas.onTextureAsyncSucceeded, onTextureAsyncSucceeded); EventDelegate.Remove(atlas.onTextureAsyncFailed, onTextureAsyncFailed); } else { EB.Debug.LogError("DynamicAtlasManager[RemoveTextureAsyncCallback]: Dynamic atlas does not exist!"); } }
public void ShowMessageBox(string msgText, EventDelegate.Callback okCallBack = null, EventDelegate.Callback cancelCallBack = null) { var config = m_uiItemConfigMap["MessageBox"].Clone() as UIItemConfig; config.Name += "_" + Time.realtimeSinceStartup; OpenUIInternal(config, (view) => { view["InfoStr"] = msgText; view["OKCallBack"] = okCallBack; view["CancelCallBack"] = cancelCallBack; LuaHelper.CallFunctionWithSelf(view, "MessageBoxView:Init"); }); }
private void Set(EventDelegate.Callback call) { this.Clear(); if (call != null && EventDelegate.IsValid(call)) { this.mTarget = (call.Target as MonoBehaviour); if (this.mTarget == null) { this.mRawDelegate = true; this.mCachedCallback = call; this.mMethodName = null; } else { this.mMethodName = EventDelegate.GetMethodName(call); this.mRawDelegate = false; } } }
private void Cache() { this.mCached = true; if (this.mRawDelegate) { return; } if ((this.mCachedCallback == null || this.mCachedCallback.Target as MonoBehaviour != this.mTarget || EventDelegate.GetMethodName(this.mCachedCallback) != this.mMethodName) && this.mTarget != null && !string.IsNullOrEmpty(this.mMethodName)) { Type type = this.mTarget.GetType(); this.mMethod = null; while (type != null) { try { this.mMethod = type.GetMethod(this.mMethodName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (this.mMethod != null) { break; } } catch (Exception) { } type = type.BaseType; } if (this.mMethod == null) { global::Debug.LogError(new object[] { string.Concat(new object[] { "Could not find method '", this.mMethodName, "' on ", this.mTarget.GetType() }), this.mTarget }); return; } if (this.mMethod.ReturnType != typeof(void)) { global::Debug.LogError(new object[] { string.Concat(new object[] { this.mTarget.GetType(), ".", this.mMethodName, " must have a 'void' return type." }), this.mTarget }); return; } this.mParameterInfos = this.mMethod.GetParameters(); if (this.mParameterInfos.Length == 0) { this.mCachedCallback = (EventDelegate.Callback)Delegate.CreateDelegate(typeof(EventDelegate.Callback), this.mTarget, this.mMethodName); this.mArgs = null; this.mParameters = null; return; } this.mCachedCallback = null; if (this.mParameters == null || this.mParameters.Length != this.mParameterInfos.Length) { this.mParameters = new EventDelegate.Parameter[this.mParameterInfos.Length]; int i = 0; int num = this.mParameters.Length; while (i < num) { this.mParameters[i] = new EventDelegate.Parameter(); i++; } } int j = 0; int num2 = this.mParameters.Length; while (j < num2) { this.mParameters[j].expectedType = this.mParameterInfos[j].ParameterType; j++; } } }
/// <summary> /// Remove an OnFinished delegate. Will work even while iterating through the list when the tweener has finished its operation. /// </summary> public void RemoveOnFinished(EventDelegate.Callback del) { EventDelegate.Remove(onFinished, del); EventDelegate.Remove(mTemp, del); }
public ContestDetailsEvent(EventDelegate.Callback callback) { base.eventDelegate = new EventDelegate(callback); InitEvent += InitResponse; }
public static void Add(List <EventDelegate> list, EventDelegate.Callback callback) { EventDelegate.Add(list, callback, false); }
public void Clear() { this.mTarget = null; this.mMethodName = null; this.mRawDelegate = false; this.mCachedCallback = null; this.mParameters = null; this.mCached = false; this.mMethod = null; this.mParameterInfos = null; this.mArgs = null; }
public GameObject Scroll(bool isUp, EventDelegate.Callback callback) { return(isUp ? ScrollUp(callback) : ScrollDown(callback)); }
public void QuitAnimation(EventDelegate.Callback callBack) { twPosition.PlayReverse(); EventDelegate.Set(twPosition.onFinished, callBack); }
public PurchaseGoldEvent(EventDelegate.Callback callback) { base.eventDelegate = new EventDelegate(callback); InitEvent += InitResponse; }
public void setSliderValueChange(EventDelegate.Callback mUislider) { EventDelegate.Add(mSlider.onChange, mUislider); }
public RegEntryEvent(EventDelegate.Callback callback) { base.eventDelegate = new EventDelegate(callback); InitEvent += InitResponse; }
void Update() { if (Application.loadedLevel != 5) { return; } if (editViewReset == null) { editViewReset = UnityEngine.Object.FindObjectOfType<EditViewReset>(); } if (sceneEdit == null) { sceneEdit = UnityEngine.Object.FindObjectOfType<SceneEdit>(); } { string gridName = "/UI Root/PresetButtonPanel/ItemPresetsViewer/Scroll View/Grid"; GameObject goGrid = GameObject.Find(gridName); if (goGrid != null) { if (poseButtonCallback == null) { poseButtonCallback = new EventDelegate.Callback(ClickPoseCallback); } foreach (Transform t in goGrid.transform) { if (!t.name.StartsWith("Pose_")) { continue; } GameObject go = t.gameObject; UIButton uiButton = go.GetComponent<UIButton>(); EventDelegate.Add(uiButton.onClick, poseButtonCallback); } } } if (editViewReset != null && sceneEdit != null) { Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0); if (bLevelWasLoaded) { bLevelWasLoaded = false; LoadSettings(maid); } // UICamera.InputEnable が False になるとサムネール撮影用のために着衣状態になる TBody tbody = maid == null ? null : maid.body0; if (tbody != null && fieldInfo_TBody_m_eMaskMode != null && UICamera.InputEnable) { lastMaid = maid; bLastAutoCam = editViewReset.GetVisibleAutoCam(); bLastEyeToCam = editViewReset.GetVisibleEyeToCam(); lastBgName = GameMain.Instance.BgMgr.GetBGName(); lastClothMaskMode = (TBody.MaskMode)fieldInfo_TBody_m_eMaskMode.GetValue(tbody); lastCameraPos = mainCamera.GetPos(); lastCameraTargetPos = mainCamera.GetTargetPos(); lastCameraDistance = mainCamera.GetDistance(); lastCameraRotation = Camera.main.gameObject.transform.rotation; lastCameraFov = Camera.main.fieldOfView; } } }
public void setSelectChangedCallback(EventDelegate.Callback callback) { EventDelegate.Add(mPopupList.onChange, callback); }
public void Init(int index, EventDelegate.Callback cb) { this.Index = index; this.OnCheckEvent = cb; this.mSprite = base.GetComponent<UISprite>(); this.mLabel = GameUITools.FindUILabel("Label", base.gameObject); this.InitStyle(); }
private static string GetMethodName(EventDelegate.Callback callback) { return(callback.Method.Name); }
protected virtual void SetOpenCloseTweener(UITweener tweener, List <EventDelegate> list, EventDelegate.Callback callBack) { this.tweener = tweener; if (list != null && callBack != null) { EventDelegate.Add(list, callBack); } }
private static bool IsValid(EventDelegate.Callback callback) { return(callback != null && callback.Method != null); }
public void setInpuntOnChangeCallback(EventDelegate.Callback callback) { EventDelegate.Add(mInput.onChange, callback); }
public EventDelegate(EventDelegate.Callback call) { this.Set(call); }
public GetPlayerListEvent(EventDelegate.Callback callback) { base.eventDelegate = new EventDelegate(callback); InitEvent += InitResponse; }
public static EventDelegate Add(List <EventDelegate> list, EventDelegate.Callback callback) { return(EventDelegate.Add(list, callback, false)); }
public static bool AddChildComponentMouseClick(Transform paneltransform, string name, EventDelegate.Callback action) { Transform tansform = UIToolkits.FindChild(paneltransform, name); if (null == tansform) { return(false); } return(AddChildComponentMouseClick(tansform.gameObject, action)); }
public CardUpEvent(EventDelegate.Callback callback) { base.eventDelegate = new EventDelegate(callback); InitEvent += InitResponse; }
/// <summary> /// Convenience function -- set a new OnFinished event delegate (here for to be consistent with RemoveOnFinished). /// </summary> public void SetOnFinished(EventDelegate.Callback del) { EventDelegate.Set(onFinished, del); }
public void setCheckChangedCallback(EventDelegate.Callback callback) { EventDelegate.Add(mToggle.onChange, callback); }