Treat favourites and global search dialogs like regular windows?
#1
I'm having trouble getting my animations to work for two particular windows:

DialogFavourites.xml
script-globalsearch-main.xml

I've redesigned the Favourites dialog to appear like a regular window. Kodi, however, doesn't seem to recognize a window change when either Favourites or Global Search are loaded.

In my testing, this means that Window.IsActive(home) is always true for these windows, and Window.IsPrevious(home) and Window.IsNext(home) are always false.

Is there a way to make these windows be treated like regular windows, rather than dialogs? I've noticed, for example, that script-NextAired-TVGuide.xml doesn't exhibit this behavior but rather is treated like a regular window.

Thanks, hope I've explained this clearly enough!
Reply
#2
favourites is a dialog, this is defined as such in Kodi and this can't be changed.
globalsearch is a dialog too, it's defined as such in the addon and you can't change that.
nextaired-tvguide is a window, it's defined as such in the addon and can't be changed.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Ah, ok thanks Ronie. Explains why I couldn't get anything I tried to work in the xmls. Smile
Reply
#4
If you add the same controls as your windows (background image, etc) you can fake it.
Reply
#5
(2014-12-21, 19:58)Hitcher Wrote: If you add the same controls as your windows (background image, etc) you can fake it.

Yes, I was able to get it close. Just can't get the animations in my Home.xml to activate when returning to the home screen from one of these "faked" windows.
Reply
#6
I found copying the WindowOpen/WindowClose animations and making them Visible/Hidden based on !Window.IsVisible(favourites) and adding delay="600" to the visible one worked for Alaska.
Reply
#7
Thanks Hitcher, though maybe I didn't do it right.

In my Home.xml, I have the following animation for my main menu. Of course, this animation doesn't run when returning home from a dialog like favourites or global search.

Code:
<animation effect="slide" tween="cubic" time="600" start="0,190" end="0,0" reversible="false">WindowOpen</animation>

<animation effect="slide" tween="cubic" time="300" start="0,0" end="0,190" reversible="false">WindowClose</animation>

I tried adding the following animation based on your post, but it didn't seem to have any effect on the main menu when returning from favourites or global search.

Code:
<animation effect="slide" tween="cubic" time="600" start="0,190" end="0,0" delay="600" reversible="false" condition="!Window.IsVisible(favourites)">Visible</animation>

<animation effect="slide" tween="cubic" time="300" start="0,0" end="0,190" reversible="false" condition="!Window.IsVisible(favourites)">Hidden</animation>

Did I understand your post correctly? Thanks!
Reply
#8
Try putting everything you want to hide in this group -

Code:
<control type="group">
    <visible>!Window.IsVisible(favourites)</visible>            
    <animation effect="slide" tween="cubic" time="600" start="0,190" end="0,0" reversible="false">Visible</animation>
    <animation effect="slide" tween="cubic" time="300" start="0,0" end="0,190" reversible="false">Hidden</animation>
    ...stuff here...
</control>

and then in your WindowOpen animation for Favourites add delay="800"

Works fine in Alaska.
Reply
#9
(2014-12-25, 21:13)Hitcher Wrote: Try putting everything you want to hide in this group -

Code:
<control type="group">
    <visible>!Window.IsVisible(favourites)</visible>            
    <animation effect="slide" tween="cubic" time="600" start="0,190" end="0,0" reversible="false">Visible</animation>
    <animation effect="slide" tween="cubic" time="300" start="0,0" end="0,190" reversible="false">Hidden</animation>
    ...stuff here...
</control>

and then in your WindowOpen animation for Favourites add delay="800"

Works fine in Alaska.

Ah, brilliant, worked perfectly. Thanks Hitcher!
Reply

Logout Mark Read Team Forum Stats Members Help
Treat favourites and global search dialogs like regular windows?0