Finally abstracted constants properly. Changed how the event module works; wasn't really abstract before. Removed libs we're not going to use: native, signal.

This commit is contained in:
rude
2009-10-10 11:11:04 +02:00
parent 0a2ae705dd
commit 87e3c4131c
101 changed files with 3225 additions and 33496 deletions
+19 -6
View File
@@ -23,6 +23,7 @@
// LOVE
#include <common/Module.h>
#include <common/StringMap.h>
namespace love
{
@@ -32,17 +33,29 @@ namespace mouse
{
public:
enum MouseButton
enum Button
{
MOUSE_LEFT = 1,
MOUSE_MIDDLE,
MOUSE_RIGHT,
MOUSE_WHEELUP,
MOUSE_WHEELDOWN
BUTTON_INVALID,
BUTTON_LEFT,
BUTTON_MIDDLE,
BUTTON_RIGHT,
BUTTON_WHEELUP,
BUTTON_WHEELDOWN,
BUTTON_X1,
BUTTON_X2,
BUTTON_MAX_ENUM
};
virtual ~Mouse(){};
static bool getConstant(const char * in, Button & out);
static bool getConstant(Button in, const char *& out);
private:
static StringMap<Button, BUTTON_MAX_ENUM>::Entry buttonEntries[];
static StringMap<Button, BUTTON_MAX_ENUM> buttons;
}; // Mouse
} // mouse