wren
Vulkan-based game engine
Loading...
Searching...
No Matches
input.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <unordered_map>
4
5
#include "
event.hpp
"
6
#include "
keycode.hpp
"
7
8
namespace
wren
{
9
10
class
Input
{
11
public
:
12
void
initialize
(
event::Dispatcher
& dispatcher);
13
14
auto
is_pressed
(
KeyCode
key)
const
-> bool;
15
auto
is_pressed_down
(
KeyCode
key)
const
-> bool;
16
17
auto
end_frame
() {
pressed_down_
.clear(); }
18
19
private
:
20
std::unordered_map<KeyCode, bool>
pressed_
;
21
std::unordered_map<KeyCode, bool>
pressed_down_
;
22
};
23
24
}
// namespace wren
wren::Input
Definition
input.hpp:10
wren::Input::pressed_down_
std::unordered_map< KeyCode, bool > pressed_down_
Definition
input.hpp:21
wren::Input::is_pressed
auto is_pressed(KeyCode key) const -> bool
Definition
input.cpp:12
wren::Input::pressed_
std::unordered_map< KeyCode, bool > pressed_
Definition
input.hpp:20
wren::Input::end_frame
auto end_frame()
Definition
input.hpp:17
wren::Input::is_pressed_down
auto is_pressed_down(KeyCode key) const -> bool
Definition
input.cpp:16
wren::Input::initialize
void initialize(event::Dispatcher &dispatcher)
Definition
input.cpp:5
wren::event::Dispatcher
Definition
event.hpp:75
event.hpp
keycode.hpp
wren
Definition
editor_scene.hpp:5
wren::KeyCode
KeyCode
Definition
keycode.hpp:7
wren
include
wren
input.hpp
Generated by
1.14.0