Defining Menu

How to define a content-specific menu.

You can define a content-specific menu by issuing menu related message. See the reference page of Menu messages for full details and options of each message.

Structure of menu

The structure of menu is as follows. Each page can be flipped by gesture.
Some menu pages are already defined in MMDAgent-EX.

page 1
  |- item 1
  |- item 2
  ...
  +- item 30
page 2
  |- item 1
  |- item 2
  ...
  +- item 30
...
page 20
  |- item 1
  |- item 2
  ...
  +- item 30

Add a new menu page

Issuing MENU|ADD message will add a new page to menu. The example message below will add a new blank menu page with alias name mymenu.

MENU|ADD|mymenu

Assign message to an item

MENU|SETITEM message can assign a message string to a menu item. The assigned message will be issued, when user opens the menu page and tap the item. The following message will assign to the top (index 0) item in the mymenu page, a label text “Test1”, and message string THIS|IS|TEST|MESSAGE. If already exist, the command will override the assignment to the new one.

MENU|SETITEM|mymenu|0|Test1|THIS|IS|TEST|MESSAGE

When the item is tapped, the specified message string will be issued, so you can write any menu interaction with your dialogue scenario.