Erik Hofman:
It turned out that pui required the submenu structure to be declared backwards, which I didn't notice the first time.
This commit is contained in:
parent
83179a5daf
commit
6bcef49afc
1 changed files with 6 additions and 5 deletions
|
@ -116,21 +116,22 @@ void initMenu()
|
|||
SGPropertyNode *call = option[i]->getNode("call");
|
||||
SGPropertyNode *sep = option[i]->getNode("seperator");
|
||||
|
||||
int pos = option.size()-i-1;
|
||||
if (sep)
|
||||
Menu[h].submenu[i] = strdup("----------");
|
||||
Menu[h].submenu[pos] = strdup("----------");
|
||||
|
||||
else if (call && strcmp(call->getStringValue(), ""))
|
||||
Menu[h].submenu[i] = strdup(name->getStringValue());
|
||||
Menu[h].submenu[pos] = strdup(name->getStringValue());
|
||||
|
||||
else
|
||||
Menu[h].submenu[i] = strdup("not specified");
|
||||
Menu[h].submenu[pos] = strdup("not specified");
|
||||
|
||||
Menu[h].cb[i] = NULL;
|
||||
Menu[h].cb[pos] = NULL;
|
||||
for (unsigned int j=0; __fg_gui_fn[j].fn; j++)
|
||||
if (call &&
|
||||
!strcmp(call->getStringValue(), __fg_gui_fn[j].name) )
|
||||
{
|
||||
Menu[h].cb[i] = __fg_gui_fn[j].fn;
|
||||
Menu[h].cb[pos] = __fg_gui_fn[j].fn;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue