Class: SDL2::Event::JoyAxisMotion
- Inherits:
-
SDL2::Event
- Object
- SDL2::Event
- SDL2::Event::JoyAxisMotion
- Defined in:
- event.c,
event.c
Overview
This class represents the joystick axis motion events.
Instance Attribute Summary (collapse)
-
- (Integer) axis
the axis index.
-
- (Integer) value
the axis value (range: -32768 to -32767, 0 for newtral).
-
- (Integer) which
the joystick index.
Attributes inherited from SDL2::Event
Instance Method Summary (collapse)
-
- (Stirng) inspect
Inspection string.
Methods inherited from SDL2::Event
enable=, enabled?, poll, #window
Instance Attribute Details
- (Integer) axis
the axis index
- (Integer) value
the axis value (range: -32768 to -32767, 0 for newtral)
- (Integer) which
the joystick index
Instance Method Details
- (Stirng) inspect
Returns inspection string
687 688 689 690 691 692 693 694 |
# File 'event.c', line 687
static VALUE EvJoyAxisMotion_inspect(VALUE self)
{
SDL_Event* ev; Data_Get_Struct(self, SDL_Event, ev);
return rb_sprintf("<%s: type=%u timestamp=%u"
" which=%d axis=%u value=%d>",
rb_obj_classname(self), ev->common.type, ev->common.timestamp,
ev->jaxis.which, ev->jaxis.axis, ev->jaxis.value);
}
|