#include <wit/event.h>
List of all members.
Public Types |
enum | Type {
Joystick,
Analog,
Motion,
Pointer,
PointerLeave,
ButtonPress,
ButtonRelease,
User = 256
} |
Public Member Functions |
| AnalogEvent (Controller ctype, unsigned short id, AnalogButton trigger, float pressure) |
int | type () const |
Public Attributes |
AnalogButton | trigger |
float | pressure |
Controller | controllerType |
unsigned short | controllerNumber |
Detailed Description
The AnalogEvent class describes the change in pressure readings for the analog buttons on the Classic Controller or GameCube controller. Events are not generated if the button is held in the same position. To reduce jitter and avoid generating excessive events, very small changes to the pressure are ignored.
The following analog buttons are recognized:
- Left and right shoulder buttons on the Classic Controller,
- Left and right shoulder buttons on the GameCube controller,
- A and B buttons on the GameCube controller, and
- The whammy bar on the Guitar Hero 3 controller.
Analog button events are only generated if the wit::UseJoysticks feature is set.
- See also:
- wit::EventHandler::analogEvent()
Definition at line 60 of file event.h.
Member Enumeration Documentation
- Enumerator:
Joystick |
The event was generated by changing the position of an analog joystick.
|
Analog |
The event was generated by changing the pressure on an analog button.
|
Motion |
The event was generated by the motion sensor of a Wii Remote or Nunchuk.
|
Pointer |
The event was generated by the infrared sensor of a Wii Remote.
|
PointerLeave |
The event was generated by the pointer moving out of a hotspot.
|
ButtonPress |
The event was generated by pressing a non-analog button or by fully depressing an analog button.
|
ButtonRelease |
The event was generated by releasing a non-analog button or by releasing a fully-depressed analog button,
|
User |
Base value for user-defined events.
|
Definition at line 12 of file event.h.
Constructor & Destructor Documentation
Constructs an analog button event with the specified type for the specified controller.
Definition at line 244 of file event.cpp.
Member Function Documentation
int wit::Event::type |
( |
) |
const [inherited] |
Returns the type of the event.
Definition at line 30 of file event.cpp.
Member Data Documentation
Indicates which controller generated the event, generally numbered 0 to 3 for Wii Remotes and their accessories and numbered 4 to 7 for GameCube controllers.
Distinguishing between attached accessories can be done by reading the controllerType variable.
Definition at line 35 of file event.h.
Indicates which type of controller generated the event.
Definition at line 34 of file event.h.
Contains the pressure applied to the analog button from 0.0 (fully released) to 1.0 (fully depressed).
Definition at line 65 of file event.h.
Indicates which analog button was pressed.
Definition at line 64 of file event.h.
The documentation for this class was generated from the following files: