MCPcopy Create free account
hub / github.com/GrapheneCt/NetStream / BroadcastGlobalEvent

Method BroadcastGlobalEvent

NetStream/source/event.cpp:19–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19void event::BroadcastGlobalEvent(Plugin *workPlugin, uint32_t type, int32_t d0, int32_t d1, int32_t d2, int32_t d3)
20{
21 ui::Event ev(ui::EV_COMMAND, ui::Event::MODE_DISPATCH, ui::Event::ROUTE_FORWARD, 0, d0, d1, d2, d3);
22 resource::ResourceObj *res = workPlugin->GetResource();
23 if (res)
24 {
25 cxml::Element el = res->GetTableElement(resource::TableType_Page);
26 el = el.GetFirstChild();
27 while (el == true)
28 {
29 uint32_t pageId = 0;
30 cxml::util::GetIDHash(el, "id", &pageId);
31 ui::Widget *target = workPlugin->PageRoot(pageId);
32 if (target)
33 {
34 PostEventRecursive(target, type, &ev);
35 }
36 el = el.GetNextSibling();
37 }
38 }
39}

Callers

nothing calls this directly

Calls 1

PostEventRecursiveFunction · 0.85

Tested by

no test coverage detected