List items Focus animation when not focused
#1
I have a list and in the focused layout I use a Focus animation like so

Code:
<control type="list" id="506">
  ......
  ......
  <itemlayout width="1000" height="200">
    .....
    .....
  </itemlayout>
  <focusedlayout wisth="1000" height="200">
    <control type="group">
      <animation type="Focus" reversible="false">
        <effect type="zoom" end="106" time="50" tween="sine" center="auto" />
        <effect type="zoom" end="94.34" time="150" tween="sine" delay="100" center="auto" />
      </animation>
      .....
      .....
    </control>
  </focusedlayout>
</control>

This works perfectly fine, however I need to control the list using a hidden button so I can override the <onclick> action like so

Code:
<control type="button" id="49">
  <left>-1000</left>
  <onup>Control.Move(506,-1)</onup>
  <ondown>Control.Move(506,1)</ondown>
</control>

This moves the list fine but because the list never has focus the focused layouts Focus animation never triggers. Is there any work around for this?

Thanks
Reply
#2
Instead of a Focus animation try a conditional animation with reversible false using OnNext/Previous conditions:
<animation type="Conditional" reversible="false" condition="!Container(506).OnNext + !Container(506).OnPrevious">

That should trigger whenever the container moves.

Other option is to set a window property and trigger the animation with a condition that checks the window prop state.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#3
(2020-09-01, 11:02)jurialmunkey Wrote: Instead of a Focus animation try a conditional animation with reversible false using OnNext/Previous conditions:
<animation type="Conditional" reversible="false" condition="!Container(506).OnNext + !Container(506).OnPrevious">

That worked perfectly.. Thank you Big Grin
Reply
#4
Made a little modification so you also get the Focus animation when the hidden button is focused just like you would if focusing the actual list

With the hidden button id of 49

Code:
<animation type="Conditional" reversible="false" condition="!Container(506).OnNext + !Container(506).OnPrevious + Control.HasFocus(49)">
Reply

Logout Mark Read Team Forum Stats Members Help
List items Focus animation when not focused0