Module: Sf::Joystick

Defined in:
LiteRGSS.rb.yard.rb

Overview

Joystick utility of SFML

Constant Summary collapse

COUNT =

Number of joystick SFML is able to handle at once

8
BUTTON_COUNT =

Number of key on a joystick SFML is able to handle at once

32
AXIS_COUNT =

Number of axis SFML is able to handle on a joystick at once

8
X =

X axis

sf::Joystick::Axis::X
Y =

Y axis

sf::Joystick::Axis::Y
Z =

Z axis

sf::Joystick::Axis::Z
R =

R axis

sf::Joystick::Axis::R
U =

U axis

sf::Joystick::Axis::U
V =

V axis

sf::Joystick::Axis::V
POV_X =

PovX axis

sf::Joystick::Axis::PovX
POV_Y =

PovY axis

sf::Joystick::Axis::PovY

Class Method Summary collapse

Class Method Details

.axis_available?(id, axis) ⇒ Boolean

Tell if the given axis is available on joystick id

Parameters:

  • id (Integer)
  • axis (Integer)

Returns:

  • (Boolean)


2052
2053
2054
# File 'LiteRGSS.rb.yard.rb', line 2052

def self.axis_available?(id, axis)

end

.axis_position(id, axis) ⇒ Float

Gives the axis position of joystick id

Parameters:

  • id (Integer)
  • axis (Integer)

Returns:

  • (Float) —

    position between -100.0 & 100.0



2065
2066
2067
# File 'LiteRGSS.rb.yard.rb', line 2065

def self.axis_position(id, axis)

end

.button_count(id) ⇒ Integer

Give the number of button on the joystick id

Parameters:

  • id (Integer)

Returns:

  • (Integer)


2045
2046
2047
# File 'LiteRGSS.rb.yard.rb', line 2045

def self.button_count(id)

end

.connected?(id) ⇒ Boolean

Tell if the joystick id is currently connected

Parameters:

  • id (Integer)

Returns:

  • (Boolean)


2039
2040
2041
# File 'LiteRGSS.rb.yard.rb', line 2039

def self.connected?(id)

end

.identification(id) ⇒ Array

Gives the joystick identification information

Parameters:

  • id (Integer)

Returns:

  • (Array) —

    "name", vendor_id (int), product_id (int)



2076
2077
2078
# File 'LiteRGSS.rb.yard.rb', line 2076

def self.identification(id)

end

.press?(id, button) ⇒ Boolean

Tell if the button is pressed on joystick id

Parameters:

  • id (Integer)
  • button (Integer)

Returns:

  • (Boolean)


2058
2059
2060
# File 'LiteRGSS.rb.yard.rb', line 2058

def self.press?(id, button)

end

.update ⇒ self

Update the state of joystick

Returns:

  • (self)


2070
2071
2072
# File 'LiteRGSS.rb.yard.rb', line 2070

def self.update

end