Toast Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
ui_input.hpp
Go to the documentation of this file.
1
8
9
#pragma once
10
#include <toast/events/listener.hpp>
11
#include <unordered_set>
12
13
namespace
ui {
14
15
class
UIInputRouter {
16
public
:
17
UIInputRouter();
18
19
[[nodiscard]]
20
auto
dpRatio()
const
->
float
{
21
return
m_dp_ratio;
22
}
23
24
private
:
25
event::Listener
m_listener;
26
28
std::unordered_set<int> m_ui_buttons;
29
std::unordered_set<int> m_ui_keys;
30
31
float
m_dp_ratio = 1.0f;
32
int
m_mods = 0;
33
};
34
35
}
event::Listener
manages the lifetime, subscription, and unsubscription of callbacks
Definition
listener.hpp:39
engine
src
toast
ui
ui_input.hpp
Generated by
1.17.0