source: trunk/src/platform/sdl/sdlinput.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)

  • Property svn:keywords set to Id
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 SdlInput class
13// ------------------
14//
15
16#if !defined __LOL_SDLINPUT_H__
17#define __LOL_SDLINPUT_H__
18
19#include "entity.h"
20
21namespace lol
22{
23
24class SdlInputData;
25
26class SdlInput : public Entity
27{
28public:
29#ifdef LOL_INPUT_V2
30    /** passing the screen resolution (note: not the windowed app resolution!) allows to make the mouse axis resolution-independent */
31    SdlInput(int app_w, int app_h, int screen_w, int screen_h);
32#else
33    SdlInput();
34#endif
35    virtual ~SdlInput();
36    void SetScreenResolution();
37
38protected:
39    virtual void TickGame(float seconds);
40    virtual void TickDraw(float seconds);
41
42private:
43    SdlInputData *m_data;
44};
45
46} /* namespace lol */
47
48#endif // __LOL_SDLINPUT_H__
49
Note: See TracBrowser for help on using the repository browser.