Skip to content

Scrollable Jump Table (dynamic) question #2333

Answered by olikraus
ViacheslavK9 asked this question in Q&A
Discussion options

You must be logged in to vote

Another idea is to reset the position to zero:

void clearFormPositionCache( mui_t *mui, uint8_t form_id )
{
  uint8_t i;
  for( i = 0; i < MUI_MENU_CACHE_CNT; i++ )
    if ( mui->menu_form_id[i] == form_id )
      mui->menu_form_cursor_focus_position[i] = 0;
}

Then execute this before "sendSelect()"

  if ( press_event == 1 ) {
    clearFormPositionCache( ui.getMUI(), 11);   // always reset the position for "form" 11
    mui.sendSelect();
    is_redraw = 1;
    press_event = 0;
  }

Replies: 2 comments 20 replies

Comment options

You must be logged in to vote
11 replies
@ViacheslavK9
Comment options

@ViacheslavK9
Comment options

@olikraus
Comment options

@olikraus
Comment options

Answer selected by ViacheslavK9
@ViacheslavK9
Comment options

@ViacheslavK9
Comment options

@olikraus
Comment options

@ViacheslavK9
Comment options

Comment options

You must be logged in to vote
9 replies
@ViacheslavK9
Comment options

@olikraus
Comment options

@ViacheslavK9
Comment options

@olikraus
Comment options

@ViacheslavK9
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants