You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-21 14:57:09 +00:00
Merge pull request #8048 from ficoos/was_input_handled
Add the option to check if input was handled
This commit is contained in:
@@ -374,6 +374,10 @@ void SceneTree::input_text(const String &p_text) {
|
|||||||
root_lock--;
|
root_lock--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SceneTree::is_input_handled() {
|
||||||
|
return input_handled;
|
||||||
|
}
|
||||||
|
|
||||||
void SceneTree::input_event(const InputEvent &p_event) {
|
void SceneTree::input_event(const InputEvent &p_event) {
|
||||||
|
|
||||||
if (is_editor_hint() && (p_event.type == InputEvent::JOYPAD_MOTION || p_event.type == InputEvent::JOYPAD_BUTTON))
|
if (is_editor_hint() && (p_event.type == InputEvent::JOYPAD_MOTION || p_event.type == InputEvent::JOYPAD_BUTTON))
|
||||||
@@ -2153,6 +2157,7 @@ void SceneTree::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("set_pause", "enable"), &SceneTree::set_pause);
|
ClassDB::bind_method(D_METHOD("set_pause", "enable"), &SceneTree::set_pause);
|
||||||
ClassDB::bind_method(D_METHOD("is_paused"), &SceneTree::is_paused);
|
ClassDB::bind_method(D_METHOD("is_paused"), &SceneTree::is_paused);
|
||||||
ClassDB::bind_method(D_METHOD("set_input_as_handled"), &SceneTree::set_input_as_handled);
|
ClassDB::bind_method(D_METHOD("set_input_as_handled"), &SceneTree::set_input_as_handled);
|
||||||
|
ClassDB::bind_method(D_METHOD("is_input_handled"), &SceneTree::is_input_handled);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("create_timer:SceneTreeTimer", "time_sec", "pause_mode_process"), &SceneTree::create_timer, DEFVAL(true));
|
ClassDB::bind_method(D_METHOD("create_timer:SceneTreeTimer", "time_sec", "pause_mode_process"), &SceneTree::create_timer, DEFVAL(true));
|
||||||
|
|
||||||
|
|||||||
@@ -350,6 +350,7 @@ public:
|
|||||||
void quit();
|
void quit();
|
||||||
|
|
||||||
void set_input_as_handled();
|
void set_input_as_handled();
|
||||||
|
bool is_input_handled();
|
||||||
_FORCE_INLINE_ float get_fixed_process_time() const { return fixed_process_time; }
|
_FORCE_INLINE_ float get_fixed_process_time() const { return fixed_process_time; }
|
||||||
_FORCE_INLINE_ float get_idle_process_time() const { return idle_process_time; }
|
_FORCE_INLINE_ float get_idle_process_time() const { return idle_process_time; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user