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

tcMenu Arduinio library » Root Text

Author: frascuelillo
11/08/2021 11:22:19
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

Author: davetcc
13/08/2021 06:55:08
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

Author: frascuelillo
15/08/2021 10:53:38
Thank you Dave!, I´ll be wait for the option to be working.

Author: frascuelillo
17/08/2021 15:59:33
Hi again!
My problem is solved now adding:
appTitleMenuItem.setTitleHeaderPgm("custom tittle");
to loop() function.
smilie smilie
Thank you Dave!

Author: davetcc
17/08/2021 17:36:07
Great, that's a good short-term solution, but I'll fix it up properly in one of the 2.2 patch releases.

Author: chirrindulari
23/09/2021 12:53:27
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.

Author: davetcc
24/09/2021 06:34:01
 
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.

Author: chirrindulari
24/09/2021 17:42:48
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.

Author: davetcc
24/09/2021 17:47:32
Ah you are right, I have not done the release on platformIO! I will do that later today, thanks for letting me know.

Author: davetcc
24/09/2021 20:12:27
I've just published it now on platformIO. Don't know how I missed that one!

Author: chirrindulari
25/09/2021 16:22:37
Don't worry. You are offering it free, that is the point.

Author: davetcc
26/09/2021 06:44:06
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.




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