How to animate something from off Screen into the screen? (1 Viewer)

mbuzina

Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    I would like to slide some Buttons from off the screen into view, but they are cut off approx. at screen edge (the last letter partly visible is still included, but every letter completely off screen is invisible). Is this expected behaviour (if so, I find it strange. It is a common technique to prepare something "off-stage" and then let it gallop in, so to speak).

    Sample pics:
    01-31-32.png 01-31-33.png 01-31-36.png

    TV Series has a long title, it is cut off at the e
    After TV Series there are 5 other buttons, they are not visible at all.
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    Had a similar problem previously with images, the posx + posy tags (adjusted for images width+height) must be within the screen boundaries. You can still slide from off the screen or slide from on screen to off screen, just can't have off-screen posx+posy tags.

    you could have 2 separate controls for tv series label.

    in first screenshot control 1 is active,
    in 3rd screenshot control 1 disappears and control 2 with onscreen coordinates becomes visible and slides in from off-screen position.

    or you could dynamically change the label and reanimate the slide. the 2nd line would be the actually selected control that changes with on left/right, and the top line changes visibility based on which 2nd line control is visible.
     
    Last edited:

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Thx kiwi. I found a way around the limitation, i left position at 0 and used animation on condition to move them out of place. I also wanted to slide an image with 2xwidth of the screen. That gets cut of as well, i had to halve the image.

    Still i think it should be possible.
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    Yes I originally found that out when i wanted to have a dvd disc at the top of the screen, with only half visible, and rotate, when it rotates you only got half the disc image.
     

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Yes, I can understand that one - my picture was 2 x Screen width (3840 px) and I wanted it to slide in. Right now I have a good looking animation in there, very smooth. My overlay image is not the right one, but it makes an interesting effect.

    Another question, maybe you know why the following will not work:
    XML:
    <texture>#(switch(eq(#BasicHome.B0.Backdrop,WORLDWEATHER),weather\backgrounds\#WorldWeather.TodayIconNumber.png,true,#BasicHome.B0.Backdrop))</texture>
     
    Last edited:

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Another thing: can I use a skin property to set colors? <textcolor> will not take a property...
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    Yes, I can understand that one - my picture was 2 x Screen width (3840 px) and I wanted it to slide in. Right now I have a good looking animation in there, very smooth. My overlay image is not the right one, but it makes an interesting effect.

    Another question, maybe you know why the following will not work:
    XML:
    <texture>#(switch(eq(#BasicHome.B0.Backdrop,WORLDWEATHER),weather\backgrounds\#WorldWeather.TodayIconNumber.png,true,#BasicHome.B0.Backdrop))</texture>


    what happens if you remove the first bracket?

    <texture>#switch(eq(#Ba....drop)</texture>

    Could you do this instead?

    <control>
    <id=2323>
    <texture>weather\backgrounds\#WorldWeather.TodayIconNumber.png</texture>
    <visible>eq(#BasicHome.B0.Backdrop, WORLDWEATHER)
    ...
    <texture>#BasicHome.B0.Backdrop</texture>
    <visible>!control.isvisible(2323)</visible>

    Also:

    try string.equals ??
     
    Last edited:

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    what happens if you remove the first bracket? #switch(eq(#Ba....drop)
    Does not change a thing.
    Could you do this instead? <id=2323> weather\backgrounds\#WorldWeather.TodayIconNumber.pngeq(#BasicHome.B0.Backdrop, WORLDWEATHER) ... #BasicHome.B0.Backdrop!control.isvisible(2323)
    Of course that is a solution, but I have the same control 10 times (one for each menu item I support), this would be then 20 controls. I also intend to support fanart & maybe other backgrounds -> 40,50,60 background controls??? Btw. having code in texture should work according to the wiki: See the example for switch conditional in http://wiki.team-mediaportal.com/1_...Skin_Architecture/Skin_Logic/Skin_Expressions
    Also: try string.equals ??
    Tried, no luck.

    The strange thing is, the expression does not even compute when put into a label. Why oh why do we have to work around the skinning engine so often???
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    Of course that is a solution, but I have the same control 10 times (one for each menu item I support), this would be then 20 controls.


    conditional import xml statement?

    From titan basichome

    Code:
    <include condition="#(eq(#skin.basichome.background,'default'))">BasicHome.BackgroundSelected.xml</include>
    <include condition="#(eq(#skin.basichome.background,'FanartHandler'))">BasicHome.FanartSelected.xml</include>
     
    Last edited:

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    I know that one, but my idea is to have SkinSettings for each Basic Home Menu entry, having the menu editor in MP. So for each of the 10 entries there are values like B0.Label, B0.Hyperlink, B0.Argument, B0.Background, as well as B1.1.Label, B1.1.Hyperlink, B1.1.Argument (having 10x10 Menu Slots. This requires a good working SkinSetting usage otherwise it will be a nightmare to maintain).

    I am trying to achieve maximum flexibility with maximum maintainability...

    So my question basically, should this work? If yes, we have a bug & it needs to be addressed. I have seen other threads about equality not working...
     

    Users who are viewing this thread

    Top Bottom