focusedlayout focus animation only fires on first entry.....
#1
I have this focusedlayout in my view with a focus / unfocus animation to zoom the content:-

xml:
                
<focusedlayout width="300" height="430" condition="Container.Content(sets) | Container.Content(movies) | Container.Content(tvshows) | Container.Content(seasons)">
  <control type="group">
    <top>116</top>
    <control type="group">
      <animation effect="zoom" start="100" end="115" center="auto" time="50">Focus</animation>
      <animation effect="zoom" start="115" end="100" center="auto" time="50">UnFocus</animation>
      <control type="image">
        <left>20</left>
        <top>20</top>
        <width>260</width>
        <height>390</height>
        <aspectratio align="center" aligny="center">fit</aspectratio>
        <texture background="true" diffuse="overlays/mask_poster.png" fallback="DefaultFallbackMovies.png">$VAR[PosterVar]</texture>
      </control>
    </control>
  </control>
</focusedlayout>


Which works fine when navigation around the panel it's apart of, focused items zoom and unfocused items return to normal.

The problem is when the skin is first loaded and I go from Home to the Library view the current focused item is zoomed like I would expect, however when I back out of Home and then return to the Library view the zoom animation fails to trigger on entry, once a new item is selected the zoom triggers.


1. Reload skin
2. Go from Home to Library view  -  the focused item is zoomed
3. Go back to Home and then in to Library again - the focused item is not zoomed the animation hasn't triggered

I'm doing it the same way as Estuarys View_54_InfoWall which works fine, I just can't figure out why it behaves the way it does in my view , any ideasHuh?
Reply
#2
Ok, so I've figured out the problem but I can't figure out why it's happening.....

In my view I've got another set of layouts for if the items have no content type:-

xml:
<focusedlayout width="300" height="430" condition="Container.Content(sets) | Container.Content(movies) | Container.Content(tvshows) | Container.Content(seasons)">
    <animation effect="zoom" start="100" end="115" center="150,215" time="100">Focus</animation>
    <animation effect="zoom" start="115" end="100" center="auto" time="100">UnFocus</animation>   
    .......
    Poster layout code
    .......
</focusedlayout>

<focusedlayout height="160" width="600" condition="Container.Content()">
    .......
    Layout for items with no content type
    .......
</focuslayout>

If I remove the Container.Content() condition from the second layout or change it to anything else the animation on the first layout works perfectly.

So what is the correct way to detect no content that also doesn't break the animation on the previous layout?? 

condition="String.IsEqual(Container.Content,)" also breaks the animation Sad
Reply
#3
Ok, I'm idiot..... This is fixed now, I can just remove the entire condition from the second layouts and it works as expected  Blush

This still doesn't explain why condition="Containe.Content()" breaks the animation.... but hey it's working now  Smile
Reply
#4
(2020-04-04, 16:06)roidy Wrote: Ok, I'm idiot..... This is fixed now, I can just remove the entire condition from the second layouts and it works as expected  Blush

This still doesn't explain why condition="Containe.Content()" breaks the animation.... but hey it's working now  Smile

It breaks the animation because when the Window initially loads the content type is empty. It's only after the container begins to load that Container.Content type is set. That's why you can't use something like Container.Content(movies) as an include condition because it will be empty at the time of window load.

So basically the container has already focused on the Container.Content() layout and when it switches the Focus condition doesn't trigger because the item is already focused. I'm not sure why it works when you remove the condition altogether though...
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#5
(2020-04-05, 10:15)jurialmunkey Wrote: I'm not sure why it works when you remove the condition altogether though...

After more testing it doesn't..... Sad  Well it works intermittently, sometimes I get the right set of layouts and sometimes not.
Reply

Logout Mark Read Team Forum Stats Members Help
focusedlayout focus animation only fires on first entry.....0