Skip to content

hold the focus on 1 line #89

Answered by VasilKalchev
sergedenni asked this question in Q&A
Discussion options

You must be logged in to vote
bool switching_focus = true;

void encoder_btn_pressed() {
  if (switching_focus == true) {
    switching_focus = false;
  } else {
    switching_focus = true;
  }
}

void encoder_cw() {
  if (switching_focus == true) {
    menu.switch_focus();
  } else {
    menu.call_function(1);
  }
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by VasilKalchev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
type: question Need help using the repository.
2 participants