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

Method action_release

core/input/input.cpp:1113–1129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1111}
1112
1113void Input::action_release(const StringName &p_action) {
1114 ERR_FAIL_COND_MSG(!InputMap::get_singleton()->has_action(p_action), InputMap::get_singleton()->suggest_actions(p_action));
1115
1116 // Create or retrieve existing action.
1117 ActionState &action_state = action_states[p_action];
1118 action_state.cache.pressed = false;
1119 action_state.cache.strength = 0.0;
1120 action_state.cache.raw_strength = 0.0;
1121 // As input may come in part way through a physics tick, the earliest we can react to it is the next physics tick.
1122 action_state.released_event_id = ObjectID();
1123 action_state.released_physics_frame = Engine::get_singleton()->get_physics_frames() + 1;
1124 action_state.released_process_frame = Engine::get_singleton()->get_process_frames();
1125 action_state.device_states.clear();
1126 action_state.exact = true;
1127 action_state.api_pressed = false;
1128 action_state.api_strength = 0.0;
1129}
1130
1131void Input::set_emulate_touch_from_mouse(bool p_emulate) {
1132 emulate_touch_from_mouse = p_emulate;

Callers 3

_releaseMethod · 0.80
action_erase_eventMethod · 0.80
action_erase_eventsMethod · 0.80

Calls 6

has_actionMethod · 0.80
suggest_actionsMethod · 0.80
ObjectIDClass · 0.50
get_physics_framesMethod · 0.45
get_process_framesMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected