Skip to content

Initialize the screen, but not visibly with the setScreen command #328

Description

@zkarolyi

Is your feature request related to a problem?

I initialize the menu screen in the Setup section, but by default it shouldn't show the menu, just after button press handled in Loop.
Now after setScreen I hide it, so the screen flashes.

Describe the solution you'd like?

Add optional bool parameter to setScreen as "activate" with true as default value. If I set it to false, the menu does not shows up. Like:

void LcdMenu::setScreen(MenuScreen* screen, bool active = true) {
    LOG(F("LcdMenu::setScreen"));
    this->screen = screen;
    if(active){
      renderer.display->clear();
      this->screen->draw(&renderer);
    }
}

Describe alternatives you've considered

No response

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestAdd new feature to the library

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions