 Window@ CreatePopup(Menu@ baseMenu)
 {
     Window@ popup = Window();
+    popup.vars["Popup"] = baseMenu.name;
     popup.style = uiStyle;
     popup.SetLayout(LM_VERTICAL, 1, IntRect(2, 6, 2, 6));
     baseMenu.popup = popup;

    {
        Menu@ createMenu = CreateMenu("Create");
        Window@ createPopup = createMenu.popup;
        createPopup.AddChild(CreateMenuItem("Box"));
        createPopup.AddChild(CreateMenuItem("Cone"));
        createPopup.AddChild(CreateMenuItem("Cylinder"));


Menu@ CreateMenu(const String&in title)
{
    Menu@ menu = CreateMenuItem(title, 0, 0, 8);
    menu.name = "";
    menu.SetFixedWidth(menu.width);
    CreatePopup(menu);
