-
-
Notifications
You must be signed in to change notification settings - Fork 22.2k
Add InputMap.is_builtin_action()
#98482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, it works as expected.
I suggest adding some unit tests to tests/test_input_event.h
after line 98:
CHECK(InputMap::get_singleton()->is_builtin_action("ui_accept"), true);
CHECK(InputMap::get_singleton()->is_builtin_action("ui_text_submit"), true);
CHECK(InputMap::get_singleton()->is_builtin_action("ui_this_is_not_builtin"), false);
CHECK(InputMap::get_singleton()->is_builtin_action("move_forward"), false);
CHECK(InputMap::get_singleton()->is_builtin_action(""), false);
105805e
to
c04e105
Compare
Tests added. |
I think |
Result searching for
Footnotes
|
c04e105
to
b30e04d
Compare
Closes godotengine/godot-proposals#11016
This PR:
is_builtin_action()
to check if a name is the name of a built-in action.erase_action()
warn about removing a built-in action.default_builtin_cache
anddefault_builtin_with_overrides_cache
mutable since caches are expected to be modified in const methods.