23 using json::utility::jsonObject;
27 for (
const auto& i : popupItems)
29 const jsonObject& item = get<jsonObject>(i.data.front().second);
31 uint64_t menuId = item.getUnsignedInt(
"menuId");
33 if (menuId != popupId)
39 const vector<jsonObject>& dropDownItems = item.getArray(
"items");
41 for (
const auto& j : dropDownItems)
43 const jsonObject& dropDownItem = get<jsonObject>(j.data.front().second);
47 const string& type = dropDownItem.getString(
"itemType");
51 menu.
addMenuItem(make_unique<MenuItem>(text, dropDownItem.getString(
"functionName"), dropDownItem.getString(
"moduleName")));
55 Menu* popupMenu =
nullptr;
56 uint64_t insidePopupId = dropDownItem.getUnsignedInt(
"popupId");
58 for (
const auto& j : popupItems)
60 const jsonObject& popupItem = get<jsonObject>(j.data.front().second);
62 if (popupItem.getUnsignedInt(
"menuId") == insidePopupId)
80 return make_unique<DropDownMenuItem>(text, menu.
getHandle());