Question
Array of typed text. How?
Hello!
I tried to make menu with variable element headers.
I tried this code
const char* MenuItemList[10] = {"�?а�?тройки","Скоро�?ть","Extruders","LED Light","UPS","FirmWare","Language","Coolers","Drivers","WiFi"};
............................
Unicode::strncpy(buffer, MenuItemList[data], 20);
Unicode::snprintf(OptionsMenuItemtextAreaBuffer, 20, "%s", buffer);
OptionsMenuItemtextArea.setWildcard(OptionsMenuItemtextAreaBuffer);Code works, but I got problems with cyrillic symbols.
My problem with cyrillic symbols solved only when I created text resource and make this code
OptionsMenuItemtextArea.setTypedText(TypedText(T_MENUITEM1_TEXT_RESOURCE));
OptionsMenuItemtextArea.invalidate();How can I create array of links to text?
I want use text resources, created in TouchGFXDesigner and use it like this:
OptionsMenuItemtextArea1.setTypedText(TypedText(ARRAY[1]));
OptionsMenuItemtextArea2.setTypedText(TypedText(ARRAY[2]));
OptionsMenuItemtextArea3.setTypedText(TypedText(ARRAY[3]));
OptionsMenuItemtextArea4.setTypedText(TypedText(ARRAY[4]));How can I create "ARRAY" ?