Class TJoystickEvent

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TJoystickEvent = class(TIrrlichtEvent)

Description

A joystick event. Unlike other events, joystick events represent the result of polling each connected joystick once per Run() of the device. Joystick events will not be generated by default. If joystick support is available for the active device, _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ is defined in the C++ source and TIrrlichtDevice.ActivateJoysticks() has been called, an event of this type will be generated once per joystick per TIrrlichtDevice.Run() regardless of whether the state of the joystick has actually changed.

Hierarchy

Overview

Methods

Public constructor Create(NButtonStates: TJoystickButtonSet; const NAxes: TJoystickAxisArray; NPOV: Word; NID: Byte);

Properties

Public property Axes: TJoystickAxisArray read FAxes;
Public property JoystickID: Byte read FID;
Public property POVHat: Word read FPOV;
Public property PressedButtons: TJoystickButtonSet read FButtonStates;

Description

Methods

Public constructor Create(NButtonStates: TJoystickButtonSet; const NAxes: TJoystickAxisArray; NPOV: Word; NID: Byte);

Constructor. You'll have to call this manually if you want to Post() an event.

Parameters
NButtonStates
See ButtonStates.
NAxes
See Axes.
NPOV
See POVHat.
NID
See JoystickID.

Properties

Public property Axes: TJoystickAxisArray read FAxes;

The current position of all axes. Values are in the range -32768to 32767, with 0 representing the center position. You will receive the raw value from the joystick, and so will usually want to implement a dead zone around the center of the range. Axes not supported by this joystick will always have a value of 0. On Linux, POV hats are represented as axes, usually the last two active axis.

Public property JoystickID: Byte read FID;

The ID of the joystick which generated this event.

Public property POVHat: Word read FPOV;

The POV represents the angle of the POV hat in degrees * 100, from 0 to 35,900. A value of 65535 indicates that the POV hat is centered (or not present). This value is only supported on Windows. On Linux, the POV hat will be sent as 2 axes instead.

Public property PressedButtons: TJoystickButtonSet read FButtonStates;

A set of button states.
The type of this property may change in an upcoming release; I'm not sure if the "set" approach is portable.


Generated by PasDoc 0.12.1 on 2012-09-14 17:32:22