diff options
| author | chai <chaifix@163.com> | 2018-11-18 23:31:17 +0800 |
|---|---|---|
| committer | chai <chaifix@163.com> | 2018-11-18 23:31:17 +0800 |
| commit | f0f340dec7821cee103ab9267ef941a917ef4dc4 (patch) | |
| tree | 2f77f6ce6bdc9f63f002c13d4c261e1d6a9c1729 /src/libjin/input/je_mouse.cpp | |
| parent | fc7b4579e49aaeecc81919e247e03f68bd5abfd4 (diff) | |
*目录改为小写
Diffstat (limited to 'src/libjin/input/je_mouse.cpp')
| -rw-r--r-- | src/libjin/input/je_mouse.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
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 |
