TcMenu / tcMenu

Menu library for Arduino, mbed and ESP with designer UI and remote control capabilities.
https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/
Apache License 2.0
292 stars 24 forks source link

addendum to the old update render thread #465

Closed tomelgato closed 6 months ago

tomelgato commented 6 months ago

Back then i was puzzled about the disappearing Root item (it was just there after start, when entering a submenu and going back it disappeared).

On a new project i found the cause:

renderer.setTitleRequired(false); // now we turn off the title and change the editor characters

This setting doesnt switch off the title completely, the title is there after start of tcmenu and disappears when you enter a menuitem (and doesnt reappear again)

davetcc commented 6 months ago

You're supposed to call that method before the first time rendering takes place, or completely reset the rendering otherwise after calling it, as there is a cache in the renderer that holds the display order.

See how the theme does it by refreshing the cache.

https://github.com/davetcc/tcMenu/blob/master/xmlPlugins/core-themes/coolBlue/ThemeCoolBlueModern.h#L40

tomelgato commented 6 months ago

Oh yes, calling setupMenu() afterwards did do the trick