Post Reply 
CSTMENU: multilevel custom menu with soft keys
03-20-2021, 11:53 AM (This post was last modified: 03-20-2021 12:47 PM by FrankP.)
Post: #8
RE: CSTMENU: multilevel custom menu with soft keys
Hi Ramon,
your really smart CST solution was for me missing a kind of title for sub menus. So I added a title to your CST syntax:
Code:

CST :=
 { { "menu1_title", {   "menu1_displ_and_out1"          ,
                        "menu1_displ_and_out2"          ,
                        ""                              ,
                      { "menu1_displ3" , "menu1_out3" } ,
                      { "menu1_displ4" , "menu1_out4" }
                    } 
   } ,
   { "menu2_title", {   "menu2_displ_and_out1"          ,
                      { "menu2_displ2" , "menu2_out2" } ,
                    }
 };
In addition I added information on the actual menu and page to the displayed title:
"m.<act_menu_num>/<all_menus_in_CST> p.<act_page_num>/<all_pages_in_act_menu>"

   

.zip  CstMenu.zip (Size: 7.69 KB / Downloads: 46)

---------

For another approach (needing even some lines of code less) refer to the following program 'menu'.
   
It makes use of a choice popup dialog for CST menu display. For longer texts to display a bit more beautiful, I think. Unfortunately <left> and <right> directional pad keys are not supported (failed hooking into choice command, only supporting <up> and <down>).
Menu list syntax in this prog expects each entry on the main menu have a seperate display and output text, whereas entries in submenus are always display and output the same string:
Code:

menuList :=
 { { "disp_text1",   "out_text1" },
   { "disp_text2",   "out_text2" },
   { "submenu1"  , { "menu1_disp_and_out1",
                     "menu1_disp_and_out2",
                     "menu1_disp_and_out3"
                   }
   },
   { "submenu2"  , { "menu2_disp_and_out1",
                     "menu2_disp_and_out2"
                   }
   }
 };


.zip  menu.zip (Size: 6.47 KB / Downloads: 35)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: CSTMENU: multilevel custom menu with soft keys - FrankP - 03-20-2021 11:53 AM



User(s) browsing this thread: 1 Guest(s)