Capycore Engine
0.1.0
A simple and lightweight game engine written in C++ based on the Unity API architecture.
Theme:
Default
Round
Robot
Loading...
Searching...
No Matches
sdl_input_strategy.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <SDL3/SDL_keycode.h>
4
#include <
engine/input/i_input.h
>
5
#include <
engine/input/strategy/sdl_input_strategy.h
>
6
7
#include <map>
8
9
class
SDLInputStrategy
:
public
IInput
{
10
public
:
11
void
register_events
(std::map<KeyCode, KeyState>& key_states,
12
MouseState
& mouse_state)
override
;
13
14
private
:
21
static
KeyCode
sdl_to_keycode(SDL_Keycode key);
22
30
static
MouseButton
sdl_to_mouse_button(Uint8 button);
31
};
IInput
Definition
i_input.h:9
SDLInputStrategy
Definition
sdl_input_strategy.h:9
SDLInputStrategy::register_events
void register_events(std::map< KeyCode, KeyState > &key_states, MouseState &mouse_state) override
Registers necessary event listeners with the underlying system.
i_input.h
KeyCode
KeyCode
Definition
key_code.h:5
MouseButton
MouseButton
Definition
mouse_button.h:5
sdl_input_strategy.h
MouseState
Aggregates all mouse-related state information.
Definition
mouse_state.h:61
include
engine
input
strategy
sdl_input_strategy.h
Generated by
1.9.8