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

Function DispatchMessage

engine/gui/src/gui.cpp:2575–2587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2573 }
2574
2575 Result DispatchMessage(HScene scene, dmMessage::Message* message)
2576 {
2577 int custom_ref = LUA_NOREF;
2578 if (message->m_UserData2) {
2579 // NOTE: By convention m_FunctionRef is offset by LUA_NOREF, see message.h in dlib
2580 custom_ref = message->m_UserData2 + LUA_NOREF;
2581 // RunScript method will DeRef the custom_ref if it is not LUA_NOREF
2582 }
2583
2584 Result r = RunScript(scene, SCRIPT_FUNCTION_ONMESSAGE, custom_ref, (void*)message);
2585
2586 return r;
2587 }
2588
2589 Result DispatchInput(HScene scene, const InputAction* input_actions, uint32_t input_action_count, bool* input_consumed)
2590 {

Callers 6

PollDeltaFunction · 0.50
Dispatch3Function · 0.50
TEST_FFunction · 0.50
SendLayoutChangedMessageFunction · 0.50
CompGuiOnMessageFunction · 0.50
_glfwPlatformPollEventsFunction · 0.50

Calls 1

RunScriptFunction · 0.70

Tested by 2

Dispatch3Function · 0.40
TEST_FFunction · 0.40