Fade effect in a fixed grouplist?
#1
Hi, I am working on a skin and I have encountered a problem that I am not being able to solve. On my skin, I have a grouplist full of fixedlists that act as my widgets. In order to have the effect of fixed movement in horizontal, I have the focus  separated as a fixed image, and an animation "slide" in the whole grouplist, based on Container (id) .CurrentItem. So if the item in focus is the "2", the animation "slide" is activated with the necessary movement. My problem is that in such case, all the widgets move up, covering information and details. I managed to get it solved by giving each widget a special ID and comparing it with the " Container (id) .CurrentItem ", but the whole effect is broken the moment one of the widgets disappears when there is no content, if a widget I give as ID" 4 ", but widget 2 is without content and disappears. I have also thought about covering them by placing an image above, but I really do not like that option because of the visual style that I prefer, I would much rather have a controlled fade effect, instead of simply disappearing.
Is there a way to give them an ID based on the position they are in, ignoring the widgets without content? Or maybe some other way to detect if a widget has gone to x point?
Reply
#2
Move the code for the 'information and details' below the grouplist so it appears over it not under.
Reply
#3
(2019-07-04, 07:27)Hitcher Wrote: Move the code for the 'information and details' below the grouplist so it appears over it not under.

Yes, but as I said, I do not want the widgets to disappear when they reach an edge, it really does not look good, and that's why I'm looking for them to have a fade animation.
Reply
#4
I deal with this kind of skin hacks in my skin a lot so maybe I can help, but I do not understand your issue exactly and a code snippet will help as well.
Reply
#5
(2019-07-04, 13:03)cartman.dos Wrote: I deal with this kind of skin hacks in my skin a lot so maybe I can help, but I do not understand your issue exactly and a code snippet will help as well.

Yes, I have seen your skin and I have studied a bit of your code, although curiously your skin has never worked properly with me, there is always an error in the animation or movement. Maybe my way of doing it will help you with that, and maybe your way of doing it will help my XD
xml:
 <control type="grouplist" id="2100">
                <top>600</top>
                <height>4000</height>
                <preloaditems>2</preloaditems>
                <ondown>noop</ondown>
                <include>WidgetGroupListCommon</include>
                <scrolltime tween="cubic" easing="out">900</scrolltime>
                <animation effect="slide" end="0,0" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,1)]">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,2)]">Conditional</animation>
                <animation effect="slide" end="0,-620" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,3)]">Conditional</animation>
                <animation effect="slide" end="0,-930" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,4)]">Conditional</animation>
                <animation effect="slide" end="0,-1235" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,5)]">Conditional</animation>
                <animation effect="slide" end="0,-1545" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,6)]">Conditional</animation>
                <animation effect="slide" end="0,-1850" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,7)]">Conditional</animation>
                <animation effect="slide" end="0,-2160" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,8)]">Conditional</animation>
                <animation effect="slide" end="0,-2470" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,9)]">Conditional</animation>
                <pagecontrol>2010</pagecontrol>
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="special://skin/playlists/recommended_movies.xsp"/>
                            <param name="widget_header" value="Recommended"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="list_id" value="1"/>
                            <param name="visible_widget" value="1"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="special://skin/playlists/inprogress_tvshows.xsp"/>
                            <param name="sortby" value="lastplayed"/>
                            <param name="sortorder" value="descending"/>
                            <param name="widget_header" value="In progress"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="list_id" value="2"/>
                            <param name="visible_widget" value="2"/>
                        </include>
                        
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="videodb://tvshows/titles/"/>
                            <param name="widget_header" value="news"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="sortby" value="year"/>
                            <param name="sortorder" value="descending"/>
                            <param name="list_id" value="4"/>
                            <param name="visible_widget" value="4"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="special://skin/playlists/adventure_tvshows.xsp"/>
                            <param name="widget_header" value="adventure"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="list_id" value="5"/>
                            <param name="visible_widget" value="5"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(movies)">
                            <param name="content_path" value="special://skin/playlists/unwatched_movies.xsp"/>
                            <param name="widget_header" value="Unwatched movies"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="list_id" value="6"/>
                            <param name="visible_widget" value="6"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="videodb://tvshows/titles/"/>
                            <param name="widget_header" value="Tv Shows"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="all"/>
                            <param name="sortby" value="title"/>
                            <param name="list_id" value="7"/>
                            <param name="visible_widget" value="7"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(movies)">
                            <param name="content_path" value="videodb://movies/titles/"/>
                            <param name="widget_header" value="Movies"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="all"/>
                            <param name="sortby" value="title"/>
                            <param name="list_id" value="8"/>
                            <param name="visible_widget" value="8"/>
                        </include>
            </control>
That is the code that I use for my widgets in "home", as you can see it uses an animation that moves the whole grouplist to simulate the fixed movement, and I manually write the widgets I want, which are now simply test. "visible_widget" is the ID that I give to each widget to inform the skin of what order they are in, and thus interact with the fixed list.
xml:
<include name="WidgetListThumb">
        <definition>
            <include content="CategoryLabel">
                <param name="label">$PARAM[widget_header]</param>
                <param name="list_id" value="$PARAM[list_id]"/>
                <param name="visible" value="$PARAM[visible_widget]"/>
            </include>
            <control type="fixedlist" id="$PARAM[list_id]">
                <left>0</left>
                <top>0</top>
                <animation effect="fade" start="100" end="0" time="200" reversible="true" condition="[Integer.IsGreater(Container(2100).CurrentItem,$PARAM[visible_widget])]">Conditional</animation>
                <visible>Integer.IsGreater(Container($PARAM[list_id]).NumItems,0) | Container($PARAM[list_id]).IsUpdating</visible>
                <onleft>ActivateWindow(1110)</onleft>

                <height>230</height>
                <movement>0</movement>
                <preloaditems>2</preloaditems>
                <orientation>horizontal</orientation>
                <scrolltime tween="cubic" easing="out">500</scrolltime>
And that is basically the structure of the fixedlist, where you can see the animation that makes them disappear, which is what gives me problems.
At the moment, I can only think of 3 solutions. One of them is to find a method of giving each widget an ID in relation to its position, ignoring those that do not have content, maybe it can do that with a series of variables and some human sacrifice. Another is to find some other way to activate the animation that does not require having IDs, in which case you would have to discover a method for the skin to detect which widgets you have passed. And the last option is to keep the empty widgets visible and perhaps decorate it a bit, although the ideal would be to make them "disappear" and show the other widgets.
The worst thing is to see that you are so close to solving it, but at the same time ...
Reply
#6
(2019-07-04, 14:15)BiudreuN Wrote:
(2019-07-04, 13:03)cartman.dos Wrote: I deal with this kind of skin hacks in my skin a lot so maybe I can help, but I do not understand your issue exactly and a code snippet will help as well.

Yes, I have seen your skin and I have studied a bit of your code, although curiously your skin has never worked properly with me, there is always an error in the animation or movement. Maybe my way of doing it will help you with that, and maybe your way of doing it will help my XD
xml:
 <control type="grouplist" id="2100">
                <top>600</top>
                <height>4000</height>
                <preloaditems>2</preloaditems>
                <ondown>noop</ondown>
                <include>WidgetGroupListCommon</include>
                <scrolltime tween="cubic" easing="out">900</scrolltime>
                <animation effect="slide" end="0,0" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,1)]">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,2)]">Conditional</animation>
                <animation effect="slide" end="0,-620" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,3)]">Conditional</animation>
                <animation effect="slide" end="0,-930" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,4)]">Conditional</animation>
                <animation effect="slide" end="0,-1235" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,5)]">Conditional</animation>
                <animation effect="slide" end="0,-1545" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,6)]">Conditional</animation>
                <animation effect="slide" end="0,-1850" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,7)]">Conditional</animation>
                <animation effect="slide" end="0,-2160" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,8)]">Conditional</animation>
                <animation effect="slide" end="0,-2470" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,9)]">Conditional</animation>
                <pagecontrol>2010</pagecontrol>
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="special://skin/playlists/recommended_movies.xsp"/>
                            <param name="widget_header" value="Recommended"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="list_id" value="1"/>
                            <param name="visible_widget" value="1"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="special://skin/playlists/inprogress_tvshows.xsp"/>
                            <param name="sortby" value="lastplayed"/>
                            <param name="sortorder" value="descending"/>
                            <param name="widget_header" value="In progress"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="list_id" value="2"/>
                            <param name="visible_widget" value="2"/>
                        </include>
                        
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="videodb://tvshows/titles/"/>
                            <param name="widget_header" value="news"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="sortby" value="year"/>
                            <param name="sortorder" value="descending"/>
                            <param name="list_id" value="4"/>
                            <param name="visible_widget" value="4"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="special://skin/playlists/adventure_tvshows.xsp"/>
                            <param name="widget_header" value="adventure"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="list_id" value="5"/>
                            <param name="visible_widget" value="5"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(movies)">
                            <param name="content_path" value="special://skin/playlists/unwatched_movies.xsp"/>
                            <param name="widget_header" value="Unwatched movies"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="list_id" value="6"/>
                            <param name="visible_widget" value="6"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="videodb://tvshows/titles/"/>
                            <param name="widget_header" value="Tv Shows"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="all"/>
                            <param name="sortby" value="title"/>
                            <param name="list_id" value="7"/>
                            <param name="visible_widget" value="7"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(movies)">
                            <param name="content_path" value="videodb://movies/titles/"/>
                            <param name="widget_header" value="Movies"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="all"/>
                            <param name="sortby" value="title"/>
                            <param name="list_id" value="8"/>
                            <param name="visible_widget" value="8"/>
                        </include>
            </control>
That is the code that I use for my widgets in "home", as you can see it uses an animation that moves the whole grouplist to simulate the fixed movement, and I manually write the widgets I want, which are now simply test. "visible_widget" is the ID that I give to each widget to inform the skin of what order they are in, and thus interact with the fixed list.
xml:
<include name="WidgetListThumb">
        <definition>
            <include content="CategoryLabel">
                <param name="label">$PARAM[widget_header]</param>
                <param name="list_id" value="$PARAM[list_id]"/>
                <param name="visible" value="$PARAM[visible_widget]"/>
            </include>
            <control type="fixedlist" id="$PARAM[list_id]">
                <left>0</left>
                <top>0</top>
                <animation effect="fade" start="100" end="0" time="200" reversible="true" condition="[Integer.IsGreater(Container(2100).CurrentItem,$PARAM[visible_widget])]">Conditional</animation>
                <visible>Integer.IsGreater(Container($PARAM[list_id]).NumItems,0) | Container($PARAM[list_id]).IsUpdating</visible>
                <onleft>ActivateWindow(1110)</onleft>

                <height>230</height>
                <movement>0</movement>
                <preloaditems>2</preloaditems>
                <orientation>horizontal</orientation>
                <scrolltime tween="cubic" easing="out">500</scrolltime>
And that is basically the structure of the fixedlist, where you can see the animation that makes them disappear, which is what gives me problems.
At the moment, I can only think of 3 solutions. One of them is to find a method of giving each widget an ID in relation to its position, ignoring those that do not have content, maybe it can do that with a series of variables and some human sacrifice. Another is to find some other way to activate the animation that does not require having IDs, in which case you would have to discover a method for the skin to detect which widgets you have passed. And the last option is to keep the empty widgets visible and perhaps decorate it a bit, although the ideal would be to make them "disappear" and show the other widgets.
The worst thing is to see that you are so close to solving it, but at the same time ... 
Assuming you're leaving the exact same code, and I understand that your widget ids are 1,...,8.
Try this:
Code:

<animation effect="fade" start="100" end="0" time="200" reversible="true" condition="[Integer.IsGreater(System.CurrentControlID,$PARAM[visible_widget])]">Conditional</animation>
But consider that even if it works one of these widget containers must have focus the all time this window is visible, otherwise it all goes down the drain.
You can transition the currentitem to container.position (doesn't rely on current focus), but then you'd need another solution for system.currentcontrolid.
Reply
#7
(2019-07-04, 21:43)cartman.dos Wrote:
(2019-07-04, 14:15)BiudreuN Wrote:
(2019-07-04, 13:03)cartman.dos Wrote: I deal with this kind of skin hacks in my skin a lot so maybe I can help, but I do not understand your issue exactly and a code snippet will help as well.

Yes, I have seen your skin and I have studied a bit of your code, although curiously your skin has never worked properly with me, there is always an error in the animation or movement. Maybe my way of doing it will help you with that, and maybe your way of doing it will help my XD
xml:
 <control type="grouplist" id="2100">
                <top>600</top>
                <height>4000</height>
                <preloaditems>2</preloaditems>
                <ondown>noop</ondown>
                <include>WidgetGroupListCommon</include>
                <scrolltime tween="cubic" easing="out">900</scrolltime>
                <animation effect="slide" end="0,0" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,1)]">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,2)]">Conditional</animation>
                <animation effect="slide" end="0,-620" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,3)]">Conditional</animation>
                <animation effect="slide" end="0,-930" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,4)]">Conditional</animation>
                <animation effect="slide" end="0,-1235" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,5)]">Conditional</animation>
                <animation effect="slide" end="0,-1545" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,6)]">Conditional</animation>
                <animation effect="slide" end="0,-1850" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,7)]">Conditional</animation>
                <animation effect="slide" end="0,-2160" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,8)]">Conditional</animation>
                <animation effect="slide" end="0,-2470" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,9)]">Conditional</animation>
                <pagecontrol>2010</pagecontrol>
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="special://skin/playlists/recommended_movies.xsp"/>
                            <param name="widget_header" value="Recommended"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="list_id" value="1"/>
                            <param name="visible_widget" value="1"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="special://skin/playlists/inprogress_tvshows.xsp"/>
                            <param name="sortby" value="lastplayed"/>
                            <param name="sortorder" value="descending"/>
                            <param name="widget_header" value="In progress"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="list_id" value="2"/>
                            <param name="visible_widget" value="2"/>
                        </include>
                        
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="videodb://tvshows/titles/"/>
                            <param name="widget_header" value="news"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="sortby" value="year"/>
                            <param name="sortorder" value="descending"/>
                            <param name="list_id" value="4"/>
                            <param name="visible_widget" value="4"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="special://skin/playlists/adventure_tvshows.xsp"/>
                            <param name="widget_header" value="adventure"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="list_id" value="5"/>
                            <param name="visible_widget" value="5"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(movies)">
                            <param name="content_path" value="special://skin/playlists/unwatched_movies.xsp"/>
                            <param name="widget_header" value="Unwatched movies"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="list_id" value="6"/>
                            <param name="visible_widget" value="6"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="videodb://tvshows/titles/"/>
                            <param name="widget_header" value="Tv Shows"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="all"/>
                            <param name="sortby" value="title"/>
                            <param name="list_id" value="7"/>
                            <param name="visible_widget" value="7"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(movies)">
                            <param name="content_path" value="videodb://movies/titles/"/>
                            <param name="widget_header" value="Movies"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="all"/>
                            <param name="sortby" value="title"/>
                            <param name="list_id" value="8"/>
                            <param name="visible_widget" value="8"/>
                        </include>
            </control>
That is the code that I use for my widgets in "home", as you can see it uses an animation that moves the whole grouplist to simulate the fixed movement, and I manually write the widgets I want, which are now simply test. "visible_widget" is the ID that I give to each widget to inform the skin of what order they are in, and thus interact with the fixed list.
xml:
<include name="WidgetListThumb">
        <definition>
            <include content="CategoryLabel">
                <param name="label">$PARAM[widget_header]</param>
                <param name="list_id" value="$PARAM[list_id]"/>
                <param name="visible" value="$PARAM[visible_widget]"/>
            </include>
            <control type="fixedlist" id="$PARAM[list_id]">
                <left>0</left>
                <top>0</top>
                <animation effect="fade" start="100" end="0" time="200" reversible="true" condition="[Integer.IsGreater(Container(2100).CurrentItem,$PARAM[visible_widget])]">Conditional</animation>
                <visible>Integer.IsGreater(Container($PARAM[list_id]).NumItems,0) | Container($PARAM[list_id]).IsUpdating</visible>
                <onleft>ActivateWindow(1110)</onleft>

                <height>230</height>
                <movement>0</movement>
                <preloaditems>2</preloaditems>
                <orientation>horizontal</orientation>
                <scrolltime tween="cubic" easing="out">500</scrolltime>
And that is basically the structure of the fixedlist, where you can see the animation that makes them disappear, which is what gives me problems.
At the moment, I can only think of 3 solutions. One of them is to find a method of giving each widget an ID in relation to its position, ignoring those that do not have content, maybe it can do that with a series of variables and some human sacrifice. Another is to find some other way to activate the animation that does not require having IDs, in which case you would have to discover a method for the skin to detect which widgets you have passed. And the last option is to keep the empty widgets visible and perhaps decorate it a bit, although the ideal would be to make them "disappear" and show the other widgets.
The worst thing is to see that you are so close to solving it, but at the same time ...  
Assuming you're leaving the exact same code, and I understand that your widget ids are 1,...,8.
Try this:
Code:

<animation effect="fade" start="100" end="0" time="200" reversible="true" condition="[Integer.IsGreater(System.CurrentControlID,$PARAM[visible_widget])]">Conditional</animation>
But consider that even if it works one of these widget containers must have focus the all time this window is visible, otherwise it all goes down the drain.
You can transition the currentitem to container.position (doesn't rely on current focus), but then you'd need another solution for system.currentcontrolid. 
Thank you! It works wonderfully, I did not know that InfoLabel, it was just what I was looking for. Now I just have to find the way that does not disappear by activating the dialog that I have as a menu. In which case, it is much preferable that they disappear when you open the menu, to cover the entire screen just move and break when a single widget disappears. Let's see if something happens to me these days.
Reply
#8
(2019-07-05, 00:20)BiudreuN Wrote:
(2019-07-04, 21:43)cartman.dos Wrote:
(2019-07-04, 14:15)BiudreuN Wrote: Yes, I have seen your skin and I have studied a bit of your code, although curiously your skin has never worked properly with me, there is always an error in the animation or movement. Maybe my way of doing it will help you with that, and maybe your way of doing it will help my XD
xml:
 <control type="grouplist" id="2100">
                <top>600</top>
                <height>4000</height>
                <preloaditems>2</preloaditems>
                <ondown>noop</ondown>
                <include>WidgetGroupListCommon</include>
                <scrolltime tween="cubic" easing="out">900</scrolltime>
                <animation effect="slide" end="0,0" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,1)]">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,2)]">Conditional</animation>
                <animation effect="slide" end="0,-620" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,3)]">Conditional</animation>
                <animation effect="slide" end="0,-930" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,4)]">Conditional</animation>
                <animation effect="slide" end="0,-1235" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,5)]">Conditional</animation>
                <animation effect="slide" end="0,-1545" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,6)]">Conditional</animation>
                <animation effect="slide" end="0,-1850" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,7)]">Conditional</animation>
                <animation effect="slide" end="0,-2160" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,8)]">Conditional</animation>
                <animation effect="slide" end="0,-2470" time="200" reversible="true" condition="[Integer.IsEqual(Container(2100).CurrentItem,9)]">Conditional</animation>
                <pagecontrol>2010</pagecontrol>
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="special://skin/playlists/recommended_movies.xsp"/>
                            <param name="widget_header" value="Recommended"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="list_id" value="1"/>
                            <param name="visible_widget" value="1"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="special://skin/playlists/inprogress_tvshows.xsp"/>
                            <param name="sortby" value="lastplayed"/>
                            <param name="sortorder" value="descending"/>
                            <param name="widget_header" value="In progress"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="list_id" value="2"/>
                            <param name="visible_widget" value="2"/>
                        </include>
                        
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="videodb://tvshows/titles/"/>
                            <param name="widget_header" value="news"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="sortby" value="year"/>
                            <param name="sortorder" value="descending"/>
                            <param name="list_id" value="4"/>
                            <param name="visible_widget" value="4"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="special://skin/playlists/adventure_tvshows.xsp"/>
                            <param name="widget_header" value="adventure"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="list_id" value="5"/>
                            <param name="visible_widget" value="5"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(movies)">
                            <param name="content_path" value="special://skin/playlists/unwatched_movies.xsp"/>
                            <param name="widget_header" value="Unwatched movies"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="30"/>
                            <param name="list_id" value="6"/>
                            <param name="visible_widget" value="6"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(tvshows)">
                            <param name="content_path" value="videodb://tvshows/titles/"/>
                            <param name="widget_header" value="Tv Shows"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="all"/>
                            <param name="sortby" value="title"/>
                            <param name="list_id" value="7"/>
                            <param name="visible_widget" value="7"/>
                        </include>
                        <include content="WidgetListThumb" condition="Library.HasContent(movies)">
                            <param name="content_path" value="videodb://movies/titles/"/>
                            <param name="widget_header" value="Movies"/>
                            <param name="widget_target" value="videos"/>
                            <param name="widget_limit" value="all"/>
                            <param name="sortby" value="title"/>
                            <param name="list_id" value="8"/>
                            <param name="visible_widget" value="8"/>
                        </include>
            </control>
That is the code that I use for my widgets in "home", as you can see it uses an animation that moves the whole grouplist to simulate the fixed movement, and I manually write the widgets I want, which are now simply test. "visible_widget" is the ID that I give to each widget to inform the skin of what order they are in, and thus interact with the fixed list.
xml:
<include name="WidgetListThumb">
        <definition>
            <include content="CategoryLabel">
                <param name="label">$PARAM[widget_header]</param>
                <param name="list_id" value="$PARAM[list_id]"/>
                <param name="visible" value="$PARAM[visible_widget]"/>
            </include>
            <control type="fixedlist" id="$PARAM[list_id]">
                <left>0</left>
                <top>0</top>
                <animation effect="fade" start="100" end="0" time="200" reversible="true" condition="[Integer.IsGreater(Container(2100).CurrentItem,$PARAM[visible_widget])]">Conditional</animation>
                <visible>Integer.IsGreater(Container($PARAM[list_id]).NumItems,0) | Container($PARAM[list_id]).IsUpdating</visible>
                <onleft>ActivateWindow(1110)</onleft>

                <height>230</height>
                <movement>0</movement>
                <preloaditems>2</preloaditems>
                <orientation>horizontal</orientation>
                <scrolltime tween="cubic" easing="out">500</scrolltime>
And that is basically the structure of the fixedlist, where you can see the animation that makes them disappear, which is what gives me problems.
At the moment, I can only think of 3 solutions. One of them is to find a method of giving each widget an ID in relation to its position, ignoring those that do not have content, maybe it can do that with a series of variables and some human sacrifice. Another is to find some other way to activate the animation that does not require having IDs, in which case you would have to discover a method for the skin to detect which widgets you have passed. And the last option is to keep the empty widgets visible and perhaps decorate it a bit, although the ideal would be to make them "disappear" and show the other widgets.
The worst thing is to see that you are so close to solving it, but at the same time ...  
Assuming you're leaving the exact same code, and I understand that your widget ids are 1,...,8.
Try this:
Code:

<animation effect="fade" start="100" end="0" time="200" reversible="true" condition="[Integer.IsGreater(System.CurrentControlID,$PARAM[visible_widget])]">Conditional</animation>
But consider that even if it works one of these widget containers must have focus the all time this window is visible, otherwise it all goes down the drain.
You can transition the currentitem to container.position (doesn't rely on current focus), but then you'd need another solution for system.currentcontrolid. 
Thank you! It works wonderfully, I did not know that InfoLabel, it was just what I was looking for. Now I just have to find the way that does not disappear by activating the dialog that I have as a menu. In which case, it is much preferable that they disappear when you open the menu, to cover the entire screen just move and break when a single widget disappears. Let's see if something happens to me these days.

Sure, glad to hear it worked. Now try transitioning to container.position instead of current item and about system.controlcurrentid you could leave that if control group of widgets has focus and also set property on focus in each widget container so it holds the current id/widget number so that you could use that to compare as fallback, this will be more stable.
Can write the code later if u want I'm writing from the phone so it's less convenient.
Reply
#9
(2019-07-05, 01:08)cartman.dos Wrote:
(2019-07-05, 00:20)BiudreuN Wrote:
(2019-07-04, 21:43)cartman.dos Wrote: Assuming you're leaving the exact same code, and I understand that your widget ids are 1,...,8.
Try this:
Code:

<animation effect="fade" start="100" end="0" time="200" reversible="true" condition="[Integer.IsGreater(System.CurrentControlID,$PARAM[visible_widget])]">Conditional</animation>
But consider that even if it works one of these widget containers must have focus the all time this window is visible, otherwise it all goes down the drain.
You can transition the currentitem to container.position (doesn't rely on current focus), but then you'd need another solution for system.currentcontrolid. 
Thank you! It works wonderfully, I did not know that InfoLabel, it was just what I was looking for. Now I just have to find the way that does not disappear by activating the dialog that I have as a menu. In which case, it is much preferable that they disappear when you open the menu, to cover the entire screen just move and break when a single widget disappears. Let's see if something happens to me these days.    

Sure, glad to hear it worked. Now try transitioning to container.position instead of current item and about system.controlcurrentid you could leave that if control group of widgets has focus and also set property on focus in each widget container so it holds the current id/widget number so that you could use that to compare as fallback, this will be more stable.
Can write the code later if u want I'm writing from the phone so it's less convenient.    
I find the use of "current item" more stable, since before I used "container.position" and it also count the title of the widget, and considering that I have thought of adding a scrollbar to the widgets, it would crash a little. With "current item" it gives me the exact item. Right now I have system.controlid comparing with the ID of the widgets, which I have placed them from lowest to highest number, and in that section it works very well, since in the menu are only the widgets. The problem appears when I open the dialog that acts as my menu (I have it that way since it keeps the wallpaper, description, etc ... of the content I had focused on) that makes them disappear. I was thinking about solutions, maybe when the menu is opened, as there will be no scrolling, at that moment it generates the opaque background that covers the rest of the widgets, or maybe I change the ID of the grouplist that I use for the menu buttons.
It's funny how a problem has been solved, creating a completely different one.
But I'm curious, how do you solve the issue of animations and the fade effect? Please, don't say voodoo.
Reply
#10
(2019-07-05, 03:05)BiudreuN Wrote:
(2019-07-05, 01:08)cartman.dos Wrote:
(2019-07-05, 00:20)BiudreuN Wrote: Thank you! It works wonderfully, I did not know that InfoLabel, it was just what I was looking for. Now I just have to find the way that does not disappear by activating the dialog that I have as a menu. In which case, it is much preferable that they disappear when you open the menu, to cover the entire screen just move and break when a single widget disappears. Let's see if something happens to me these days.    

Sure, glad to hear it worked. Now try transitioning to container.position instead of current item and about system.controlcurrentid you could leave that if control group of widgets has focus and also set property on focus in each widget container so it holds the current id/widget number so that you could use that to compare as fallback, this will be more stable.
Can write the code later if u want I'm writing from the phone so it's less convenient.        
I find the use of "current item" more stable, since before I used "container.position" and it also count the title of the widget, and considering that I have thought of adding a scrollbar to the widgets, it would crash a little. With "current item" it gives me the exact item. Right now I have system.controlid comparing with the ID of the widgets, which I have placed them from lowest to highest number, and in that section it works very well, since in the menu are only the widgets. The problem appears when I open the dialog that acts as my menu (I have it that way since it keeps the wallpaper, description, etc ... of the content I had focused on) that makes them disappear. I was thinking about solutions, maybe when the menu is opened, as there will be no scrolling, at that moment it generates the opaque background that covers the rest of the widgets, or maybe I change the ID of the grouplist that I use for the menu buttons.
It's funny how a problem has been solved, creating a completely different one.
But I'm curious, how do you solve the issue of animations and the fade effect? Please, don't say voodoo.    
Look maybe it's me having a brain-fart here but I'm having trouble understanding what's the new problem.
Quote:The problem appears when I open the dialog that acts as my menu that makes them disappear (?)
So I'm not clear on that one exactly. But my understanding is that losing focus on the widgets, since it is now on the dialog items, kills the fixed/fade animations?

A few things:
1) Having a menu as a dialog is very interesting, I'd very much like to see how that works. I have a huge issue with this one which I solved by doing bunch of ugly 'hacks'. I tried the path of menu as dialog but had focus issues and maybe gave up on the idea too soon.

2) If the issue is what I wrote above, then a fix could be to use container.position and a window prop as I suggested, because if your issue is losing focus on widgets, this cannot be bypassed as long as you're using currentitem.
I also have a top label and widget, so this counts as 2 items.
What you need to do is use container.position by jumps of 2.
If you want to add a scrollbar you can still do it and just place it OUTSIDE of the widgets' grouplist. The gui knows which one to control using the <pagecontrol> tag and scroll bar with a corresponding id.
Then, assuming your widgets' grouplist holds items structured by label+container, then you could use this code instead of the current item one:
xml:

<animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,2)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,4)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,6)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,8)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,10)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,12)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,14)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,16)">Conditional</animation>
I'm having it so that each animation adds up, but it can be done as a total and just using one, in this case I don't think it matters that much I just find this way cleaner.

Inside each widget set property for current widget num:
xml:

<control type="fixedlist" id="$PARAM[list_id]">
    ...
    <onfocus>SetProperty(CurrentVisibleWidget,$PARAM[visible_widget],Home)</onfocus>
    ...
</control>

Then use as fallback check in the fade animation:
xml:

<animation effect="fade" start="100" end="0" time="200" reversible="true" condition="[ControlGroup(2100).HasFocus() + Integer.IsGreater(System.CurrentControlID,$PARAM[visible_widget])] | Integer.IsGreater(Window(Home).Property(CurrentVisibleWidget),$PARAM[visible_widget])">Conditional</animation>
So whenever first condition is not satisfied then it fallback to window property which is saved regardless of focus/window.

3)
Quote:But I'm curious, how do you solve the issue of animations and the fade effect? Please, don't say voodoo.
If you meant do you solve=did you solve, then voodoo yeah. Otherwise my brain just farted again Undecided
Reply
#11
(2019-07-05, 15:02)cartman.dos Wrote:
(2019-07-05, 03:05)BiudreuN Wrote:
(2019-07-05, 01:08)cartman.dos Wrote: Sure, glad to hear it worked. Now try transitioning to container.position instead of current item and about system.controlcurrentid you could leave that if control group of widgets has focus and also set property on focus in each widget container so it holds the current id/widget number so that you could use that to compare as fallback, this will be more stable.
Can write the code later if u want I'm writing from the phone so it's less convenient.        
I find the use of "current item" more stable, since before I used "container.position" and it also count the title of the widget, and considering that I have thought of adding a scrollbar to the widgets, it would crash a little. With "current item" it gives me the exact item. Right now I have system.controlid comparing with the ID of the widgets, which I have placed them from lowest to highest number, and in that section it works very well, since in the menu are only the widgets. The problem appears when I open the dialog that acts as my menu (I have it that way since it keeps the wallpaper, description, etc ... of the content I had focused on) that makes them disappear. I was thinking about solutions, maybe when the menu is opened, as there will be no scrolling, at that moment it generates the opaque background that covers the rest of the widgets, or maybe I change the ID of the grouplist that I use for the menu buttons.
It's funny how a problem has been solved, creating a completely different one.
But I'm curious, how do you solve the issue of animations and the fade effect? Please, don't say voodoo.     
Look maybe it's me having a brain-fart here but I'm having trouble understanding what's the new problem.
Quote:The problem appears when I open the dialog that acts as my menu that makes them disappear (?)
So I'm not clear on that one exactly. But my understanding is that losing focus on the widgets, since it is now on the dialog items, kills the fixed/fade animations?

A few things:
1) Having a menu as a dialog is very interesting, I'd very much like to see how that works. I have a huge issue with this one which I solved by doing bunch of ugly 'hacks'. I tried the path of menu as dialog but had focus issues and maybe gave up on the idea too soon.

2) If the issue is what I wrote above, then a fix could be to use container.position and a window prop as I suggested, because if your issue is losing focus on widgets, this cannot be bypassed as long as you're using currentitem.
I also have a top label and widget, so this counts as 2 items.
What you need to do is use container.position by jumps of 2.
If you want to add a scrollbar you can still do it and just place it OUTSIDE of the widgets' grouplist. The gui knows which one to control using the <pagecontrol> tag and scroll bar with a corresponding id.
Then, assuming your widgets' grouplist holds items structured by label+container, then you could use this code instead of the current item one:
xml:

<animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,2)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,4)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,6)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,8)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,10)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,12)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,14)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,16)">Conditional</animation>
I'm having it so that each animation adds up, but it can be done as a total and just using one, in this case I don't think it matters that much I just find this way cleaner.

Inside each widget set property for current widget num:
xml:

<control type="fixedlist" id="$PARAM[list_id]">
    ...
    <onfocus>SetProperty(CurrentVisibleWidget,$PARAM[visible_widget],Home)</onfocus>
    ...
</control>

Then use as fallback check in the fade animation:
xml:

<animation effect="fade" start="100" end="0" time="200" reversible="true" condition="[ControlGroup(2100).HasFocus() + Integer.IsGreater(System.CurrentControlID,$PARAM[visible_widget])] | Integer.IsGreater(Window(Home).Property(CurrentVisibleWidget),$PARAM[visible_widget])">Conditional</animation>
So whenever first condition is not satisfied then it fallback to window property which is saved regardless of focus/window.

3)
Quote:But I'm curious, how do you solve the issue of animations and the fade effect? Please, don't say voodoo.
If you meant do you solve=did you solve, then voodoo yeah. Otherwise my brain just farted again Undecided 
Yes, I'm sorry if I've made some grammatical error, I'm Spanish and I was pretty tired XD
And it is an interesting idea that you propose, I will try it in a moment. Meanwhile I have been fiddling with an idea that occurred to me:
Since the movement and fade animation are fixed, and only give problems when they lose the focus (As can happen when activating the powermenu or my dialog window that acts as a menu), I have created a second layer over the widgets, a replica from the bottom, which makes the remaining pieces disappear, because when I activate the menu window I do not need them to move. It does not spoil the animation. The only problem right now is to find the mode that fits well with the fade animation and does not have a "flicker". At the moment I have this "<visible> System.HasVisibleModalDialog </ visible>", but I'll be doing tests, I have to test your idea too. The use of "set property" is beyond my understanding, I have found very little information about it and I would love to study it more, because it will be of much use for the menu later on.
Regarding the use of the dialog, I thought of trying to maintain the image and data of the film, but without having to have it focused. Not taking a method and everything I found was too complicated for something so simple, I decided to take the easy route and create a personalized dialog that would act as a menu. Simply active, I have a "slide" animation to appear, and that's it.
Another problem that I am having is that having one fanart on another, even with the "diffuse", according to that fanart you notice a small black cut. It is not annoying in itself, but I have to see how I can improve that.
And look, that's the code that activates the menu, it's in the grouplist of the widgets:
xml:
<control type="fixedlist" id="$PARAM[list_id]">
                <left>0</left>
                <top>0</top>
                <animation effect="fade" start="100" end="0" time="200" reversible="true" condition="[Integer.IsGreater(System.CurrentControlID,$PARAM[list_id])]">Conditional</animation>
                <visible>Integer.IsGreater(Container($PARAM[list_id]).NumItems,0) | Container($PARAM[list_id]).IsUpdating</visible>
                <onleft>ActivateWindow(1110)</onleft>
                <height>230</height>
                <movement>0</movement>
                <preloaditems>2</preloaditems>
                <orientation>horizontal</orientation>
                <scrolltime tween="cubic" easing="out">500</scrolltime>
I warn you, do not put an "onback" because then it will not let you access anything in the menu, but if you want to be activated with an "onback", it is better that you do this:
<previouswindow>1110</previouswindow> putting the ID of the menu that you have created, at the beginning of "home" or from where you want to activate the menu.
And then I simply create an animation for the window, and it works wonderfully, without lag, without errors, and keeps the background and the previous info, as if I did not lose focus.
xml:
<animation type="WindowOpen" reversible="true">
        <effect type="slide" start="0" end="500" time="500" tween="cubic" easing="out" />
        <effect type="fade" start="0" end="100" time="200" tween="cubic" easing="out" />
    </animation>
    <animation type="WindowClose" reversible="true">
        <effect type="slide" start="500" end="0" time="500" tween="cubic" easing="out" />
        <effect type="fade" start="100" end="0" delay="200" time="500" tween="cubic" easing="out" />
    </animation>
Reply
#12
(2019-07-05, 16:19)BiudreuN Wrote:
(2019-07-05, 15:02)cartman.dos Wrote:
(2019-07-05, 03:05)BiudreuN Wrote: I find the use of "current item" more stable, since before I used "container.position" and it also count the title of the widget, and considering that I have thought of adding a scrollbar to the widgets, it would crash a little. With "current item" it gives me the exact item. Right now I have system.controlid comparing with the ID of the widgets, which I have placed them from lowest to highest number, and in that section it works very well, since in the menu are only the widgets. The problem appears when I open the dialog that acts as my menu (I have it that way since it keeps the wallpaper, description, etc ... of the content I had focused on) that makes them disappear. I was thinking about solutions, maybe when the menu is opened, as there will be no scrolling, at that moment it generates the opaque background that covers the rest of the widgets, or maybe I change the ID of the grouplist that I use for the menu buttons.
It's funny how a problem has been solved, creating a completely different one.
But I'm curious, how do you solve the issue of animations and the fade effect? Please, don't say voodoo.     
Look maybe it's me having a brain-fart here but I'm having trouble understanding what's the new problem.
Quote:The problem appears when I open the dialog that acts as my menu that makes them disappear (?)
So I'm not clear on that one exactly. But my understanding is that losing focus on the widgets, since it is now on the dialog items, kills the fixed/fade animations?

A few things:
1) Having a menu as a dialog is very interesting, I'd very much like to see how that works. I have a huge issue with this one which I solved by doing bunch of ugly 'hacks'. I tried the path of menu as dialog but had focus issues and maybe gave up on the idea too soon.

2) If the issue is what I wrote above, then a fix could be to use container.position and a window prop as I suggested, because if your issue is losing focus on widgets, this cannot be bypassed as long as you're using currentitem.
I also have a top label and widget, so this counts as 2 items.
What you need to do is use container.position by jumps of 2.
If you want to add a scrollbar you can still do it and just place it OUTSIDE of the widgets' grouplist. The gui knows which one to control using the <pagecontrol> tag and scroll bar with a corresponding id.
Then, assuming your widgets' grouplist holds items structured by label+container, then you could use this code instead of the current item one:
xml:

<animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,2)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,4)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,6)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,8)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,10)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,12)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,14)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,16)">Conditional</animation>
I'm having it so that each animation adds up, but it can be done as a total and just using one, in this case I don't think it matters that much I just find this way cleaner.

Inside each widget set property for current widget num:
xml:

<control type="fixedlist" id="$PARAM[list_id]">
    ...
    <onfocus>SetProperty(CurrentVisibleWidget,$PARAM[visible_widget],Home)</onfocus>
    ...
</control>

Then use as fallback check in the fade animation:
xml:

<animation effect="fade" start="100" end="0" time="200" reversible="true" condition="[ControlGroup(2100).HasFocus() + Integer.IsGreater(System.CurrentControlID,$PARAM[visible_widget])] | Integer.IsGreater(Window(Home).Property(CurrentVisibleWidget),$PARAM[visible_widget])">Conditional</animation>
So whenever first condition is not satisfied then it fallback to window property which is saved regardless of focus/window.

3)
Quote:But I'm curious, how do you solve the issue of animations and the fade effect? Please, don't say voodoo.
If you meant do you solve=did you solve, then voodoo yeah. Otherwise my brain just farted again Undecided  
Yes, I'm sorry if I've made some grammatical error, I'm Spanish and I was pretty tired XD
And it is an interesting idea that you propose, I will try it in a moment. Meanwhile I have been fiddling with an idea that occurred to me:
Since the movement and fade animation are fixed, and only give problems when they lose the focus (As can happen when activating the powermenu or my dialog window that acts as a menu), I have created a second layer over the widgets, a replica from the bottom, which makes the remaining pieces disappear, because when I activate the menu window I do not need them to move. It does not spoil the animation. The only problem right now is to find the mode that fits well with the fade animation and does not have a "flicker". At the moment I have this "<visible> System.HasVisibleModalDialog </ visible>", but I'll be doing tests, I have to test your idea too. The use of "set property" is beyond my understanding, I have found very little information about it and I would love to study it more, because it will be of much use for the menu later on.
Regarding the use of the dialog, I thought of trying to maintain the image and data of the film, but without having to have it focused. Not taking a method and everything I found was too complicated for something so simple, I decided to take the easy route and create a personalized dialog that would act as a menu. Simply active, I have a "slide" animation to appear, and that's it.
Another problem that I am having is that having one fanart on another, even with the "diffuse", according to that fanart you notice a small black cut. It is not annoying in itself, but I have to see how I can improve that.
And look, that's the code that activates the menu, it's in the grouplist of the widgets:
xml:
<control type="fixedlist" id="$PARAM[list_id]">
                <left>0</left>
                <top>0</top>
                <animation effect="fade" start="100" end="0" time="200" reversible="true" condition="[Integer.IsGreater(System.CurrentControlID,$PARAM[list_id])]">Conditional</animation>
                <visible>Integer.IsGreater(Container($PARAM[list_id]).NumItems,0) | Container($PARAM[list_id]).IsUpdating</visible>
                <onleft>ActivateWindow(1110)</onleft>
                <height>230</height>
                <movement>0</movement>
                <preloaditems>2</preloaditems>
                <orientation>horizontal</orientation>
                <scrolltime tween="cubic" easing="out">500</scrolltime>
I warn you, do not put an "onback" because then it will not let you access anything in the menu, but if you want to be activated with an "onback", it is better that you do this:
<previouswindow>1110</previouswindow> putting the ID of the menu that you have created, at the beginning of "home" or from where you want to activate the menu.
And then I simply create an animation for the window, and it works wonderfully, without lag, without errors, and keeps the background and the previous info, as if I did not lose focus.
xml:
<animation type="WindowOpen" reversible="true">
        <effect type="slide" start="0" end="500" time="500" tween="cubic" easing="out" />
        <effect type="fade" start="0" end="100" time="200" tween="cubic" easing="out" />
    </animation>
    <animation type="WindowClose" reversible="true">
        <effect type="slide" start="500" end="0" time="500" tween="cubic" easing="out" />
        <effect type="fade" start="100" end="0" delay="200" time="500" tween="cubic" easing="out" />
    </animation>
 

Yeah I do like the design of using dialogs, navigation from and too is still and issue and also that dialog 'does not know' about other activated windows (can't pull/compare information on stuff outside dialog scope). and using previouswindow is very error prone, try implementing a fake button that you send focus to onback and it calls the dialog activation instead, that won't mess with window stack.

And have you tried what i've offered in last reply yet?
Reply
#13
(2019-07-06, 13:46)cartman.dos Wrote:
(2019-07-05, 16:19)BiudreuN Wrote:
(2019-07-05, 15:02)cartman.dos Wrote: Look maybe it's me having a brain-fart here but I'm having trouble understanding what's the new problem.
So I'm not clear on that one exactly. But my understanding is that losing focus on the widgets, since it is now on the dialog items, kills the fixed/fade animations?

A few things:
1) Having a menu as a dialog is very interesting, I'd very much like to see how that works. I have a huge issue with this one which I solved by doing bunch of ugly 'hacks'. I tried the path of menu as dialog but had focus issues and maybe gave up on the idea too soon.

2) If the issue is what I wrote above, then a fix could be to use container.position and a window prop as I suggested, because if your issue is losing focus on widgets, this cannot be bypassed as long as you're using currentitem.
I also have a top label and widget, so this counts as 2 items.
What you need to do is use container.position by jumps of 2.
If you want to add a scrollbar you can still do it and just place it OUTSIDE of the widgets' grouplist. The gui knows which one to control using the <pagecontrol> tag and scroll bar with a corresponding id.
Then, assuming your widgets' grouplist holds items structured by label+container, then you could use this code instead of the current item one:
xml:

<animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,2)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,4)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,6)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,8)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,10)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,12)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,14)">Conditional</animation>
                <animation effect="slide" end="0,-310" time="200" reversible="true" condition="Integer.IsGreater(Container(2100).Position,16)">Conditional</animation>
I'm having it so that each animation adds up, but it can be done as a total and just using one, in this case I don't think it matters that much I just find this way cleaner.

Inside each widget set property for current widget num:
xml:

<control type="fixedlist" id="$PARAM[list_id]">
    ...
    <onfocus>SetProperty(CurrentVisibleWidget,$PARAM[visible_widget],Home)</onfocus>
    ...
</control>

Then use as fallback check in the fade animation:
xml:

<animation effect="fade" start="100" end="0" time="200" reversible="true" condition="[ControlGroup(2100).HasFocus() + Integer.IsGreater(System.CurrentControlID,$PARAM[visible_widget])] | Integer.IsGreater(Window(Home).Property(CurrentVisibleWidget),$PARAM[visible_widget])">Conditional</animation>
So whenever first condition is not satisfied then it fallback to window property which is saved regardless of focus/window.

3)
If you meant do you solve=did you solve, then voodoo yeah. Otherwise my brain just farted again Undecided  
Yes, I'm sorry if I've made some grammatical error, I'm Spanish and I was pretty tired XD
And it is an interesting idea that you propose, I will try it in a moment. Meanwhile I have been fiddling with an idea that occurred to me:
Since the movement and fade animation are fixed, and only give problems when they lose the focus (As can happen when activating the powermenu or my dialog window that acts as a menu), I have created a second layer over the widgets, a replica from the bottom, which makes the remaining pieces disappear, because when I activate the menu window I do not need them to move. It does not spoil the animation. The only problem right now is to find the mode that fits well with the fade animation and does not have a "flicker". At the moment I have this "<visible> System.HasVisibleModalDialog </ visible>", but I'll be doing tests, I have to test your idea too. The use of "set property" is beyond my understanding, I have found very little information about it and I would love to study it more, because it will be of much use for the menu later on.
Regarding the use of the dialog, I thought of trying to maintain the image and data of the film, but without having to have it focused. Not taking a method and everything I found was too complicated for something so simple, I decided to take the easy route and create a personalized dialog that would act as a menu. Simply active, I have a "slide" animation to appear, and that's it.
Another problem that I am having is that having one fanart on another, even with the "diffuse", according to that fanart you notice a small black cut. It is not annoying in itself, but I have to see how I can improve that.
And look, that's the code that activates the menu, it's in the grouplist of the widgets:
xml:
<control type="fixedlist" id="$PARAM[list_id]">
                <left>0</left>
                <top>0</top>
                <animation effect="fade" start="100" end="0" time="200" reversible="true" condition="[Integer.IsGreater(System.CurrentControlID,$PARAM[list_id])]">Conditional</animation>
                <visible>Integer.IsGreater(Container($PARAM[list_id]).NumItems,0) | Container($PARAM[list_id]).IsUpdating</visible>
                <onleft>ActivateWindow(1110)</onleft>
                <height>230</height>
                <movement>0</movement>
                <preloaditems>2</preloaditems>
                <orientation>horizontal</orientation>
                <scrolltime tween="cubic" easing="out">500</scrolltime>
I warn you, do not put an "onback" because then it will not let you access anything in the menu, but if you want to be activated with an "onback", it is better that you do this:
<previouswindow>1110</previouswindow> putting the ID of the menu that you have created, at the beginning of "home" or from where you want to activate the menu.
And then I simply create an animation for the window, and it works wonderfully, without lag, without errors, and keeps the background and the previous info, as if I did not lose focus.
xml:
<animation type="WindowOpen" reversible="true">
        <effect type="slide" start="0" end="500" time="500" tween="cubic" easing="out" />
        <effect type="fade" start="0" end="100" time="200" tween="cubic" easing="out" />
    </animation>
    <animation type="WindowClose" reversible="true">
        <effect type="slide" start="500" end="0" time="500" tween="cubic" easing="out" />
        <effect type="fade" start="100" end="0" delay="200" time="500" tween="cubic" easing="out" />
    </animation>
 

Yeah I do like the design of using dialogs, navigation from and too is still and issue and also that dialog 'does not know' about other activated windows (can't pull/compare information on stuff outside dialog scope). and using previouswindow is very error prone, try implementing a fake button that you send focus to onback and it calls the dialog activation instead, that won't mess with window stack.

And have you tried what i've offered in last reply yet? 

Yes, I was testing it but I did not manage to make it work, It just made disappeared all the widgets, so I put everything back as it was and at the moment it works great. I have the widgets with an ID greater than 9000 and with that I avoid them disappearing when focusing something else, and I have a double background above that appears when I remove the focus, and I still have to see if it gives me problems. And with respect to the use of previouswindow, at the moment it has not given me a single error, in fact it always does exactly what I ask, if I find an error, I will change it. And maybe the dialog create some problems, I don't know, for the moment I have not worked on it, is on my list of tasks to finish.
Reply

Logout Mark Read Team Forum Stats Members Help
Fade effect in a fixed grouplist?0