[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.

foreign languages and characters RSS feed
Forum Index » tcMenu Designer UI
Author Message
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
I'd be really interested in how you think the designer UI and library could work better for non-Latin character sets and even any feedback around what graphical libraries worked and didn't.
k


Joined: Jun 17, 2021
Messages: 18
Offline
Thank you,

I looked at the example and documentation. From what I what I understood that I only add code to the void setup of the main .ino

I made a basic project and tried to implement the icons. It compiles, but no Icons on display. I tried once with a text item menu, and once with a submenu.

Should there be a refresh function that I may be missing?
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
The ESP8266 example was missing:

// after changing the drawing properties, always refresh the cache to ensure it draws properly. 
    tcgfx::ConfigurableItemDisplayPropertiesFactory::refreshCache();


I've added it now but always do that after adjusting the drawing properties.

So the procedure is, add the icon to the icon cache, add the grid position that defines how to draw it, refresh the cache. There is only one thing to be aware of. You can either manually provide every grid position for a submenu, or you need to make sure that the items you are overriding are further down in the order than the automatically arranged ones, otherwise, it will draw the item before it picks up the grid position. The next thing on my list is to do a full start to finish tutorial on graphical rendering.
k


Joined: Jun 17, 2021
Messages: 18
Offline
Thank you,

I added the new line, but i still dont get an icon on screen. I may be missing something ot maybe I am not understanding the coordinate system and drawing it offscreen
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
It's more like a desktop drawing system, you just say which row you want it to appear on, where 0 is generally reserved for the title, then 1 would be the first item row etc. Same with columns, 0 is the first, 1 is the second, 2 third and so on.
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
As per the other ongoing topic, I'm actually presently working on a tutorial for this. It should be available soon.
k


Joined: Jun 17, 2021
Messages: 18
Offline
Thank you,

I look forward to the tutorial, as so far I couldn't figure it out.
k


Joined: Jun 17, 2021
Messages: 18
Offline
I just noticed that there is a version 2.2 Beta release. Could it be that I need that version instead of 2.1?
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
2.2 is now a full release as of this morning.

But it has no changes in the grid drawing code. Did you follow the examples in terms of the grid drawing, there are several examples that show how to render a menu item as an image. But the menu item must be actionable such as a submenu, action or boolean item.

The tutorial is coming out very soon, I needed to get 2.2 out first, as it has some changes that would otherwise invalidate the tutorial.

From 2.2 onwards, the changes will be far more incremental and more focused on plugins and IoT capabilities, as I now consider the core to be complete.

We'll try and look at unicode support. I mean Java (tcmenu designer) uses unicode natively, we need to work out where the issues are in the chain and apply fixes.
k


Joined: Jun 17, 2021
Messages: 18
Offline
Thank you, I look forward to the updates.

I updated everything, and ran the esp32amplifier from the designer and generated the code matching my rig. And after copying the code for the icons for the links you provided, it worked now, thank you.

Now I am trying to make my own icons, but every convertor i try results in a wrong image. What did you use to make the icons?
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
The icons can either be native bitmaps or XBMP format. I recommend XBMP for what you want to do.

The best tool to use for XBMP that I have found is my favourite image editor - GIMP.

It has an option to export as XBMP that works really well.

I would stick to multiples of 8 to be safe with the widest range of libraries.
k


Joined: Jun 17, 2021
Messages: 18
Offline
Thank you, really appreciate it! The Icons are perfect now.

Will write what worked for me if anyone else finds this and wants to know how to generate char arrays
Used Gimp and opened my image.
-Resize image to Icons size (e.g. 16*16 pixels)
- Convert image to indexed Black and White (to save memory)
https://docs.gimp.org/2.10/en/gimp-image-convert-indexed.html
- Export as .xbm
- Open generated file with text editor (notepad), and find the char array for the image
davetcc


Joined: Jan 19, 2019
Messages: 686
Offline
To conclude this thread as it is still searched for a lot, tcMenu now supports TcUnicode. This provides full UTF-8 Unicode with the standard Adafruit_GFX library. It also works for many other display libraries. It is tested with every plugin that we have.

TcMenu Designer can generate menus with this support out of the box. The designer will output C++ files with UTF-8 strings.

https://www.thecoderscorner.com/products/arduino-libraries/tc-unicode-helper/

https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/using-custom-fonts-in-menu/

The support for this is new in 3.0 and will be improved over the next few releases.
 
Forum Index » tcMenu Designer UI
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.