Input processor interface and sdl implementation added, now frees text textures after displaying text, need to look into caching so we can let manager handle it
This commit is contained in:
24
src/engine/input/sdlinputprocessor.hpp
Normal file
24
src/engine/input/sdlinputprocessor.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// Created by m on 12/6/21.
|
||||
//
|
||||
|
||||
#ifndef RLA_IIPP_SDLINPUTPROCESSOR_HPP
|
||||
#define RLA_IIPP_SDLINPUTPROCESSOR_HPP
|
||||
|
||||
|
||||
#include "inputprocessor.hpp"
|
||||
#include <SDL.h>
|
||||
#include <unordered_map>
|
||||
|
||||
class SdlInputProcessor : public InputProcessor {
|
||||
InputResult process_input() override;
|
||||
public:
|
||||
SdlInputProcessor();
|
||||
|
||||
private:
|
||||
std::unordered_map<SDL_Keycode,InputProcessorKeycode> keycode_map;
|
||||
InputProcessorKeycode get_keycode(SDL_Keycode keycode);
|
||||
};
|
||||
|
||||
|
||||
#endif //RLA_IIPP_SDLINPUTPROCESSOR_HPP
|
||||
Reference in New Issue
Block a user