Photon Editor Library
2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
KeyPressedEvent.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
EditorCore/Event/KeyEvent.h
"
4
5
#include <Common/primitive_type.h>
6
7
namespace
ph::editor
8
{
9
10
class
KeyPressedEvent
final :
public
KeyEvent
11
{
12
public
:
13
explicit
KeyPressedEvent
(
EKeyCode
key);
14
KeyPressedEvent
(
EKeyCode
key,
bool
isRepeating
);
15
16
/*EEventType getDynamicType() const override;
17
std::string toString() const override;*/
18
19
bool
isRepeating
()
const
;
20
21
private
:
22
uint8 m_isRepeating : 1;
23
};
24
25
inline
KeyPressedEvent::KeyPressedEvent
(
const
EKeyCode
key)
26
:
KeyPressedEvent
(key, false)
27
{}
28
29
inline
KeyPressedEvent::KeyPressedEvent
(
const
EKeyCode
key,
const
bool
isRepeating)
30
:
KeyEvent
(key)
31
, m_isRepeating(isRepeating)
32
{}
33
34
//inline EEventType KeyPressedEvent::getDynamicType() const
35
//{
36
// return EEventType::KeyDown;
37
//}
38
39
//inline std::string KeyPressedEvent::toString() const
40
//{
41
// return "Key Down Event";
42
//}
43
44
inline
bool
KeyPressedEvent::isRepeating
()
const
45
{
46
return
m_isRepeating;
47
}
48
49
}
// end namespace ph::editor
KeyEvent.h
ph::editor::KeyEvent
Definition
KeyEvent.h:13
ph::editor::KeyPressedEvent
Definition
KeyPressedEvent.h:11
ph::editor::KeyPressedEvent::isRepeating
bool isRepeating() const
Definition
KeyPressedEvent.h:44
ph::editor::KeyPressedEvent::KeyPressedEvent
KeyPressedEvent(EKeyCode key)
Definition
KeyPressedEvent.h:25
ph::editor
Definition
ph_editor.h:10
ph::editor::EKeyCode
EKeyCode
Definition
EKeyCode.h:9
Source
EditorCore
Event
KeyPressedEvent.h
Generated by
1.11.0