mirror of
https://github.com/love2d/love.git
synced 2026-08-19 12:14:20 +02:00
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:
@@ -23,6 +23,10 @@
|
||||
|
||||
// LOVE
|
||||
#include <keyboard/Keyboard.h>
|
||||
#include <common/EnumMap.h>
|
||||
|
||||
// SDL
|
||||
#include <SDL.h>
|
||||
|
||||
namespace love
|
||||
{
|
||||
@@ -42,14 +46,14 @@ namespace sdl
|
||||
* @param key A key identifier.
|
||||
* @return boolean
|
||||
**/
|
||||
bool isDown(int key) const;
|
||||
bool isDown(Key key) const;
|
||||
|
||||
/**
|
||||
* Enables key repeating.
|
||||
* @param delay The amount of delay before repeating the key (in milliseconds)
|
||||
* @param interval Specifies the amount of time between repeats (in milliseconds)
|
||||
**/
|
||||
void setKeyRepeat(int delay = 0, int interval = 0) const;
|
||||
void setKeyRepeat(int delay, int interval) const;
|
||||
|
||||
/**
|
||||
* Gets the specified delay for the key repeat.
|
||||
@@ -63,6 +67,11 @@ namespace sdl
|
||||
**/
|
||||
int getKeyRepeatInterval() const;
|
||||
|
||||
private:
|
||||
|
||||
static EnumMap<Key, SDLKey, Keyboard::KEY_MAX_ENUM>::Entry keyEntries[];
|
||||
static EnumMap<Key, SDLKey, Keyboard::KEY_MAX_ENUM> keys;
|
||||
|
||||
}; // Keyboard
|
||||
|
||||
} // sdl
|
||||
|
||||
Reference in New Issue
Block a user