mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Merge pull request #96611 from Dynamic-Pistol/master
Add `PROPERTY_HINT_INPUT_NAME` for use with `@export_custom` to allow using input actions
This commit is contained in:
commit
1c4b660312
7 changed files with 49 additions and 3 deletions
|
@ -1665,7 +1665,7 @@ void InputEventAction::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("set_event_index", "index"), &InputEventAction::set_event_index);
|
||||
ClassDB::bind_method(D_METHOD("get_event_index"), &InputEventAction::get_event_index);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "action"), "set_action", "get_action");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING_NAME, "action", PROPERTY_HINT_INPUT_NAME, "show_builtin,loose_mode"), "set_action", "get_action");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "pressed"), "set_pressed", "is_pressed");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "strength", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_strength", "get_strength");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "event_index", PROPERTY_HINT_RANGE, "-1,31,1"), "set_event_index", "get_event_index"); // The max value equals to Input::MAX_EVENT - 1.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue