nngn
Loading...
Searching...
No Matches
group.h
Go to the documentation of this file.
1#ifndef NNGN_INPUT_GROUP_H
2#define NNGN_INPUT_GROUP_H
3
4#include <unordered_map>
5
6#include "input.h"
7
8namespace nngn {
9
10class BindingGroup {
11 struct Info { int ref = {}; Input::Selector selector = {}; };
12 std::unordered_map<int, Info> m = {};
13public:
14 Info for_key(int key) const;
15 Info for_event(int key, Input::Action action, Input::Modifier mods) const;
16 bool add(lua_State *L, int key, Input::Selector s);
17 bool remove(lua_State *L, int key);
18};
19
20}
21
22#endif
bool add(lua_State *L, int key, Input::Selector s)
bool remove(lua_State *L, int key)
Info for_key(int key) const
Info for_event(int key, Input::Action action, Input::Modifier mods) const
std::unordered_map< int, Info > m
Definition: group.h:12
std::chrono::seconds s
Definition: timing.cpp:6
Definition: audio.cpp:7
Definition: group.h:11
Input::Selector selector
Definition: group.h:11
int ref
Definition: group.h:11