MCPcopy Create free account
hub / github.com/MergHQ/CRYENGINE / SendEvent

Method SendEvent

Code/CryEngine/CryAction/FlashUI/FlashUIEventSystem.cpp:49–75  ·  view source on GitHub ↗

------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

47
48//------------------------------------------------------------------------------------
49SUIArgumentsRet CFlashUIEventSystem::SendEvent(const SUIEvent& event)
50{
51 FUNCTION_PROFILER(GetISystem(), PROFILE_ACTION);
52
53 SUIArguments ret;
54 if (gEnv->IsEditor())
55 {
56 if (GetType() == eEST_UI_TO_SYSTEM && !CFlashUI::CV_gfx_uievents_editorenabled)
57 {
58 const SUIEventDesc* pEventDesc = GetEventDesc(event.event);
59 UIACTION_WARNING("%s (UI->System): Event sent \"%s\" BUT NOT DISPATCHED! (args: %s)", GetName(), pEventDesc ? pEventDesc->sDisplayName : "<UNDEFINED EVENT>", event.args.GetAsString());
60 return ret;
61 }
62 }
63
64#if defined (UIACTION_LOGGING)
65 {
66 const char* evtSysType = GetType() == eEST_UI_TO_SYSTEM ? "UI->System" : "System->UI";
67 const SUIEventDesc* pEventDesc = GetEventDesc(event.event);
68 UIACTION_LOG("%s (%s): Event sent \"%s\" (args: %s)", GetName(), evtSysType, pEventDesc ? pEventDesc->sDisplayName : "<UNDEFINED EVENT>", event.args.GetAsString());
69 }
70#endif
71
72 for (TEventListener::Notifier notifier(m_listener); notifier.IsValid(); notifier.Next())
73 ret.AddArguments(notifier->OnEvent(event));
74 return ret;
75}
76
77//------------------------------------------------------------------------------------
78uint CFlashUIEventSystem::GetEventId(const char* sEventName)

Callers 2

ProcessEventMethod · 0.45
CallFunctionMethod · 0.45

Calls 9

GetISystemFunction · 0.85
GetNameFunction · 0.85
GetAsStringMethod · 0.80
AddArgumentsMethod · 0.80
GetTypeFunction · 0.50
IsEditorMethod · 0.45
IsValidMethod · 0.45
NextMethod · 0.45
OnEventMethod · 0.45

Tested by

no test coverage detected