MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / gui_input

Method gui_input

editor/scene/3d/node_3d_editor_plugin.cpp:213–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213void ViewportNavigationControl::gui_input(const Ref<InputEvent> &p_event) {
214 // Mouse events
215 const Ref<InputEventMouseButton> mouse_button = p_event;
216 if (mouse_button.is_valid() && mouse_button->get_button_index() == MouseButton::LEFT) {
217 _process_click(100, mouse_button->get_position(), mouse_button->is_pressed());
218 }
219
220 const Ref<InputEventMouseMotion> mouse_motion = p_event;
221 if (mouse_motion.is_valid()) {
222 _process_drag(100, mouse_motion->get_global_position(), viewport->_get_warped_mouse_motion(mouse_motion));
223 }
224
225 // Touch events
226 const Ref<InputEventScreenTouch> screen_touch = p_event;
227 if (screen_touch.is_valid()) {
228 _process_click(screen_touch->get_index(), screen_touch->get_position(), screen_touch->is_pressed());
229 }
230
231 const Ref<InputEventScreenDrag> screen_drag = p_event;
232 if (screen_drag.is_valid()) {
233 _process_drag(screen_drag->get_index(), screen_drag->get_position(), screen_drag->get_relative());
234 }
235}
236
237void ViewportNavigationControl::_update_navigation() {
238 if (focused_index == -1) {

Callers

nothing calls this directly

Calls 15

_redirect_freelook_inputFunction · 0.85
get_sizeFunction · 0.85
CLAMPFunction · 0.85
get_button_indexMethod · 0.80
get_relativeMethod · 0.80
get_mouse_modeMethod · 0.80
set_mouse_modeMethod · 0.80
is_validMethod · 0.45
get_positionMethod · 0.45
is_pressedMethod · 0.45
get_global_positionMethod · 0.45

Tested by

no test coverage detected