2020-10-04, 18:36
Is there anyway to make a grouplist behave like a fixedlist, meaning the focused item is fixed in place and the items scroll not the focused position?
(2020-10-04, 18:36)roidy Wrote: Is there anyway to make a grouplist behave like a fixedlist, meaning the focused item is fixed in place and the items scroll not the focused position?
(2020-10-05, 17:22)roidy Wrote: Thanks, could you point me to the code you use in your skin.
That's what I'm trying to do at the moment, slide then whole grouplist based on which widget group has focus but I'm running in the problem of if one of the widget groups is empty and thus hidden is messes up the whole animation chain.
xml:
<animation effect="slide" end="0,-1080" time="380" condition="Integer.IsGreater(Container(65001).CurrentItem,0)" reversible="true" tween="sine" easing="out" >Conditional</animation>
<animation effect="slide" end="0,-710" time="380" condition="Control.IsVisible(50) + String.IsEqual(Control.GetLabel(502),Poster) + [Control.HasFocus(4500) | Control.HasFocus(4510) | Control.HasFocus(4520) | Control.HasFocus(4530) | Control.HasFocus(4540)]" reversible="true" tween="sine" easing="out" >Conditional</animation>
<animation effect="slide" end="0,-710" time="380" condition="Control.IsVisible(4500) + String.IsEqual(Control.GetLabel(45002),Poster) + [Control.HasFocus(4510) | Control.HasFocus(4520) | Control.HasFocus(4530) | Control.HasFocus(4540)]" reversible="true" tween="sine" easing="out" >Conditional</animation>
<animation effect="slide" end="0,-710" time="380" condition="Control.IsVisible(4510) + String.IsEqual(Control.GetLabel(45102),Poster) + [Control.HasFocus(4520) | Control.HasFocus(4530) | Control.HasFocus(4540)]" reversible="true" tween="sine" easing="out" >Conditional</animation>
<animation effect="slide" end="0,-710" time="380" condition="Control.IsVisible(4520) + String.IsEqual(Control.GetLabel(45202),Poster) + [Control.HasFocus(4530) | Control.HasFocus(4540)]" reversible="true" tween="sine" easing="out" >Conditional</animation>
<animation effect="slide" end="0,-710" time="380" condition="Control.IsVisible(4530) + String.IsEqual(Control.GetLabel(45302),Poster) + Control.HasFocus(4540)" reversible="true" tween="sine" easing="out" >Conditional</animation>
xml:<control type="grouplist" id="4000">
<!-- First position needs no slide -->
<animation effect="slide" end="0,-600" time="200" condition="Integer.IsGreater(Container(4000).Position,1)">Conditional</animation>
<animation effect="slide" end="0,-600" time="200" condition="Integer.IsGreater(Container(4000).Position,2)">Conditional</animation>
<animation effect="slide" end="0,-600" time="200" condition="Integer.IsGreater(Container(4000).Position,3)">Conditional</animation>
<!-- and so no.... -->
</control>
(2020-10-06, 18:30)roidy Wrote: Awesome, thanks for the explanation, that's a big help.Oh that would be a much more efficient way of doing it, haha.
I was thinking about it last night and I haven't tried it yet but the same effect could possibly be achieved using Container().Position
Perhaps like so, assuming a grouplist id of 4000 and each widget group is 600 pixels height, and the first group needs no scrolling as it's already at the top.
xml:<control type="grouplist" id="4000">
<!-- First position needs no slide -->
<animation effect="slide" end="0,-600" time="200" condition="Integer.IsGreater(Container(4000).Position,1)">Conditional</animation>
<animation effect="slide" end="0,-600" time="200" condition="Integer.IsGreater(Container(4000).Position,2)">Conditional</animation>
<animation effect="slide" end="0,-600" time="200" condition="Integer.IsGreater(Container(4000).Position,3)">Conditional</animation>
<!-- and so no.... -->
</control>
This way I don't need to track group id's and hidden widget groups work because it's based on the grouplist's position not which widget group has focus (I think).
I'll play around with both methods at the weekend and see what I can come up with. Again big thanks for the help.