diff options
| author | Kasullian <tomkasull@gmail.com> | 2025-09-10 12:08:59 -0400 |
|---|---|---|
| committer | Kasullian <tomkasull@gmail.com> | 2025-09-10 12:08:59 -0400 |
| commit | ae694bc0da98e45c5def20ac1d92f9d8aad65fd5 (patch) | |
| tree | fec648ec2ee3c7ab44ad555c837653ade8e7ac34 /src/util/input.h | |
| parent | e2366afb57d69f3952bbb4d1894d82293cd1cb9d (diff) | |
3d view mouse control
Diffstat (limited to 'src/util/input.h')
| -rw-r--r-- | src/util/input.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/input.h b/src/util/input.h index e174fe6..4885f0f 100644 --- a/src/util/input.h +++ b/src/util/input.h @@ -16,6 +16,7 @@ const U32 MOUSE_WHEEL = 0x4; struct MOUSE_DATA { VEC2 pos; + VEC2 pos_delta; U8 left; U8 right; U8 middle; @@ -27,6 +28,8 @@ using ON_INPUT_FN = std::function<void( SDL_Event* )>; struct INPUT_DATA { MOUSE_DATA mouse; U8 keys[0xff]; + bool mouse_captured; + F32 mouse_sensitivity = 1.0f; LIST<ON_INPUT_FN> on_input; }; @@ -37,5 +40,6 @@ extern void input_frame_end(); extern void input_on_event( SDL_Event* e ); extern void input_on_mouse( I32 type, I32 x, I32 y ); extern void input_is_key_down( U32 key ); +extern void input_capture_mouse( bool capture ); #define kb_down( key ) input_is_key_down( key ) |
