How do I make a menu?

I really want to know how to make a menu. Like this:
Screenshot 2021-07-22 6.59.15 PM

Are the JS dialog boxes not enough?

No, they're not enough.

I think you can use MenuMorph in some way. You may need to look through the source code to see how to use it, though.

Can you give me a block that can give me a menu with a set of items?

I don't know how to do that.

You may start with
untitled script pic

JS

let result = false;

let menu = new MenuMorph( (item)=>{result=item});
menu.addItem( "A", "A");
menu.addItem( "B", "B");

menu.popUpAtHand( this.world());

return ()=>result;

How to you make the "when not false" block?

menu script pic

How can I give it a title?

The JS function SpriteMorph.prototype.inform(string) will make a menu with the string as the title and one OK button. I don't know about custom buttons though

SpriteMorph.prototype just refers to the basic functions of sprites. use this.inform

Okay.

what about with multiple items input?

You can Shift click :snap: and "switch to dev mode". Then right-click & "inspect" to see how something is built internally. Next, you can look at the source code.

CheckBox menu project

Menu closes after Enter

oh i mean
how to do something like
[scratchblocks]
(output menu of [Apple] [Banana] [Orange] @delInput @addInput:: grey)
[/scratchblocks]
(for some reason i cant do delInput and addInput symbol)

instead of
@addInput
do
@</span>addInput

ok, fixed.

hi, im wondering why this looks like an old version of scratch, i use scraqcth i used to use this, scratch is like an upgrade of this, scratch.mit.edu