public void RegisterTimerModel(ITimerModel model) { model.OnSplit += (s, e) => OnSplit?.Invoke(this, e); model.OnSkipSplit += (s, e) => OnSkipSplit?.Invoke(this, e); model.OnUndoSplit += (s, e) => OnUndoSplit?.Invoke(this, e); model.OnStart += (s, e) => OnStart?.Invoke(this, e); model.OnReset += (s, e) => OnReset?.Invoke(this, e); model.OnPause += (s, e) => OnPause?.Invoke(this, e); model.OnResume += (s, e) => OnResume?.Invoke(this, e); model.OnScrollUp += (s, e) => OnScrollUp?.Invoke(this, e); model.OnScrollDown += (s, e) => OnScrollDown?.Invoke(this, e); model.OnSwitchComparisonPrevious += (s, e) => OnSwitchComparisonPrevious?.Invoke(this, e); model.OnSwitchComparisonNext += (s, e) => OnSwitchComparisonNext?.Invoke(this, e); }
private void Hook_MouseWheelExt(object sender, MouseEventExtArgs e) { if (!nativeProcess.IsPathOfExileInFocus || !settings.Stash_EnableCtrlScroll || !IsCtrlPressed()) { return; } if (e.Delta > 0) { e.Handled = OnScrollUp?.Invoke() ?? false; } else { e.Handled = OnScrollDown?.Invoke() ?? false; } }
public void ScrollDown() { OnScrollDown?.Invoke(this, null); }
private void Update() { if (CheckKey(KeyCode.W)) { OnWPressed?.Invoke(this, EventArgs.Empty); KeyEventArgs args = new KeyEventArgs(KeyCode.W); OnKeyPressed?.Invoke(this, args); OnMovementKeyPressed?.Invoke(this, args); } if (CheckKey(KeyCode.A)) { OnAPressed?.Invoke(this, EventArgs.Empty); KeyEventArgs args = new KeyEventArgs(KeyCode.A); OnKeyPressed?.Invoke(this, args); OnMovementKeyPressed?.Invoke(this, args); } if (CheckKey(KeyCode.S)) { OnSPressed?.Invoke(this, EventArgs.Empty); KeyEventArgs args = new KeyEventArgs(KeyCode.S); OnKeyPressed?.Invoke(this, args); OnMovementKeyPressed?.Invoke(this, args); } if (CheckKey(KeyCode.D)) { OnDPressed?.Invoke(this, EventArgs.Empty); KeyEventArgs args = new KeyEventArgs(KeyCode.D); OnKeyPressed?.Invoke(this, args); OnMovementKeyPressed?.Invoke(this, args); } if (CheckKey(KeyCode.Space)) { OnSpacePressed?.Invoke(this, EventArgs.Empty); KeyEventArgs args = new KeyEventArgs(KeyCode.Space); OnKeyPressed?.Invoke(this, args); } RunKey(KeyCode.G); RunKey(KeyCode.H); RunKey(KeyCode.Q); RunKey(KeyCode.Escape); var scrollDelta = Input.GetAxis("Mouse ScrollWheel"); if (scrollDelta != 0.0F) { ScrollEventArgs args; if (scrollDelta > 0.0F) { args = new ScrollEventArgs(true); OnScrollUp?.Invoke(this, EventArgs.Empty); } else { args = new ScrollEventArgs(false); OnScrollDown?.Invoke(this, EventArgs.Empty); } OnScroll?.Invoke(this, args); } if (CheckMouseSingle(MouseButton.LEFT)) { ClickEventArgs args = new ClickEventArgs(MouseButton.LEFT, Input.mousePosition); OnMouseClick?.Invoke(this, args); OnLeftMouseClick?.Invoke(this, args); } if (CheckMouseSingle(MouseButton.RIGHT)) { ClickEventArgs args = new ClickEventArgs(MouseButton.RIGHT, Input.mousePosition); OnMouseClick?.Invoke(this, args); OnRightMouseClick?.Invoke(this, args); } }
public void OnBaseScrollDown(object sender, EventArgs e) { OnScrollDown?.Invoke(sender, e); }
void OnDown() { OnScrollDown.Invoke(); }