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
4
5#include <Common/primitive_type.h>
6
7namespace ph::editor
8{
9
10class KeyPressedEvent final : public KeyEvent
11{
12public:
13 explicit KeyPressedEvent(EKeyCode key);
15
16 /*EEventType getDynamicType() const override;
17 std::string toString() const override;*/
18
19 bool isRepeating() const;
20
21private:
22 uint8 m_isRepeating : 1;
23};
24
26 : KeyPressedEvent(key, false)
27{}
28
29inline 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
45{
46 return m_isRepeating;
47}
48
49}// end namespace ph::editor
Definition KeyEvent.h:13
Definition KeyPressedEvent.h:11
bool isRepeating() const
Definition KeyPressedEvent.h:44
KeyPressedEvent(EKeyCode key)
Definition KeyPressedEvent.h:25
Definition ph_editor.h:10
EKeyCode
Definition EKeyCode.h:9