Toggle navigation
ivorium
iv_components
Example project
GitHub
Main Page
Modules
Classes
Files
File List
File Members
ivorium_game
Misc
DefaultBinder.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
ivorium_UI/ivorium_UI.hpp
>
4
#include "../Defs.hpp"
5
6
namespace
iv
7
{
8
12
class
DefaultBinder
:
public
InputBinder
13
{
14
public
:
15
ClientMarker
cm
;
16
17
DefaultBinder
(
Instance
* inst ) :
18
InputBinder
( inst ),
19
cm
( inst, this,
"DefaultBinder"
)
20
{
21
this->cm.
inherits
( this->
InputBinder::cm
);
22
23
//
24
this->
BindKey
(
Defs::Input::UI_Up
,
Input::Key::Up
);
25
this->
BindKey
(
Defs::Input::UI_Down
,
Input::Key::Down
);
26
this->
BindKey
(
Defs::Input::UI_Left
,
Input::Key::Left
);
27
this->
BindKey
(
Defs::Input::UI_Right
,
Input::Key::Right
);
28
29
this->
BindKey
(
Defs::Input::UI_MousePrimary
,
Input::Key::MouseLeft
);
30
this->
BindKey
(
Defs::Input::UI_MousePrimary
,
Input::Key::Touch
);
31
this->
BindHoverKey
(
Defs::Input::UI_MousePrimary
,
Input::Key::Mouse
);
32
}
33
};
34
35
36
}