internal void Window_MouseWheelScrolled(object sender, MouseWheelScrollEventArgs e) { Key WheelEvent = e.Delta >= 0 ? Key.MouseWheelUp : Key.MouseWheelDown; if (e.Delta != 0) { OnPressedEvent?.Invoke(WheelEvent, PlayerFlags.ANY_PLAYER); OnReleasedEvent?.Invoke(WheelEvent, PlayerFlags.ANY_PLAYER); } }
internal void OnWindowMouseEvent(Veldrid.MouseEvent obj) { if (obj.Down) { OnPressedEvent?.Invoke(obj.MouseButton.Convert(), PlayerFlags.ANY_PLAYER); } else { OnReleasedEvent?.Invoke(obj.MouseButton.Convert(), PlayerFlags.ANY_PLAYER); } }
internal void OnWindowKeyEvent(Veldrid.KeyEvent obj) { if (obj.Repeat) { return; } if (obj.Down) { OnPressedEvent?.Invoke(obj.Key.Convert(), PlayerFlags.ANY_PLAYER); } else { OnReleasedEvent?.Invoke(obj.Key.Convert(), PlayerFlags.ANY_PLAYER); } }
internal void OnPressedInternal() { OnPressedEvent?.Invoke(); OnPressed(); }
internal void Window_KeyPressed(object sender, MouseButtonEventArgs e) { OnPressedEvent?.Invoke(SFMLKeyConverter.Convert(e.Button), PlayerFlags.ANY_PLAYER); }