mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 16:25:16 +03:00
[X7D] Quick & dirty fix for special functions navigation which was broken
This commit is contained in:
parent
f01f588ad2
commit
0318d63bf8
2 changed files with 46 additions and 3 deletions
|
@ -23,7 +23,27 @@
|
|||
#if defined(CPUARM)
|
||||
void menuRadioSpecialFunctions(event_t event)
|
||||
{
|
||||
#if defined(PCBX7D)
|
||||
const CustomFunctionData * cfn = &g_eeGeneral.customFn[menuVerticalPosition];
|
||||
if (!CFN_SWITCH(cfn) && menuHorizontalPosition < 0 && event==EVT_KEY_BREAK(KEY_ENTER)) {
|
||||
menuHorizontalPosition = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
MENU(STR_MENUSPECIALFUNCS, menuTabGeneral, MENU_RADIO_SPECIAL_FUNCTIONS, HEADER_LINE+MAX_SPECIAL_FUNCTIONS, { HEADER_LINE_COLUMNS NAVIGATION_LINE_BY_LINE|4/*repeated*/ });
|
||||
return menuSpecialFunctions(event, g_eeGeneral.customFn, &globalFunctionsContext);
|
||||
|
||||
#if defined(PCBX7D)
|
||||
if (!CFN_SWITCH(cfn) && menuHorizontalPosition < 0) {
|
||||
menuHorizontalPosition = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
menuSpecialFunctions(event, g_eeGeneral.customFn, &globalFunctionsContext);
|
||||
|
||||
#if defined(PCBX7D)
|
||||
if (!CFN_SWITCH(cfn) && menuHorizontalPosition == 0 && s_editMode <= 0) {
|
||||
menuHorizontalPosition = -1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -372,11 +372,34 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
|
|||
break;
|
||||
}
|
||||
}
|
||||
#if defined(PCBX7D)
|
||||
if (sub==k && menuHorizontalPosition<0 && CFN_SWITCH(cfn)) {
|
||||
lcdInvertLine(i+1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void menuModelSpecialFunctions(event_t event)
|
||||
{
|
||||
MENU(STR_MENUCUSTOMFUNC, menuTabModel, MENU_MODEL_SPECIAL_FUNCTIONS, MAX_SPECIAL_FUNCTIONS+1, {0, NAVIGATION_LINE_BY_LINE|4/*repeated*/});
|
||||
return menuSpecialFunctions(event, g_model.customFn, &modelFunctionsContext);
|
||||
#if defined(PCBX7D)
|
||||
const CustomFunctionData * cfn = &g_model.customFn[menuVerticalPosition];
|
||||
if (!CFN_SWITCH(cfn) && menuHorizontalPosition < 0 && event==EVT_KEY_BREAK(KEY_ENTER)) {
|
||||
menuHorizontalPosition = 0;
|
||||
}
|
||||
#endif
|
||||
MENU(STR_MENUCUSTOMFUNC, menuTabModel, MENU_MODEL_SPECIAL_FUNCTIONS, HEADER_LINE+MAX_SPECIAL_FUNCTIONS, { HEADER_LINE_COLUMNS NAVIGATION_LINE_BY_LINE|4/*repeated*/ });
|
||||
|
||||
#if defined(PCBX7D)
|
||||
if (!CFN_SWITCH(cfn) && menuHorizontalPosition < 0) {
|
||||
menuHorizontalPosition = 0;
|
||||
}
|
||||
#endif
|
||||
menuSpecialFunctions(event, g_model.customFn, &modelFunctionsContext);
|
||||
|
||||
#if defined(PCBX7D)
|
||||
if (!CFN_SWITCH(cfn) && menuHorizontalPosition == 0 && s_editMode <= 0) {
|
||||
menuHorizontalPosition = -1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue