| 1858 | // Input events. |
| 1859 | |
| 1860 | void Control::_call_gui_input(const Ref<InputEvent> &p_event) { |
| 1861 | if (p_event->get_device() != InputEvent::DEVICE_ID_INTERNAL) { |
| 1862 | emit_signal(SceneStringName(gui_input), p_event); // Signal should be first, so it's possible to override an event (and then accept it). |
| 1863 | } |
| 1864 | if (!is_inside_tree() || get_viewport()->is_input_handled()) { |
| 1865 | return; // Input was handled, abort. |
| 1866 | } |
| 1867 | |
| 1868 | if (p_event->get_device() != InputEvent::DEVICE_ID_INTERNAL) { |
| 1869 | GDVIRTUAL_CALL(_gui_input, p_event); |
| 1870 | } |
| 1871 | if (!is_inside_tree() || get_viewport()->is_input_handled()) { |
| 1872 | return; // Input was handled, abort. |
| 1873 | } |
| 1874 | gui_input(p_event); |
| 1875 | } |
| 1876 | |
| 1877 | void Control::gui_input(const Ref<InputEvent> &p_event) { |
| 1878 | } |
no test coverage detected