hi guys, I'm starting to use lvlg too, but I haven't been able to understand how Squareline works at all.
for example, how can I print variables inside, for example, a text box? or how do I link a variable to the press of a key?
in the end I did everything without using Squareline but it was a huge effort, especially being able to do things the way I wanted (in the end I had to be satisfied with what I managed to do)
Hello nocentini,
Squareline produces the structured code and variables for you. You can then pull/push information directly in your code. Here is an example where I am pulling an integer value from an Arc and pushing a formatted decimal to a label:
ui_set_temp = lv_arc_get_value(ui_ArcTemp);
if (ui_set_temp != ui_set_temp_previous) { //this catches the situation of the user changing the value
Serial.println(ui_set_temp);
lv_label_set_text_fmt(ui_TempSetValueDisplay, "%d.%d", ui_set_temp / 10, ui_set_temp - (ui_set_temp / 10 * 10)); //uses integer maths to fake the display of a decimal
ui_set_temp_previous = ui_set_temp;
}
Squareline on the Mac works ok-ish. You will see above that there was some fiddling around to get it working properly. I'm still struggling with some of the lvgl documented functions not compiling but that's more to do with the code that I'm writing in the IDE than the code from SquareLine
for those of you getting going with squareline, if you're using Linux or Mac, it's worth reading up on ln -s (in the command line) to link the output of squareline into the relevant folder in your file structure. This will mean that each time you output an updated design from squareline, it will automatically be included in your project without you having to manually copy the files.