MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / load_default

Method load_default

core/input/input_map.cpp:890–908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

888}
889
890void InputMap::load_default() {
891 HashMap<String, List<Ref<InputEvent>>> builtins = get_builtins_with_feature_overrides_applied();
892
893 for (const KeyValue<String, List<Ref<InputEvent>>> &E : builtins) {
894 String name = E.key;
895
896 add_action(name);
897
898 const List<Ref<InputEvent>> &inputs = E.value;
899 for (const List<Ref<InputEvent>>::Element *I = inputs.front(); I; I = I->next()) {
900 Ref<InputEventKey> iek = I->get();
901
902 // For the editor, only add keyboard actions.
903 if (iek.is_valid()) {
904 action_add_event(name, I->get());
905 }
906 }
907 }
908}
909
910InputMap::InputMap() {
911 ERR_FAIL_COND_MSG(singleton, "Singleton in InputMap already exists.");

Callers 2

main.cppFile · 0.80
test_case_startMethod · 0.80

Calls 4

frontMethod · 0.45
nextMethod · 0.45
getMethod · 0.45
is_validMethod · 0.45

Tested by 1

test_case_startMethod · 0.64