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

Last change on this file since 2810 was 2810, checked in by benlitz, 8 years ago

Completely reworked input system. Unified device interface, button, axis and cursor support, controller and binding system, mouse capture. Tutorial 07_input provided. Require to compile lolcore with LOL_INPUT_V2 to be activated (also needed app-side before including core.h)

File size: 1.0 KB
Line 
1//
2// Lol Engine
3//
4// Copyright: (c) 2010-2013 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://www.wtfpl.net/ 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#ifndef LOL_INPUT_V2
20
21#include "entity.h"
22
23namespace lol
24{
25
26class StickData;
27
28class Stick : public Entity
29{
30    friend class Input;
31
32public:
33    void SetAxisCount(int n);
34    void SetButtonCount(int n);
35    void SetAxis(int n, float val);
36    void SetButton(int n, int val);
37    void RemapAxis(int src, int dst);
38    void RemapButton(int src, int dst);
39
40    int GetAxisCount();
41    int GetButtonCount();
42    float GetAxis(int n);
43    int GetButton(int n);
44
45private:
46    Stick();
47    ~Stick();
48    StickData *m_data;
49};
50
51} /* namespace lol */
52
53#endif // !LOL_INPUT_V2
54
55#endif // __LOL_INPUT_STICK_H__
56
Note: See TracBrowser for help on using the repository browser.