mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-04-02 10:16:50 +02:00
Port from git
This commit is contained in:
38
Source/Control/UserInput.h
Normal file
38
Source/Control/UserInput.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/* This file is subject to the terms and conditions defined in
|
||||
* file 'LICENSE.txt', which is part of this source code package.
|
||||
*/
|
||||
#pragma once
|
||||
#include <map>
|
||||
#include <SDL2/SDL.h>
|
||||
#include <string>
|
||||
|
||||
class Configuration;
|
||||
|
||||
class UserInput
|
||||
{
|
||||
public:
|
||||
enum KeyCode_E
|
||||
{
|
||||
KeyCodeNextItem,
|
||||
KeyCodePreviousItem,
|
||||
KeyCodeSelect,
|
||||
KeyCodeBack,
|
||||
KeyCodePageDown,
|
||||
KeyCodePageUp,
|
||||
KeyCodeAdminMode,
|
||||
KeyCodeHideItem,
|
||||
KeyCodeQuit
|
||||
};
|
||||
|
||||
UserInput(Configuration *c);
|
||||
virtual ~UserInput();
|
||||
bool Initialize();
|
||||
SDL_Scancode GetScancode(KeyCode_E key);
|
||||
|
||||
|
||||
private:
|
||||
bool MapKey(std::string keyDescription, KeyCode_E key);
|
||||
std::map<KeyCode_E, SDL_Scancode> KeyMap;
|
||||
|
||||
Configuration *Config;
|
||||
};
|
||||
Reference in New Issue
Block a user