Class: Browser::Event::Gamepad
Defined Under Namespace
Classes: Definition
Instance Attribute Summary
#callback, #on
Class Method Summary
collapse
Instance Method Summary
collapse
aliases, #arguments, #arguments=, class_for, create, handlers, handles, #initialize, #name, name_for, new, #off, #prevent, #prevented?, #stop, #stop!, #stopped?, #target
Constructor Details
This class inherits a constructor from Browser::Event
Class Method Details
.construct(name, desc) ⇒ Object
33
34
35
36
37
38
|
# File 'opal/browser/event/gamepad.rb', line 33
def self.construct(name, desc)
`return new GamepadEvent(#{name}, {
bubbles: desc.bubbles,
cancelable: desc.cancelable,
gamepad: desc })`
end
|
.supported? ⇒ Boolean
6
7
8
|
# File 'opal/browser/event/gamepad.rb', line 6
def self.supported?
Browser.supports? 'Event.Gamepad'
end
|
Instance Method Details
49
50
51
|
# File 'opal/browser/event/gamepad.rb', line 49
def at
`#@native.gamepad.timestamp`
end
|
53
54
55
|
# File 'opal/browser/event/gamepad.rb', line 53
def axes
`#@native.gamepad.axes`
end
|
57
58
59
|
# File 'opal/browser/event/gamepad.rb', line 57
def buttons
`#@native.gamepad.buttons`
end
|
41
42
43
|
# File 'opal/browser/event/gamepad.rb', line 41
def id
`#@native.gamepad.id`
end
|
45
46
47
|
# File 'opal/browser/event/gamepad.rb', line 45
def index
`#@native.gamepad.index`
end
|