You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
feat(gamepad): improve gamepad behavior with slider and popup_menu
This commit is contained in:
committed by
levrault
parent
27253f3eb2
commit
166ca77f20
@@ -1096,6 +1096,15 @@ String InputEventJoypadMotion::to_string() {
|
||||
return vformat("InputEventJoypadMotion: axis=%d, axis_value=%.2f", axis, axis_value);
|
||||
}
|
||||
|
||||
Ref<InputEventJoypadMotion> InputEventJoypadMotion::create_reference(JoyAxis p_axis, float p_value) {
|
||||
Ref<InputEventJoypadMotion> ie;
|
||||
ie.instantiate();
|
||||
ie->set_axis(p_axis);
|
||||
ie->set_axis_value(p_value);
|
||||
|
||||
return ie;
|
||||
}
|
||||
|
||||
void InputEventJoypadMotion::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_axis", "axis"), &InputEventJoypadMotion::set_axis);
|
||||
ClassDB::bind_method(D_METHOD("get_axis"), &InputEventJoypadMotion::get_axis);
|
||||
|
||||
Reference in New Issue
Block a user