Class: SDL2::Event::ControllerAxisMotion

Inherits:
SDL2::Event show all
Defined in:
event.c

Instance Attribute Summary

Attributes inherited from SDL2::Event

#timestamp, #type

Instance Method Summary (collapse)

Methods inherited from SDL2::Event

enable=, enabled?, poll, #window

Instance Method Details

- (Object) inspect



791
792
793
794
795
796
797
798
799
# File 'event.c', line 791

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);
}