From 40fc27154fe754181934dc7ee31375e6bdfb33fc Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 23 Oct 2018 12:23:58 +0800 Subject: *merge from minimal --- src/libjin/Input/je_mouse.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/libjin/Input/je_mouse.cpp (limited to 'src/libjin/Input/je_mouse.cpp') diff --git a/src/libjin/Input/je_mouse.cpp b/src/libjin/Input/je_mouse.cpp new file mode 100644 index 0000000..476b1a2 --- /dev/null +++ b/src/libjin/Input/je_mouse.cpp @@ -0,0 +1,28 @@ +#include "../core/je_configuration.h" +#if defined(jin_input) + +#include "SDL.h" + +#include "je_mouse.h" + +namespace JinEngine +{ + namespace Input + { + + void Mouse::getState(int* x, int* y) + { + #ifdef jin_input == jin_input_sdl + SDL_GetMouseState(x, y); + #endif + } + + void Mouse::setVisible(bool visible) + { + SDL_ShowCursor(visible ? SDL_ENABLE : SDL_DISABLE); + } + + } // namespace Input +} // namespace JinEngine + +#endif // defined(jin_input) \ No newline at end of file -- cgit v1.1-26-g67d0