Author Topic: Default element to video > screenshot > front artwork  (Read 3149 times)

cassette

  • Full Member
  • ***
  • Posts: 170
  • Karma: +1/-0
    • View Profile
Default element to video > screenshot > front artwork
« on: June 14, 2017, 03:58:28 AM »
Any way to do this? The first two I believe are default as it is how it works with just "<reloadableVideo imageType="screenshot", but if I want the element (in this case, the background image) to load the front artwork if (1) no video has been found (2) no screenshot has been found, all I cant think of is to set the front artwork as a layer under video/screenshot. It works, but it looks very awkward when switching from one game to another as you can briefly see the artwork pop up for a second...

The code:

Code: [Select]
<!----------------------------------------------------------------------------------------------------------------------------------->
  <!-- Settings -->
<!----------------------------------------------------------------------------------------------------------------------------------->

<layout width="1920" height="1080" font="fonts/HelveticaNeue-Bold.otf" loadFontSize="42" loadFontSize="60" fontColor="dedede">

<!----------------------------------------------------------------------------------------------------------------------------------->
  <!-- Sounds -->
<!----------------------------------------------------------------------------------------------------------------------------------->

  <sound type="highlight" src="sounds/highlight.wav" />
  <sound type="select" src="sounds/select.wav" />

<!----------------------------------------------------------------------------------------------------------------------------------->
  <!-- Main Menu -->
<!----------------------------------------------------------------------------------------------------------------------------------->

  <reloadableImage type="background" mode="layout" x="0" y="0" width="stretch" layer="0">
        <onMenuEnter menuIndex="0">
            <set duration=".01">
                <animate type="alpha" to="1" algorithm="easeinquadratic"/>
            </set>
        </onMenuEnter>

        <onMenuExit menuIndex="0">
            <set duration=".01">
                <animate type="alpha" to="1" algorithm="easeinquadratic"/>
            </set>
        </onMenuExit>
    </reloadableImage>

    <image src="images/transition.png" x="0" y="0" width="stretch" alpha="0" layer="6">
        <onMenuExit menuIndex="0">
          <set duration="0.5">
            <animate type="alpha" to="1" algorithm="easeinquadratic"/>
          </set>
        </onMenuExit>

        <onMenuEnter menuIndex="0">
          <set duration="0.5">
            <animate type="alpha" to="0" algorithm="easeinquadratic"/>
          </set>
        </onMenuExit>
    </image>

    <image src="images/timeline.png" x="center" y="center" yOrigin="center" xOrigin="center" height="250" width="stretch" alpha="1" layer="5">
    </image>

     <menu type="custom" imageType="logo" scrollTime=".24" scrollAcceleration=".04" orientation="horizontal" x="0" width="center" y="center" yOffset="400" algorithm="easeinquadratic" >
    <itemDefaults  x="center" y="center" yOrigin="center" xOrigin="center" width="300" maxHeight="175" spacing="10" yOffset="0"  alpha="0.5" fontSize="60" layer="6"/>
    <item xOffset="-1420" alpha="0" />
    <item xOffset="-1060">
      <onMenuEnter menuIndex="0">
        <set duration="0.5">
          <animate type="alpha" to="0.5" algorithm="easeinquadratic"/>
        </set>
      </onMenuEnter>
      <onMenuExit menuIndex="0">
        <set duration="0.5">
          <animate type="alpha"  to="0" algorithm="easeinquadratic"/>
        </set>
      </onMenuExit>
    </item>

    <item xOffset="-720">
            <onMenuEnter menuIndex="0">
        <set duration="0.5">
          <animate type="alpha" to="1" algorithm="easeinquadratic"/>
        </set>
      </onMenuEnter>
      <onMenuExit menuIndex="0">
        <set duration="0.5">
          <animate type="alpha"  to="0" algorithm="easeinquadratic"/>
        </set>
      </onMenuExit>
    </item>

    <item xOffset="-380">
            <onMenuEnter menuIndex="0">
        <set duration="0.5">
          <animate type="alpha" to="1" algorithm="easeinquadratic"/>
        </set>
      </onMenuEnter>
      <onMenuExit menuIndex="0">
        <set duration="0.5">
          <animate type="alpha"  to="0" algorithm="easeinquadratic"/>
        </set>
      </onMenuExit>
    </item>

    <item selected="true" width="400" layer="7" alpha="1">
            <onMenuEnter menuIndex="0">
        <set duration="0.5">
          <animate type="alpha" to="1" algorithm="easeinquadratic"/>
        </set>
      </onMenuEnter>
      <onMenuExit menuIndex="0">
        <set duration="0.5">
          <animate type="alpha"  to="0" algorithm="easeinquadratic"/>
        </set>
      </onMenuExit>
    </item>

    <item xOffset="380">
      <onMenuEnter menuIndex="0">
        <set duration="0.5">
          <animate type="alpha" to="1" algorithm="easeinquadratic"/>
        </set>
      </onMenuEnter>
      <onMenuExit menuIndex="0">
        <set duration="0.5">
          <animate type="alpha"  to="0" algorithm="easeinquadratic"/>
        </set>
      </onMenuExit>
    </item>

    <item xOffset="720">
      <onMenuEnter menuIndex="0">
        <set duration="0.5">
          <animate type="alpha" to="0.5" algorithm="easeinquadratic"/>
        </set>
      </onMenuEnter>
      <onMenuExit menuIndex="0">
        <set duration="0.5">
          <animate type="alpha"  to="0" algorithm="easeinquadratic"/>
        </set>
      </onMenuExit>
    </item>

    <item xOffset="1060">
      <onMenuEnter menuIndex="0">
        <set duration="0.5">
          <animate type="alpha" to="0.5" algorithm="easeinquadratic"/>
        </set>
      </onMenuEnter>
      <onMenuExit menuIndex="0">
        <set duration="0.5">
          <animate type="alpha" to="0" algorithm="easeinquadratic"/>
        </set>
      </onMenuExit>
    </item>
    <item xOffset="1420" alpha="0" />
  </menu>

<!----------------------------------------------------------------------------------------------------------------------------------->
  <!-- Sub Menu -->
<!----------------------------------------------------------------------------------------------------------------------------------->

   <menu type="custom" imageType="" orientation="vertical" width="1500" height="100" scrollTime=".24" scrollAcceleration=".04">
    <itemDefaults font="fonts/HelveticaNeue-Bold.otf" spacing="2" y="center" x="center" yOrigin="center" xOrigin="center" fontSize="42" width="1500" maxHeight="120" layer="16" alpha="1"/>
      <item xOffset="0" angle="0" yOffset="-664" alpha="0" >
        <onMenuExit menuIndex="1">
          <set duration=".01">
            <animate type="alpha" to="0" algorithm="easeinquadratic"/>
          </set>
        </onMenuExit>
      </item>

      <item xOffset="0" angle="0" yOffset="-568">
        <onMenuExit menuIndex="1">
          <set duration=".01">
            <animate type="alpha" to="0" algorithm="easeinquadratic"/>
          </set>
        </onMenuExit>
      </item>

      <item xOffset="0" angle="0" yOffset="-464">
        <onMenuExit menuIndex="1">
          <set duration=".01">
            <animate type="alpha" to="0" algorithm="easeinquadratic"/>
          </set>
        </onMenuExit>
      </item>

      <item xOffset="0" angle="0" yOffset="-354">
        <onMenuExit menuIndex="1">
          <set duration=".01">
            <animate type="alpha" to="0" algorithm="easeinquadratic"/>
          </set>
        </onMenuExit>
      </item>

      <item xOffset="0" angle="0" yOffset="-238">
        <onMenuExit menuIndex="1">
          <set duration=".01">
            <animate type="alpha" to="0" algorithm="easeinquadratic"/>
          </set>
        </onMenuExit>
      </item>

      <item xOffset="0" angle="0" yOffset="-120">
        <onMenuExit menuIndex="1">
          <set duration=".01">
            <animate type="alpha" to="0" algorithm="easeinquadratic"/>
          </set>
        </onMenuExit>
      </item>

      <item xOffset="0" yOffset="0" layer="17" width="1500" maxHeight="200" alpha="1" selected="true" fontSize="72" fontColor="000000">
      <onMenuExit menuIndex="1">
        <set duration=".01">
          <animate type="alpha" to="0" algorithm="easeinquadratic"/>
         </set>
     </onMenuExit>
      </item>

      <item xOffset="0" angle="0" yOffset="120" >
        <onMenuExit menuIndex="1">
          <set duration=".01">
            <animate type="alpha" to="0" algorithm="easeinquadratic"/>
          </set>
        </onMenuExit>
      </item>

      <item xOffset="0" angle="0" yOffset="238" >
        <onMenuExit menuIndex="1">
          <set duration=".01">
            <animate type="alpha" to="0" algorithm="easeinquadratic"/>
          </set>
        </onMenuExit>
      </item>

      <item xOffset="0" angle="0" yOffset="354" >
        <onMenuExit menuIndex="1">
          <set duration=".01">
            <animate type="alpha" to="0" algorithm="easeinquadratic"/>
          </set>
        </onMenuExit>
      </item>

      <item xOffset="0" angle="0" yOffset="464" >
        <onMenuExit menuIndex="1">
          <set duration=".01">
            <animate type="alpha" to="0" algorithm="easeinquadratic"/>
          </set>
        </onMenuExit>
      </item>

      <item xOffset="0" angle="0" yOffset="568" >
        <onMenuExit menuIndex="1">
          <set duration=".01">
            <animate type="alpha" to="0" algorithm="easeinquadratic"/>
          </set>
        </onMenuExit>
      </item>

      <item xOffset="0" angle="0" yOffset="664" alpha="0" >
        <onMenuExit menuIndex="1">
          <set duration=".01">
            <animate type="alpha" to="0" algorithm="easeinquadratic"/>
          </set>
        </onMenuExit>
      </item>

   </menu>

    <image src="images/video_overlay.png" x="0" y="0" width="stretch" alpha="0" layer="13">
        <onMenuEnter menuIndex="1">
          <set duration=".01">
           <animate type="alpha" to="1" algorithm="easeinquadratic"/>
          </set>
        </onMenuEnter>

        <onMenuExit menuIndex="1">
          <set duration=".01">
            <animate type="alpha" to="0" algorithm="easeinquadratic"/>
          </set>
        </onMenuExit>
    </image>

    <image src="images/dark_overlay.png" x="0" y="0" width="stretch" alpha="0" layer="13">
        <onMenuEnter menuIndex="1">
          <set duration=".01">
           <animate type="alpha" to="0.3" algorithm="easeinquadratic"/>
          </set>
        </onMenuEnter>

        <onMenuExit menuIndex="1">
          <set duration=".01">
            <animate type="alpha" to="0" algorithm="easeinquadratic"/>
          </set>
        </onMenuExit>
    </image>

    <image src="images/items.png" x="center" y="center" yOrigin="center" xOrigin="center" height="150" width="stretch" alpha="0" layer="13">
      <onMenuEnter menuIndex="1">
        <set duration=".01">
          <animate type="alpha" to="1" algorithm="easeinquadratic"/>       
        </set>
      </onMenuEnter>

      <onMenuExit menuIndex="1">
        <set duration=".01">
          <animate type="alpha" to="0" algorithm="easeinquadratic"/>
        </set>
      </onMenuExit>
    </image>

    <image src="images/items.png" x="center" y="center" yOrigin="center" xOrigin="center" height="150" width="stretch" alpha="0" layer="17">
      <onMenuEnter menuIndex="1">
        <set duration="0.1">
          <animate type="alpha" to="1" algorithm="easeinquadratic"/>       
        </set>
      </onMenuEnter>

      <onMenuExit menuIndex="1">
        <set duration=".01">
          <animate type="alpha" to="0" algorithm="easeinquadratic"/>
        </set>
      </onMenuExit>
    </image>

  <reloadableVideo imageType="screenshot" alpha="1" x="0" y="center" yOrigin="center" Width="stretch" layer="7">
    <onEnter>
      <set duration=".01">
        <animate type="alpha" to="1" algorithm="easeinquadratic"/>
        <animate type="x" to="0"/>
        <animate type="y" to="center" />
        <animate type="Width" to="stretch"/>
      </set>
    </onEnter>
    <onMenuEnter menuIndex="0">
      <set duration=".01">
        <animate type="x" to="0"/>
        <animate type="y" to="0" />
        <animate type="y" to="center" />
        <animate type="Width" to="stretch"/>
      </set>
      <set duration=".01">
        <animate type="alpha" to="1" algorithm="easeinquadratic"/>
      </set>
      <set duration=".01">
        <animate type="alpha" to="1" algorithm="easeinquadratic"/>
      </set>
    </onMenuEnter>
    <onHighlightEnter menuIndex="0">
      <set duration=".01">
        <animate type="alpha" to="0" algorithm="easeinquadratic"/>
      </set>
      <set duration=".01">
        <animate type="alpha" to="1" algorithm="easeinquadratic"/>
      </set>
    </onHighlightEnter>
    <onMenuExit menuIndex="0">
      <set duration=".01">
        <animate type="alpha" to="0" algorithm="easeinquadratic"/>
      </set>
    </onMenuExit>
    <onExit>
      <set duration=".01">
        <animate type="alpha" to="0" algorithm="easeinquadratic"/>
      </set>
    </onExit>

    <onMenuEnter menuIndex="1">
      <set duration=".01">
        <animate type="x" to="0"/>
        <animate type="y" to="center" />
        <animate type="Width" to="stretch"/>
      </set>
      <set duration=".01">
        <animate type="alpha" to="1" algorithm="easeinquadratic"/>
      </set>
    </onMenuEnter>
    <onHighlightEnter menuIndex="1">
      <set duration=".01">
        <animate type="alpha" to="1" algorithm="easeinquadratic"/>
      </set>
    </onHighlightEnter>
    <onMenuExit menuIndex="1">
      <set duration=".01">
        <animate type="alpha" to="0" algorithm="easeinquadratic"/>
      </set>
      <set duration=".01">
        <animate type="x" to="0"/>
        <animate type="y" to="center" />
        <animate type="Width" to="stretch"/>
      </set>
    </onMenuExit>
  </reloadableVideo>

   <reloadableImage type="artwork_front" alpha="1" angle="0" x="center" y="center" xOrigin="center" yOffset="-700" xOffset="0" yOrigin="top" width="stretch" layer="7">
    <onEnter>
      <set duration=".01">
        <animate type="alpha" to="1" algorithm="easeinquadratic"/>
      </set>
    </onEnter>
    <onMenuEnter menuIndex="0">
      <set duration=".01">
        <animate type="alpha" to="1" algorithm="easeinquadratic"/>
      </set>
      <set duration=".01">
        <animate type="alpha" to="1" algorithm="easeinquadratic"/>
      </set>
    </onMenuEnter>
    <onHighlightEnter menuIndex="0">
      <set duration=".01">
        <animate type="alpha" to="0" algorithm="easeinquadratic"/>
      </set>
      <set duration=".01">
        <animate type="alpha" to="1" algorithm="easeinquadratic"/>
      </set>
    </onHighlightEnter>
    <onMenuExit menuIndex="0">
      <set duration=".01">
        <animate type="alpha" to="0" algorithm="easeinquadratic"/>
      </set>
    </onMenuExit>
    <onExit>
      <set duration=".01">
        <animate type="alpha" to="0" algorithm="easeinquadratic"/>
      </set>
    </onExit>

    <onMenuEnter menuIndex="1">
      <set duration=".01">
        <animate type="alpha" to="1" algorithm="easeinquadratic"/>
      </set>
    </onMenuEnter>
    <onHighlightEnter menuIndex="1">
      <set duration=".01">
        <animate type="alpha" to="1" algorithm="easeinquadratic"/>
      </set>
    </onHighlightEnter>
    <onMenuExit menuIndex="1">
      <set duration=".01">
        <animate type="alpha" to="0" algorithm="easeinquadratic"/>
      </set>
    </onMenuExit>
  </reloadableImage>

<!----------------------------------------------------------------------------------------------------------------------------------->
  <!-- Other -->
<!----------------------------------------------------------------------------------------------------------------------------------->

  <reloadableImage type="playlist" mode="commonlayout" alpha="1" x="1850" y="430" xOrigin="center" yOrigin="top" maxHeight="96" layer="19">
        <onEnter>
            <set duration=".8">
                <animate type="nop"/>
            </set>
        </onEnter>
 
       <onExit>
            <set duration=".01">
                <animate type="alpha" to="0" algorithm="easeinquadratic"/>
            </set>
        </onExit>
 
      <onMenuEnter menuIndex="0">
            <set duration=".8">
                <animate type="y" to="430" algorithm="easeinquadratic"/>
            </set>
        </onMenuEnter>

        <onMenuEnter menuIndex="1">
            <set duration=".01">
                <animate type="y" from="-50" to="0" algorithm="easeinquadratic"/>
            </set>
        </onMenuEnter>
 
      <onMenuExit>
            <set duration=".01">
                <animate type="alpha" to="0" algorithm="easeinquadratic"/>
            </set>
        </onMenuExit>
     
        <onIdle>
            <set duration="1">
                <animate type="alpha" to="1" algorithm="easeinquadratic"/>
            </set>
            <set duration="1">
                <animate type="alpha" to="1" algorithm="easeinquadratic"/>
            </set>
        </onIdle>
 </reloadableImage>

</layout>

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1543
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Default element to video > screenshot > front artwork
« Reply #1 on: June 14, 2017, 07:33:55 AM »
Not at this time; RetroFE only supports a single backup scenario for missing artwork (other than the default.png option).

cassette

  • Full Member
  • ***
  • Posts: 170
  • Karma: +1/-0
    • View Profile
Re: Default element to video > screenshot > front artwork
« Reply #2 on: June 15, 2017, 07:34:37 AM »
Alright, no problem, was just playing around with that, but think I've settled on only having video > screenshot regardless.