/** * @brief Called when we init the node on the screen */ void uiWindowNode::onWindowOpened (uiNode_t* node, linkedList_t* params) { uiLocatedNode::onWindowOpened(node, nullptr); /* script callback */ if (EXTRADATA(node).onWindowOpened) UI_ExecuteEventActionsEx(node, EXTRADATA(node).onWindowOpened, params); UI_Invalidate(node); }
static void UI_CvarListenerNodeCallback (const char* cvarName, const char* oldValue, const char* newValue, void* data) { linkedList_t* list = static_cast<linkedList_t*>(data); linkedList_t* params = nullptr; LIST_AddString(¶ms, oldValue); LIST_AddString(¶ms, newValue); while (list) { uiNode_t* node = static_cast<uiNode_t*>(list->data); UI_ExecuteEventActionsEx(node, node->onClick, params); list = list->next; } }
/** * @brief Called when we init the node on the screen */ void uiWindowNode::onWindowOpened (uiNode_t* node, linkedList_t* params) { uiLocatedNode::onWindowOpened(node, nullptr); /* script callback */ if (EXTRADATA(node).onWindowOpened) { UI_ExecuteEventActionsEx(node, EXTRADATA(node).onWindowOpened, params); } if (EXTRADATA(node).lua_onWindowOpened != LUA_NOREF) { UI_ExecuteLuaEventScript_ParamList(node, EXTRADATA(node).lua_onWindowOpened, params); } UI_Invalidate(node); }