Back to index

libsfml  1.6+dfsg2
Public Member Functions | Public Attributes
sf::priv::JoystickState Struct Reference

Structure holding the joystick state's parameters /////////////////////////////////////////////////////////. More...

#include <Joystick.hpp>

List of all members.

Public Member Functions

 JoystickState ()

Public Attributes

float Axis [Joy::AxisCount]
 Position on each axis in range [-100, 100] (except POV which is [0, 360])
bool Buttons [Joy::ButtonCount]
 Status of each button (true = pressed)

Detailed Description

Structure holding the joystick state's parameters /////////////////////////////////////////////////////////.

Definition at line 42 of file Joystick.hpp.


Constructor & Destructor Documentation

Definition at line 44 of file Joystick.hpp.

    {
        // Default value for axes
        for (int i = 0; i < Joy::AxisCount; ++i)
            Axis[i] = 0.f;
        Axis[Joy::AxisPOV] = -1.f;

        // Default value for buttons
        for (int i = 0; i < Joy::ButtonCount; ++i)
            Buttons[i] = false;
    }

Member Data Documentation

Position on each axis in range [-100, 100] (except POV which is [0, 360])

Definition at line 56 of file Joystick.hpp.

Status of each button (true = pressed)

Definition at line 57 of file Joystick.hpp.


The documentation for this struct was generated from the following file: