Register / Login  |  Desktop view  |  Jump to bottom of page

tcMenu Arduinio library » Callback function on the root of the menu?

Author: pruttelherrie
08/04/2021 18:59:53
Hi,

Is it possible to have a callback function on the root of the menu? When I use the example "colorTftEthernet32", the submenus have a nice back function on their title, formatted like "Title [...]". I would like to have a similar function on the main title, which would then trigger takeOverDisplay();

See also the guitar-multi-effect-thingy topics in the "built with" category, here I have a "back to PLAY" action as first item of the main menu. This could just as well be the title of the main menu. Going back with giveBackDisplay() would then go right to the first item in the main menu.

Author: davetcc
08/04/2021 21:15:02
Something similar to that will be in version 2.0 of the library once released. You can register a handler for when the main title is clicked or touched. It is supported on all graphical renderers. You can see it used in a few of the new examples.

However 2.0 library is still a little way off while we fully test it.

Author: pruttelherrie
09/04/2021 06:27:01
Cool. I'm happy as it is but it makes for a more logical UI if this works.




Register / Login  |  Desktop view  |  Jump to top of page