MCPcopy Create free account
hub / github.com/defold/defold / DispatchInput

Function DispatchInput

engine/gui/src/gui.cpp:2589–2608  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2587 }
2588
2589 Result DispatchInput(HScene scene, const InputAction* input_actions, uint32_t input_action_count, bool* input_consumed)
2590 {
2591 InputArgs args;
2592 args.m_Consumed = false;
2593 for (uint32_t i = 0; i < input_action_count; ++i)
2594 {
2595 args.m_Action = &input_actions[i];
2596 Result result = RunScript(scene, SCRIPT_FUNCTION_ONINPUT, LUA_NOREF, (void*)&args);
2597 if (result != RESULT_OK)
2598 {
2599 return result;
2600 }
2601 else
2602 {
2603 input_consumed[i] = args.m_Consumed;
2604 }
2605 }
2606
2607 return RESULT_OK;
2608 }
2609
2610 Result ReloadScene(HScene scene)
2611 {

Callers 2

StepFrameFunction · 0.50
TEST_FFunction · 0.50

Calls 1

RunScriptFunction · 0.70

Tested by 1

TEST_FFunction · 0.40