2007-09-17, 17:22
I'm trying to setup a music view which displays a panel of tiled album covers but I need to make adjust the width of the panel depending on whether or not there is a on playing (Player.HasAudio).
The code for the panel is as follows:
I tried putting a group control around the panel and then having a conditional zoom animation (staring with the width at 720 and then reducing it to 530 when the PLayer.HasAudio becomes true). This looked fine when there was no song playing but when there was it just squeezed the panel, making it look all squashed.
Is it possible to adjust the width of the panel (or the number of items displayed horizontally) based on the value of Player.HasAudio?
Thanks
The code for the panel is as follows:
Code:
<include name="SSAlbum2">
<control type="panel" id="51">
<viewtype label="Album">icon</viewtype>
<posx>2</posx>
<posy>139</posy>
<width>530</width>
<height>292</height>
<pagecontrol>-</pagecontrol>
<onleft>2</onleft>
<onright>2</onright>
<onup>51</onup>
<ondown>51</ondown>
<orientation>vertical</orientation>
<include>common-fade</include>
<visible>!Window.IsVisible(129)</visible>
<itemlayout width="77" height="92">
<control type="image">
<posx>21</posx>
<posy>17</posy>
<width>66</width>
<height>88</height>
<info>ListItem.Icon</info>
<aspectratio aligny="center">stretch</aspectratio>
<colordiffuse>e0FFFFFF</colordiffuse>
</control>
</itemlayout>
<focusedlayout width="83" height="103">
<control type="image">
<posx>14</posx>
<posy>7</posy>
<width>79</width>
<height>106</height>
<info>ListItem.Icon</info>
<aspectratio aligny="center">stretch</aspectratio>
<animation effect="zoom" start="21,17,66,88" end="14,7,79,106" time="100">Focus</animation>
</control>
</focusedlayout>
</control>
</include>
I tried putting a group control around the panel and then having a conditional zoom animation (staring with the width at 720 and then reducing it to 530 when the PLayer.HasAudio becomes true). This looked fine when there was no song playing but when there was it just squeezed the panel, making it look all squashed.
Is it possible to adjust the width of the panel (or the number of items displayed horizontally) based on the value of Player.HasAudio?
Thanks