pencere

Components / Layers

u:menu

The host's menu, at the element options.near, or at options.at where near is not laid out: the reply that asks for it, to be returned from handle, or nil where there is no place to open it at.

The terminal draws this one: the page asks for it in its reply, and the menu the person sees is the system's own, with its keys and its looks.

What it does

The host's menu, at the element options.near (below its left edge), or at options.at ({ x, y }) where near is not laid out (not drawn, or not yet): the reply that asks for it, to be returned from handle, or nil where there is no place to open it at (near alone, and not laid out). entries are { key, title, keys, enabled } and "-" for a rule. What the person picks comes back as { from = id, kind = "menu", entry = key }, with editor = options.editor where the menu is of an editor (u:editor_menu): the pick is of the menu the person was shown, which may not be the last the page asked for, so what it is of is told with the pick and not kept.

kit/sandbox/library/ui/layers.luau, line 329