source: trunk/src/input.h @ 326

Last change on this file since 326 was 326, checked in by sam, 11 years ago

Test entity alignment features. Also, start working on the mouse tracking.

  • Property svn:keywords set to Id
File size: 1.0 KB
Line 
1//
2// Lol Engine
3//
4// Copyright: (c) 2010-2011 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 Input static class
13// ----------------------
14//
15
16#if !defined __DH_INPUT_H__
17#define __DH_INPUT_H__
18
19#include "matrix.h"
20
21class WorldEntity;
22
23class Input
24{
25public:
26    /* These methods are general queries */
27    static float2 GetAxis(int axis);
28    static int2 GetMousePos();
29    static int3 GetMouseButtons();
30
31    /* Entities can subscribe to events */
32    static void ListenMouse(WorldEntity *e);
33    static void UnlistenMouse(WorldEntity *e);
34
35    /* These methods are called by the underlying input listeners */
36    static void SetMousePos(int2 coord);
37    static void SetMouseButton(int index);
38    static void UnsetMouseButton(int index);
39};
40
41#endif // __DH_INPUT_H__
42
Note: See TracBrowser for help on using the repository browser.