How to use the gui/menu.create function in gui

To help you get started, we’ve selected a few gui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github os-js / OS.js / src / client / javascript / gui / elements / menus.js View on Github external
show(ev) {
    ev.stopPropagation();
    ev.preventDefault();

    // This is to use a menu-bar > menu as a contextmenu
    const newNode = this.$element.cloneNode(true);
    Menu.create(null, ev, newNode);
  }
github os-js / OS.js / src / client / javascript / core / window.js View on Github external
this._close();
          }
        };
      }]
    ];

    const list = [];
    control.forEach((iter) => {
      if (iter[0] ) {
        list.push(iter[1]());
      }
    });

    this._focus();

    Menu.create(list, ev);
  }