[Logo] TCC discussion forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Top Downloads] Top Downloads   [Groups] Back to home page 
[Register] Register /  [Login] Login 


This forum is read only and new users cannot register, please ask all new questions either using GitHub discussions, or in Arduino forum tagging @davetcc.

Prevent selection of title RSS feed
Forum Index » tcMenu Arduinio library
Author Message
pruttelherrie


Joined: Oct 21, 2020
Messages: 24
Offline
Hi Dave,

Is it possible to prevent the menu from scrolling up to the Title, which does nothing? Using version 2.2 I can scroll onto the title, but I would like the cursor to stay on the topmost item. Is this possible?
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
Hi there, at the moment in 2.2 it is not configurable, but we could put in an option to prevent it being selected.

You can set an action for the title using "setTitlePressedCallback" as per below, I usually use it to show version information:

setTitlePressedCallback([](int id) {
        withMenuDialogIfAvailable([](MenuBasedDialog* dlg) {
            dlg->setButtons(BTNTYPE_CLOSE, BTNTYPE_NONE);
            dlg->showRam("ARM Example", false);
            char menuVer[10];
            tccore::copyTcMenuVersion(menuVer, sizeof menuVer);
            dlg->copyIntoBuffer(menuVer);
        });
    });


pruttelherrie


Joined: Oct 21, 2020
Messages: 24
Offline
Ah, nice!

Thanks.
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
BTW the withMenuDialogIfAvailable is a new function that will be released along with the full 2.2 release. I'm just finishing the testing now.
patebeng


Joined: Sep 17, 2021
Messages: 5
Offline
removed
 
Forum Index » tcMenu Arduinio library
Go to:   
Mobile view
Powered by JForum 2.7.0 © 2020 JForum Team • Maintained by Andowson Chang and Ulf Dittmer

This site uses cookies to analyse traffic, serve ads by Google AdSense (non-personalized in EEA/UK), and to record consent. We also embed Twitter, Youtube and Disqus content on some pages, these companies have their own privacy policies.

Our privacy policy applies to all pages on our site

Should you need further guidance on how to proceed: External link for information about cookie management.