Class: SDL2::Event::JoyHatMotion
- Inherits:
-
SDL2::Event
- Object
- SDL2::Event
- SDL2::Event::JoyHatMotion
- Defined in:
- event.c,
event.c
Overview
This class represents the joystick hat position change events.
Instance Attribute Summary collapse
-
#hat ⇒ Integer
the joystick hat index.
-
#value ⇒ Integer
the hat position value, same value as Joystick#hat.
-
#which ⇒ Integer
the joystick 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
#hat ⇒ Integer
the joystick hat index
#value ⇒ Integer
the hat position value, same value as Joystick#hat.
#which ⇒ Integer
the joystick index
Instance Method Details
#inspect ⇒ String
Returns inspection string
759 760 761 762 763 764 765 |
# File 'event.c', line 759
static VALUE EvJoyHatMotion_inspect(VALUE self)
{
SDL_Event* ev; Data_Get_Struct(self, SDL_Event, ev);
return rb_sprintf("<%s: type=%u timestamp=%u which=%d hat=%u value=%u>",
rb_obj_classname(self), ev->common.type, ev->common.timestamp,
ev->jhat.which, ev->jhat.hat, ev->jhat.value);
}
|