source: trunk/src/input/stick.h @ 1355

Last change on this file since 1355 was 1355, checked in by sam, 8 years ago

input: allow to remap gamepad axes in the generic input layer.

File size: 1011 bytes
Line 
1//
2// Lol Engine
3//
4// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
5//   This program is free software; you can redistribute it and/or
6//   modify it under the terms of the Do What The Fuck You Want To
7//   Public License, Version 2, as published by Sam Hocevar. See
8//   http://sam.zoy.org/projects/COPYING.WTFPL for more details.
9//
10
11//
12// The Stick class
13// ---------------
14//
15
16#if !defined __LOL_INPUT_STICK_H__
17#define __LOL_INPUT_STICK_H__
18
19#include "entity.h"
20
21namespace lol
22{
23
24class StickData;
25
26class Stick : public Entity
27{
28    friend class Input;
29
30public:
31    void SetAxisCount(int n);
32    void SetButtonCount(int n);
33    void SetAxis(int n, float val);
34    void SetButton(int n, int val);
35    void RemapAxis(int src, int dst);
36    void RemapButton(int src, int dst);
37
38    int GetAxisCount();
39    int GetButtonCount();
40    float GetAxis(int n);
41    int GetButton(int n);
42
43private:
44    Stick();
45    ~Stick();
46    StickData *m_data;
47};
48
49} /* namespace lol */
50
51#endif // __LOL_INPUT_STICK_H__
52
Note: See TracBrowser for help on using the repository browser.