sbrin / lopaka

Lopaka - Stunning graphics for embedded systems displays
https://lopaka.app
Apache License 2.0
366 stars 19 forks source link

Use bitmap layers title as variable names #67

Open sbrin opened 10 months ago

sbrin commented 10 months ago

I want to be able to change layer titles and use it in code export as variable names

Currently when you have several drawings, they all named as Layer_# The resulting code is hard to manage, you cannot tell which icon is that, i.e.:

u8g2.drawXBMP( 0, 31, 15, 14, image_Layer_34_bits);
u8g2.drawXBMP( 110, 0, 18, 9, image_Layer_35_bits);
u8g2.drawXBMP( -2, 15, 18, 11, image_Layer_36_bits);

Let's make it possible to change the layer name and use it in code

This is much useful:

u8g2.drawXBMP( 0, 31, 15, 14, img_folder_bits);
u8g2.drawXBMP( 110, 0, 18, 9, img_battery_bits);
u8g2.drawXBMP( -2, 15, 18, 11, img_bitrate_bits);

All variable names must be converted to C-compatible format (see toCppVariableName)