I can't seem to find any documentation in the wiki on how string[N] is supposed to work. So, I'm kind of grasping at straws on implementing an image control that switches based on an integer value from another subject.
I'm using LVGL Pro 1.2 with LVGL 9.5.
I have also tried this code by changing the lv_image src to "$images[0]" since that should just be the first string in the list, but it keeps complaining that I can't do that and gives me a list of all of my $subjects, not the props.
I guess what I am asking is if I am going the right direction on this or if I am not, being able to do this would be great. Or is there some documentation on how string arrays work?
<component>
<api>
<prop
name="images"
type="string[N]"
default="img_battery1q' 'img_battery2q' 'img_battery3q' 'img_batteryfull'"
/>
<prop name="image_subject" type="subject" default="battery_level" />
</api>
<previews>
<preview name="default" style_bg_color="0x000" />
</previews>
<view extends="lv_image" src="$images[$image_subject]" align="center" />
</component>
I can't seem to find any documentation in the wiki on how string[N] is supposed to work. So, I'm kind of grasping at straws on implementing an image control that switches based on an integer value from another subject.
I'm using LVGL Pro 1.2 with LVGL 9.5.
I have also tried this code by changing the lv_image src to "$images[0]" since that should just be the first string in the list, but it keeps complaining that I can't do that and gives me a list of all of my $subjects, not the props.
I guess what I am asking is if I am going the right direction on this or if I am not, being able to do this would be great. Or is there some documentation on how string arrays work?