Class: SDL2::Event::ControllerAxisMotion
- Inherits:
-
SDL2::Event
- Object
- SDL2::Event
- SDL2::Event::ControllerAxisMotion
- Defined in:
- event.c,
event.c
Overview
This class represents the controller axis motion events.
Instance Attribute Summary collapse
-
#axis ⇒ Integer
the axis index.
-
#value ⇒ Integer
the axis value (range: -32768 to -32767, 0 for newtral).
-
#which ⇒ Integer
the controller index.
Attributes inherited from SDL2::Event
Instance Method Summary collapse
-
#inspect ⇒ String
Inspection string.
Methods inherited from SDL2::Event
enable=, enabled?, poll, #window
Instance Attribute Details
#axis ⇒ Integer
the axis index
#value ⇒ Integer
the axis value (range: -32768 to -32767, 0 for newtral)
#which ⇒ Integer
the controller index
Instance Method Details
#inspect ⇒ String
Returns inspection string
817 818 819 820 821 822 823 824 825 |
# File 'event.c', line 817
static VALUE ControllerAxis_inspect(VALUE self)
{
SDL_Event* ev; Data_Get_Struct(self, SDL_Event, ev);
return rb_sprintf("<%s: type=%u timestamp=%u"
" which=%d axis=%s value=%d>",
rb_obj_classname(self), ev->common.type, ev->common.timestamp,
ev->caxis.which, SDL_GameControllerGetStringForAxis(ev->caxis.axis),
ev->caxis.value);
}
|