requestMenu

abstract fun requestMenu(items: List<FramebufferMenuItem>, x: Int, y: Int, complete: (Int) -> Unit)

Opens a menu at a position in framebuffer pixels and returns immediately. The plugin waits on its own thread, so this must not block.

complete must be called exactly once, with the id of the chosen item or 0 when the user dismissed it. A host that cannot show a menu still has to answer with 0 rather than drop the request, or the plugin waits for ever.