[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 

Root Text RSS feed
Forum Index » tcMenu Arduinio library
Author Message
frascuelillo


Joined: Jun 20, 2021
Messages: 3
Offline
Let me thank you for this amazing project.
Is there a way to change the text of the root menu tittle from main Arduino scketch?
I know that it is generated based on the name of the application when TCMenuDesigner generate the code ,
but I would like to show the software version in the root menu tittle without having to generate the TCMenu code again or modify the text of the "applicationInfo" at xxxmenu.cpp , since it will be eliminated if I generate the code again with TCMenuDesigner.
I have tried to modify the value of "applicationinfo", but I think it is not possible because it is stored in PROGMEM, True?
Best Regards.

Francisco
davetcc


Joined: Jan 19, 2019
Messages: 531
Offline
Thanks for the feedback, it's good to get users feedback on the library.

Although it looks like the title menu item does allow the value to change, it looks like the base renderer always updates it every time around.

What I will do, is to add a version of the setter method that takes an option boolean that tells the object to consider the text locked.

void setTitleHeaderPgm(const char *header, bool textIsLocked)



Take a look at: https://github.com/davetcc/tcMenuLib/blob/master/src/graphics/RuntimeTitleMenuItem.h

I've raised an issue for this: https://github.com/davetcc/tcMenuLib/issues/125
frascuelillo


Joined: Jun 20, 2021
Messages: 3
Offline
Thank you Dave!, I´ll be wait for the option to be working.
frascuelillo


Joined: Jun 20, 2021
Messages: 3
Offline
Hi again!
My problem is solved now adding:
appTitleMenuItem.setTitleHeaderPgm("custom tittle");
to loop() function.
smilie smilie
Thank you Dave!
davetcc


Joined: Jan 19, 2019
Messages: 531
Offline
Great, that's a good short-term solution, but I'll fix it up properly in one of the 2.2 patch releases.
chirrindulari


Joined: Jan 23, 2021
Messages: 22
Offline
It seems to be a solution in the tcMenuLib project (I mean in the software that constructs the source code for the embedded processor)
Any of you could think on something to change in the embedded code, or it is too difficult?

I've seen that the file "tcMenuU8g2.cpp" (constructed by the application) has U8g2MenuRenderer::renderTitleArea().
It copies in a buffer the title menu (applicationInfo.name) but I don't have an strategic plan. Any help will be welcome.
davetcc


Joined: Jan 19, 2019
Messages: 531
Offline
I've seen that the file "tcMenuU8g2.cpp" (constructed by the application) has U8g2MenuRenderer::renderTitleArea().


That's from a really old version of TcMenu, unlikely we can help with that version here.

Any display-specific code from the past 6+ months uses the drawable interface. That's the version we are discussing here.
chirrindulari


Joined: Jan 23, 2021
Messages: 22
Offline
OK, I'm going to update the versions.

I have a question if you don't mind...
I'm using PlatformIO. In that IDE, your library appears, but the version I can insert is 2.1.3
In github I can see 2.2.3 (https://github.com/davetcc/tcMenuLib)

Do you reccomend installing 2.1.3 from the IDE or add manually the last version available on github?

Thanks again for your work, Dave.
davetcc


Joined: Jan 19, 2019
Messages: 531
Offline
Ah you are right, I have not done the release on platformIO! I will do that later today, thanks for letting me know.
davetcc


Joined: Jan 19, 2019
Messages: 531
Offline
I've just published it now on platformIO. Don't know how I missed that one!
chirrindulari


Joined: Jan 23, 2021
Messages: 22
Offline
Don't worry. You are offering it free, that is the point.
davetcc


Joined: Jan 19, 2019
Messages: 531
Offline
BTW on the override title front, I did a commit for that yesterday that will be in the next release.

https://github.com/davetcc/tcMenuLib/issues/125

You can see the commit also changes the dynamicMenuItems example to use the new functions.
 
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.