diff options
| author | Juan Linietsky | 2017-05-20 12:38:03 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2017-05-20 17:05:38 -0300 |
| commit | 5b3709d3096df737b8bb2344446be818b0389bfe (patch) | |
| tree | 649a0989b1494f3c4687d59e503310f4e6bbeb40 /editor/editor_path.cpp | |
| parent | 93f9a83062dbe74474a4a7928758c5cf5588238e (diff) | |
| download | godot-5b3709d3096df737b8bb2344446be818b0389bfe.tar.gz godot-5b3709d3096df737b8bb2344446be818b0389bfe.tar.zst godot-5b3709d3096df737b8bb2344446be818b0389bfe.zip | |
Removal of InputEvent as built-in Variant type..
this might cause bugs I haven't found yet..
Diffstat (limited to 'editor/editor_path.cpp')
| -rw-r--r-- | editor/editor_path.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp index 98e0808ba..8ce4f8859 100644 --- a/editor/editor_path.cpp +++ b/editor/editor_path.cpp @@ -69,9 +69,10 @@ void EditorPath::_add_children_to_popup(Object *p_obj, int p_depth) { } } -void EditorPath::_gui_input(const InputEvent &p_event) { +void EditorPath::_gui_input(const Ref<InputEvent> &p_event) { - if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index == BUTTON_LEFT && p_event.mouse_button.pressed) { + Ref<InputEventMouseButton> mb = p_event; + if (mb.is_valid() && mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) { Object *obj = ObjectDB::get_instance(history->get_path_object(history->get_path_size() - 1)); if (!obj) |
