------------------------------------------------------------------------------------
| 47 | |
| 48 | //------------------------------------------------------------------------------------ |
| 49 | SUIArgumentsRet 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 | //------------------------------------------------------------------------------------ |
| 78 | uint CFlashUIEventSystem::GetEventId(const char* sEventName) |
no test coverage detected