I propose allowing awaitform to insert headers, dividers, and labels into the menu.
Here, it seems possible to insert various items into the menu form, but this cannot be done with awaitform
https://github.com/DavyCraft648/PMServerUI-Example
example
if(!$sender instanceof Player){
return false;
}
Await::f2c(function() use ($sender) : \Generator{
$menu = AwaitForm::menu(
title: "test",
content: "abcd",
buttons: [
FormControl::divider(),
Button::simple("test"),
FormControl::label("test2"),
Button::simple("test1"),
FormControl::header("abc"),
],
);
try{
yield from $menu->request($sender);
}catch(AwaitFormException|FormValidationException){
}
});
