diff options
author | Bastiaan Olij <mux213@gmail.com> | 2023-01-22 13:17:20 +1100 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2023-01-23 11:26:12 +1100 |
commit | 52d4a56b3b28a07faf4ee90001d8269f4179f8e3 (patch) | |
tree | 89130fcd0a04a808fd721081b128488660f80aee /servers | |
parent | c3539b4561f9b4d7dc4ba1c5859217e7fbf9c6fe (diff) |
Rename getters and signals on XR nodes to be consistant with input types
Diffstat (limited to 'servers')
-rw-r--r-- | servers/xr/xr_positional_tracker.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/xr/xr_positional_tracker.cpp b/servers/xr/xr_positional_tracker.cpp index 87c1697a35..ffb89fc385 100644 --- a/servers/xr/xr_positional_tracker.cpp +++ b/servers/xr/xr_positional_tracker.cpp @@ -67,8 +67,8 @@ void XRPositionalTracker::_bind_methods() { ClassDB::bind_method(D_METHOD("set_input", "name", "value"), &XRPositionalTracker::set_input); ADD_SIGNAL(MethodInfo("button_pressed", PropertyInfo(Variant::STRING, "name"))); ADD_SIGNAL(MethodInfo("button_released", PropertyInfo(Variant::STRING, "name"))); - ADD_SIGNAL(MethodInfo("input_value_changed", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::FLOAT, "value"))); - ADD_SIGNAL(MethodInfo("input_axis_changed", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::VECTOR2, "vector"))); + ADD_SIGNAL(MethodInfo("input_float_changed", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::FLOAT, "value"))); + ADD_SIGNAL(MethodInfo("input_vector2_changed", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::VECTOR2, "vector"))); ADD_SIGNAL(MethodInfo("profile_changed", PropertyInfo(Variant::STRING, "role"))); }; @@ -203,12 +203,12 @@ void XRPositionalTracker::set_input(const StringName &p_action_name, const Varia // TODO discuss whether we also want to create and emit an InputEventXRButton event } break; case Variant::FLOAT: { - emit_signal(SNAME("input_value_changed"), p_action_name, p_value); + emit_signal(SNAME("input_float_changed"), p_action_name, p_value); // TODO discuss whether we also want to create and emit an InputEventXRValue event } break; case Variant::VECTOR2: { - emit_signal(SNAME("input_axis_changed"), p_action_name, p_value); + emit_signal(SNAME("input_vector2_changed"), p_action_name, p_value); // TODO discuss whether we also want to create and emit an InputEventXRAxis event } break; |