1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Optimise Object's get_argument_options

This commit is contained in:
Micky
2024-01-03 12:10:11 +01:00
parent bb6b06c813
commit cd2032a90b
33 changed files with 103 additions and 37 deletions

View File

@@ -181,8 +181,9 @@ void Input::_bind_methods() {
ADD_SIGNAL(MethodInfo("joy_connection_changed", PropertyInfo(Variant::INT, "device"), PropertyInfo(Variant::BOOL, "connected")));
}
#ifdef TOOLS_ENABLED
void Input::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
String pf = p_function;
const String pf = p_function;
if ((p_idx == 0 && (pf == "is_action_pressed" || pf == "action_press" || pf == "action_release" || pf == "is_action_just_pressed" || pf == "is_action_just_released" || pf == "get_action_strength" || pf == "get_action_raw_strength")) ||
(p_idx < 2 && pf == "get_axis") ||
@@ -201,6 +202,7 @@ void Input::get_argument_options(const StringName &p_function, int p_idx, List<S
}
Object::get_argument_options(p_function, p_idx, r_options);
}
#endif
void Input::VelocityTrack::update(const Vector2 &p_delta_p, const Vector2 &p_screen_delta_p) {
uint64_t tick = OS::get_singleton()->get_ticks_usec();