1 #ifndef LXGUI_INPUT_SDL_SOURCE_HPP
2 #define LXGUI_INPUT_SDL_SOURCE_HPP
4 #include "lxgui/gui_vector2.hpp"
5 #include "lxgui/input_source.hpp"
6 #include "lxgui/utils.hpp"
10 #include <unordered_map>
28 explicit source(SDL_Window* win, SDL_Renderer* rdr,
bool initialise_sdl_image);
45 void update_pixel_per_unit_();
48 SDL_Window* window_ =
nullptr;
49 SDL_Renderer* renderer_ =
nullptr;
51 float pixels_per_unit_ = 1.0f;
53 using wrapped_cursor = std::unique_ptr<SDL_Cursor, void (*)(SDL_Cursor*)>;
54 std::unordered_map<std::string, wrapped_cursor> cursor_map_;