i want to make dynamic menu in my plugin. cause i have 2 language in my plugin (e.g. English and Spanish), so if i choose english, the next menu will appear in english, and if i choose spanish, the next menu will appear in spanish.
i'm using this code to make menu
MENUITEM_STRINGLIST(language, "Virtual Guide", NULL, "English", "Spanish");
selection=rb->do_menu(&language, &selection, NULL, false);
if i use "if...else" there will be warning when i compile the rockbox.
VirtualGuide.c: In function `menu':
VirtualGuide.c:207: warning: unused variable `menu'
VirtualGuide.c:210: warning: unused variable `menu'
VirtualGuide.c:214: warning: passing arg 1 of pointer to function from incompatible pointer type
and when i running the rockbox (i am using simulator), when i choose one of language in language menu, the rockbox will hang.
can anyone suggest the problem(s)??
another question is:
i want to make dynamic language that read from .txt file. So, if i've changed the .txt files, the menu in rockbox will change too. how i can build it??