fix(bw): navigation for main view, logical switches and special functions (#5601)

This commit is contained in:
philmoz
2024-10-11 10:16:11 +10:00
committed by GitHub
parent 7f727cb15c
commit 49734e4336
7 changed files with 57 additions and 44 deletions
+24
View File
@@ -56,6 +56,30 @@ void repeatLastCursorMove(event_t event)
}
}
#if defined(NAVIGATION_9X) || defined(NAVIGATION_XLITE)
inline bool IS_NEXT_HOR_MOVE_EVENT(event_t evt)
{
return evt == EVT_KEY_FIRST(KEY_RIGHT) || evt == EVT_KEY_REPT(KEY_RIGHT) ||
evt == EVT_ROTARY_RIGHT;
}
inline bool IS_PREVIOUS_HOR_MOVE_EVENT(event_t evt)
{
return evt == EVT_KEY_FIRST(KEY_LEFT) || evt == EVT_KEY_REPT(KEY_LEFT) ||
evt == EVT_ROTARY_LEFT;
}
void repeatLastCursorHorMove(event_t event)
{
if (IS_PREVIOUS_HOR_MOVE_EVENT(event) || IS_NEXT_HOR_MOVE_EVENT(event)) {
pushEvent(event);
}
else {
menuHorizontalPosition = 0;
}
}
#endif
void onSwitchLongEnterPress(const char * result)
{
if (result == STR_MENU_SWITCHES) {