2021-12-02, 19:37
Hi, I'm trying to make a simple wraplist for SmartPlaylistRule.xml to go between the labels for controls 15, 16 and 17.
I got it working more by creating the list with static content, then adding the labels to the three items along the lines of
The only issue is that there are empty elements in my wraplist. For some reason, as I scroll through, it's like this. Item 3 label shows ok when it's static text...
<item 1 label>
<item 2 label>
<item 3 label>
<empty>
<empty>
<item 3 label>
<item 1 label>
<item 2 label>
<item 3 label>
<empty>
<empty>
<item 3 label>
I tried adding a label to show me what position and label of the current item in my container is and it sees the empty items as items 1, 2 and 3 with the correct labels. So I'm not sure what's going on really.... any ideas?
Here's the code for what it's worth. If I do a fixedlist, it doesn't do it. I can get it to work with window properties but then they don't update when you change the value of 15 or 16 in selectdialog
I got it working more by creating the list with static content, then adding the labels to the three items along the lines of
xml:
<item>
<label>$INFO[Control.GetLabel(15)]</label>
<onclick>SendClick(15)</onclick>
</item>
<item>
<label>$INFO[Control.GetLabel(16)]</label>
<onclick>SendClick(16)</onclick>
</item>
<item>
<visible>String.IsEmpty(Control.GetLabel(17).index(1))</visible>
<label>Enter text here...</label>
</item>
<item>
<visible>!String.IsEmpty(Control.GetLabel(17).index(1))</visible>
<label>$INFO[Control.GetLabel(17).index(1)]</label>
</item>
The only issue is that there are empty elements in my wraplist. For some reason, as I scroll through, it's like this. Item 3 label shows ok when it's static text...
<item 1 label>
<item 2 label>
<item 3 label>
<empty>
<empty>
<item 3 label>
<item 1 label>
<item 2 label>
<item 3 label>
<empty>
<empty>
<item 3 label>
I tried adding a label to show me what position and label of the current item in my container is and it sees the empty items as items 1, 2 and 3 with the correct labels. So I'm not sure what's going on really.... any ideas?
Here's the code for what it's worth. If I do a fixedlist, it doesn't do it. I can get it to work with window properties but then they don't update when you change the value of 15 or 16 in selectdialog
xml:<window>
<!-- smartplaylistrule -->
<defaultcontrol always="true">2000</defaultcontrol>
<include>Delayed_Dialog_Fade_Animation</include>
<controls>
<include>Transparent_Dialog_Background</include>
<control type="group">
<visible allowhiddenfocus="true">!Window.IsVisible(shutdownmenu) + !Window.IsVisible(virtualkeyboardd)</visible>
<include>Content_Fade_Animation</include>
<!--Hidden Property setter on window load-->
<control type="button" id="2000">
<animation effect="slide" end="0,0" time="1080" reversible="false">Focus</animation>
<visible allowhiddenfocus="true">false</visible>
<onfocus>SetFocus(1000)</onfocus>
</control>
<!--Hidden buttons-->
<control type="group">
<visible>false</visible>
<control type="button" id="15"/>
<control type="button" id="16"/>
</control>
<control type="button" id="1001">
<animation effect="slide" end="0,0" time="360" reversible="false">Focus</animation>
<visible allowhiddenfocus="true">false</visible>
<onfocus>SetFocus(17)</onfocus>
</control>
<!--Window Furniture-->
<include content="Transparent_Dialog_Panel">
<param name="top" value="450"/>
<param name="bottom" value="360"/>
</include>
<!--Hidden List-->
<control type="wraplist" id="1000">
<visible allowhiddenfocus="true">!Control.HasFocus(2000)</visible>
<include>Content_Fade_Animation</include>
<width>900</width>
<centerleft>50%</centerleft>
<top>405</top>
<height>1080</height>
<scrolltime tween="sine" easing="inout">360</scrolltime>
<orientation>vertical</orientation>
<focusposition>0</focusposition>
<itemlayout width="900" height="90">
<control type="label">
<height>90</height>
<left>15</left>
<right>15</right>
<aligny>top</aligny>
<textcolor>$VAR[LightColor]</textcolor>
<font>List_Title_Unfocused</font>
<label>$INFO[ListItem.Label]</label>
</control>
</itemlayout>
<focusedlayout width="900" height="90">
<control type="button">
<onfocus condition="String.IsEqual(Container(1000).CurrentItem,3)">SetFocus(1001)</onfocus>
</control>
<control type="image">
<texture colordiffuse="$VAR[PrimaryColor]">views/white_100.png</texture>
</control>
<control type="label">
<height>90</height>
<left>15</left>
<right>15</right>
<aligny>top</aligny>
<textcolor>$VAR[SecondaryColor]</textcolor>
<font>List_Title_Focused</font>
<label>$INFO[ListItem.Label]</label>
</control>
</focusedlayout>
<content>
<item>
<label>$INFO[Control.GetLabel(15)]</label>
<onclick>SendClick(15)</onclick>
</item>
<item>
<label>$INFO[Control.GetLabel(16)]</label>
<onclick>SendClick(16)</onclick>
</item>
<item>
<visible>String.IsEmpty(Control.GetLabel(17).index(1))</visible>
<label>Enter text here...</label>
<onclick></onclick>
</item>
<item>
<visible>!String.IsEmpty(Control.GetLabel(17).index(1))</visible>
<label>$INFO[Control.GetLabel(17).index(1)]</label>
<onclick></onclick>
</item>
</content>
</control>
<control type="edit" id="17">
<visible allowhiddenfocus="true">Control.HasFocus(17)</visible>
<ondown>Control.Move(1000,1)</ondown>
<ondown>SetFocus(1000)</ondown>
<onup>Control.Move(1000,-1)</onup>
<onup>SetFocus(1000)</onup>
<width>900</width>
<centerleft>50%</centerleft>
<top>405</top>
<height>90</height>
<font>List_Title_Focused</font>
<hinttext>Enter text here...</hinttext>
</control>
<include content="ButtonGroup">
<param name="button1id" value="20"/>
<param name="button2id" value="19"/>
<param name="button3id" value="18"/>
<param name="buttonsvisible" value="true"/>
</include>
</control>
</controls>
</window>