class Eagle::GamepadAxisEvent

Overview

A gamepad stick or trigger moved, with #value from -1 to 1 (0 to 1 for triggers).

Defined in:

eagle/core/events.cr

Constructors

Instance Method Summary

Instance methods inherited from class Eagle::Event

handled=(handled : Bool) handled=, handled? : Bool handled?

Constructor Detail

def self.new(gamepad : Int32, axis : Eagle::GamepadAxis, value : Float32) #

Creates a gamepad axis event.


Instance Method Detail

def axis : GamepadAxis #

Which stick or trigger axis.


def gamepad : Int32 #

The controller's id.


def value : Float32 #

The axis value: -1 to 1 for sticks, 0 to 1 for triggers.