prime31 / Nez

Nez is a free 2D focused framework that works with MonoGame and FNA
MIT License
1.76k stars 355 forks source link

Add JustPushed and SetRepeat methods to VirtualIntegerAxis #756

Closed thatpixelguy closed 1 year ago

thatpixelguy commented 1 year ago

Adds a bool JustPushed(int direction) method and int DirectionJustPushed property to VirtualIntegerAxis, which function similarly to VirtualButton.IsPressed.

Also adds repeating input support to VirtualIntegerAxis, which allows JustPushed to repeatedly fire when set up with the new SetRepeat methods -- this again functions the same as VirtualButton's repeating input.

These features are super useful for UI, i.e. navigating through menu options with a gamepad control stick.