diff options
author | chai <chaifix@163.com> | 2019-01-12 21:48:33 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-01-12 21:48:33 +0800 |
commit | 8b00d67febf133e89f6a0bfabc41feed555dc4a9 (patch) | |
tree | fe48ef17c250afa40c2588300fcdb5920dba6951 /src/libjin/input/mouse.cpp | |
parent | a907c39756ef6b368d06643afa491c49a9044a8e (diff) |
*去掉文件前缀je_
Diffstat (limited to 'src/libjin/input/mouse.cpp')
-rw-r--r-- | src/libjin/input/mouse.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/libjin/input/mouse.cpp b/src/libjin/input/mouse.cpp new file mode 100644 index 0000000..4971137 --- /dev/null +++ b/src/libjin/input/mouse.cpp @@ -0,0 +1,28 @@ +#include "../core/configuration.h" +#if defined(jin_input) + +#include "SDL.h" + +#include "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 |