Removal of InputEvent as built-in Variant type..

this might cause bugs I haven't found yet..
This commit is contained in:
Juan Linietsky
2017-05-20 12:38:03 -03:00
parent 93f9a83062
commit 5b3709d309
206 changed files with 9547 additions and 10167 deletions

View File

@ -32,14 +32,16 @@
#include "class_db.h"
#include "os/keyboard.h"
void EditorNameDialog::_line_gui_input(const InputEvent &p_event) {
void EditorNameDialog::_line_gui_input(const Ref<InputEvent> &p_event) {
if (p_event.type == InputEvent::KEY) {
Ref<InputEventKey> k = p_event;
if (!p_event.key.pressed)
if (k.is_valid()) {
if (!k->is_pressed())
return;
switch (p_event.key.scancode) {
switch (k->get_scancode()) {
case KEY_ENTER:
case KEY_RETURN: {