public static void Show(string prompt, string defaultInput, OnEnter successCallback, OnCancel failCallback) { EditorTextPrompt window = GetWindow<EditorTextPrompt>(); window._displayedInput = defaultInput; window._windowPrompt = prompt; window._enterCB = successCallback; window._cancelCB = failCallback; window.Show(); }
public virtual void Enter() { OnEnter?.Invoke(); }
void OnTriggerEnter2D(Collider2D other) { OnEnter?.Invoke(other); }
public void OnPointerEnter(PointerEventData eventData) { OnEnter?.Invoke(eventData); }
public void AddEnterFunction(Delegate d) { onEnter += d as OnEnter; }
internal static void Enter(_OuiJournal journal, Oui from) => OnEnter?.Invoke(journal, from);
public virtual void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { var info = new StateBehaviourInfo(animator, stateInfo, layerIndex); OnEnter?.Invoke(info); }
protected override void StateEnter() { base.StateEnter(); OnEnter?.Invoke(this); }
protected override void CheckTootipArea(Vector2 local) { if (local.x < zeroX || local.x > zeroX + coordinateWid || local.y < zeroY || local.y > zeroY + coordinateHig) { tooltip.DataIndex = 0; RefreshTooltip(); } else { if (xAxis.type == AxisType.value) { float splitWid = yAxis.GetDataWidth(coordinateHig); for (int i = 0; i < yAxis.GetDataNumber(); i++) { float pY = zeroY + i * splitWid; if (yAxis.boundaryGap) { if (local.y > pY && local.y <= pY + splitWid) { tooltip.DataIndex = i + 1; break; } } else { if (local.y > pY - splitWid / 2 && local.y <= pY + splitWid / 2) { tooltip.DataIndex = i + 1; break; } } } } else { float splitWid = xAxis.GetDataWidth(coordinateWid); for (int i = 0; i < xAxis.GetDataNumber(); i++) { float pX = zeroX + i * splitWid; if (xAxis.boundaryGap) { if (local.x > pX && local.x <= pX + splitWid) { tooltip.DataIndex = i + 1; break; } } else { if (local.x > pX - splitWid / 2 && local.x <= pX + splitWid / 2) { tooltip.DataIndex = i + 1; break; } } } } } if (tooltip.DataIndex > 0) { tooltip.UpdatePos(new Vector2(local.x + 18, local.y - 25)); RefreshTooltip(); if (tooltip.LastDataIndex != tooltip.DataIndex) { RefreshChart(); string lastDataCode = xAxis.GetKeyData(tooltip.LastDataIndex); if (!string.IsNullOrEmpty(lastDataCode)) { OnExit?.Invoke(lastDataCode); } string dataCode = xAxis.GetKeyData(tooltip.DataIndex); if (!string.IsNullOrEmpty(dataCode)) { OnEnter?.Invoke(dataCode); } } tooltip.LastDataIndex = tooltip.DataIndex; } }
private void OnMouseEnter() { OnEnter.Invoke(); IsOver = true; }
protected void HandleEnter(IReference refback, bool appear) { //SetTransition(refback, GetEnterDuration(), TransitionDelay); OnEnter?.Invoke(refback, appear); }
public virtual void Enter() { OnEnter?.Invoke(); ElapsedTime = 0f; }
public void OnPointerEnter(PointerEventData eventData) { OnEnter.Invoke(effects); }
public void OnEndEdit() { OnEnter?.Invoke(inputField.text); Focus(); }
public override void Update(GameTime gameTime, MouseState mouseState, KeyboardState keyboardState) { if (!Enabled) { return; } if (Active) { if (caretStopwatch.ElapsedMilliseconds >= 500) { showCaret = !showCaret; caretStopwatch.Restart(); } if (oldKeyboardState == null) { oldKeyboardState = keyboardState; } if (keyboardState.IsKeyDown(Keys.Right) && !oldKeyboardState.IsKeyDown(Keys.Right) && caretPosition < (Text.Length)) { caretPosition += 1; caretStopwatch.Restart(); showCaret = true; } if (keyboardState.IsKeyDown(Keys.Left) && !oldKeyboardState.IsKeyDown(Keys.Left) && caretPosition > 0) { caretPosition -= 1; caretStopwatch.Restart(); showCaret = true; } foreach (var pressedKey in keyboardState.GetPressedKeys()) { if (oldKeyboardState.IsKeyUp(pressedKey)) { if (pressedKey == Keys.Delete && Text.Length > 0 && caretPosition < Text.Length) { RealText = RealText.Remove(caretPosition, 1); UpdateVisualText(); } else if (pressedKey == Keys.Enter) { OnEnter?.Invoke(); } } } oldKeyboardState = keyboardState; } if (oldMouseState == null) { oldMouseState = mouseState; } if (mouseState.LeftButton == ButtonState.Pressed && oldMouseState.LeftButton != ButtonState.Pressed) { if (Rectangle.Contains(mouseState.Position)) { Active = true; if (mouseState.X >= Rectangle.X + textXAddition) { for (int i = 0; i < Text.Length; i++) { var x = Rectangle.X + textXAddition + (int)font.MeasureString(Text.Substring(0, i)).X; var width = (int)font.MeasureString(Text.Substring(i, 1)).X; if (mouseState.X >= x && mouseState.X <= (x + width)) { caretPosition = i; caretStopwatch.Restart(); showCaret = true; break; } else if (mouseState.X >= (Rectangle.X + textXAddition + font.MeasureString(Text).X)) { caretPosition = Text.Length; caretStopwatch.Restart(); showCaret = true; break; } } } } else { Active = false; } } oldMouseState = mouseState; }
protected override void ExecuteOnEnter(Collider2D other) { m_CanExecuteButtons = true; OnEnter.Invoke(); }
public void Enter() { //Log.Information($"Fsm: {Fsm} State {StateEnum};Enter"); OnEnter?.Invoke(this, null); }
protected void CastEnterEvent(Collider2D collider) { OnEnter?.Invoke(collider); }
public virtual void Enter(IState from, Dictionary <string, object> transitionParameters = null) { OnEnter?.Invoke(from, this); HasStarted = true; }
protected async Task HandleEnterAsync(IReference refback, bool appear) { await SlideHelper.SetSlideTranslateValueAsync(Placement, refback.Current); OnEnter?.Invoke(refback, appear); }
private void Awake() { //_uberApp = FindObjectOfType<UberApplication>(); //_navListProvider = _uberApp.ListProvider; OnEnter.AddListener(ButtonClicked); }
void _FireEvent_OnEnter(GameObject obj) { OnEnter?.Invoke(obj); }
internal static void Enter(Session session, bool fromSaveData) => OnEnter?.Invoke(session, fromSaveData);
private void OnCollisionEnter2D(Collision2D collision) => OnEnter?.Invoke(collision);
public FSM.State Enter() { OnEnter?.Invoke(); return(this); }
private void TriggerEnterCallback(GameObject newSelection) { OnEnter?.Invoke(newSelection); }
public void MainMenu() { OnEnter.setCount(1); SceneManager.LoadScene(0, LoadSceneMode.Single); Time.timeScale = 1; }
protected override void OnMouseLeave(UIMouseEventParameter p) { base.OnMouseLeave(p); OnEnter?.Invoke(this, p); }
/// <summary> /// 进入状态时的回调 /// </summary> /// <param name="prev">上一个状态</param> public virtual void EnterCallback(IState prev) { OnEnter?.Invoke(prev); //重置计时器 Timer = 0f; }
public void EnterBase() { Enter(); OnEnter?.Invoke(this, EventArgs.Empty); }