diff options
author | Andreas Haas <liu.gam3@gmail.com> | 2017-05-25 21:54:18 +0200 |
---|---|---|
committer | Andreas Haas <liu.gam3@gmail.com> | 2017-05-25 21:56:54 +0200 |
commit | 3744d9fd55006247031658f29a4cef9ef6ba2bcf (patch) | |
tree | c7cd0df396914b18c395f4bd95782068fc6574a7 /core | |
parent | 7c89e00d46108cbf293d6046eb2231369273537e (diff) |
Fix virtual methods in InputEventKey.
This fixes a lot of problems with key input in the engine.
Diffstat (limited to 'core')
-rw-r--r-- | core/os/input_event.cpp | 2 | ||||
-rw-r--r-- | core/os/input_event.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp index dbf7944e9a..cf3b8f74ec 100644 --- a/core/os/input_event.cpp +++ b/core/os/input_event.cpp @@ -229,7 +229,7 @@ void InputEventKey::set_pressed(bool p_pressed) { pressed = p_pressed; } -bool InputEventKey::is_pressed() { +bool InputEventKey::is_pressed() const { return pressed; } diff --git a/core/os/input_event.h b/core/os/input_event.h index 417b7f066f..31f88b295b 100644 --- a/core/os/input_event.h +++ b/core/os/input_event.h @@ -229,7 +229,7 @@ protected: public: void set_pressed(bool p_pressed); - bool is_pressed(); + virtual bool is_pressed() const; void set_scancode(uint32_t p_scancode); uint32_t get_scancode() const; @@ -238,7 +238,7 @@ public: uint32_t get_unicode() const; void set_echo(bool p_enable); - bool is_echo() const; + virtual bool is_echo() const; uint32_t get_scancode_with_modifiers() const; |