Author Topic: Change background per collection  (Read 5059 times)

cassette

  • Full Member
  • ***
  • Posts: 170
  • Karma: +1/-0
    • View Profile
Change background per collection
« on: June 22, 2017, 10:30:34 PM »
For example, a red background when entering the NES collection, and blue one when entering the Genesis collection. Seems rather easy but the wiki is down for me so I'm lost.

I'm using

Code: [Select]
  <reloadableImage type="background" mode="layout" x="0" y="0" alpha="1" width="stretch" layer="16">
        <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="1" algorithm="easeinquadratic"/>
          </set>
        </onMenuExit>
    </reloadableImage>

for the main menu, but I'm not sure how to call it for the collection menus.
« Last Edit: June 22, 2017, 10:49:33 PM by firewater »

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1534
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Change background per collection
« Reply #1 on: June 22, 2017, 11:13:34 PM »
It is easy. 😀
You can simply put a background.png in your system_artwork directories, and then use type="background" and mode="system" for your reloadableImage.
Alternatively, skip the mode parameter, and put the image as default.png in your medium_artwork/background directory.
« Last Edit: June 22, 2017, 11:17:12 PM by Pieter Hulshoff »

JonahUK

  • Newbie
  • *
  • Posts: 35
  • Karma: +16/-0
    • View Profile
Re: Change background per collection
« Reply #2 on: June 22, 2017, 11:14:12 PM »
EDIT:
Pieter beat me to it, lol!

cassette

  • Full Member
  • ***
  • Posts: 170
  • Karma: +1/-0
    • View Profile
Re: Change background per collection
« Reply #3 on: June 23, 2017, 12:29:17 AM »
Thanks for the quick help guys. I'm not getting it right though... is the code I posted above alright? It works fine with a background.png on the main menu, but not when entering the collection. Just to be clear, all I did is I duplicated that part of the code and changed mode="layout" with mode="system". I tried changing the layer upwards, removing the animation, but it just won't show up >:(!!!

dougan78

  • Full Member
  • ***
  • Posts: 159
  • Karma: +4/-0
    • View Profile
Re: Change background per collection
« Reply #4 on: June 23, 2017, 12:36:04 AM »
I use per collection backgrounds in my retrospin static. You can review how I did it.  Good luck.

Sent from my SM-G920V using Tapatalk


cassette

  • Full Member
  • ***
  • Posts: 170
  • Karma: +1/-0
    • View Profile
Re: Change background per collection
« Reply #5 on: June 23, 2017, 02:45:10 AM »
Got it! Seeing how it works there makes more sense now.

edit: I'd appreciate a simple way to do it though lol... all I want to change is just that background image, so having a layout.xml for each console is an overkill and tiring considering it's the same file for all of them, meaning when I modifiy it I have to change the file for each of them.
« Last Edit: June 23, 2017, 03:16:22 AM by firewater »

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1534
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Change background per collection
« Reply #6 on: June 23, 2017, 07:21:02 AM »
Thanks for the quick help guys. I'm not getting it right though... is the code I posted above alright? It works fine with a background.png on the main menu, but not when entering the collection. Just to be clear, all I did is I duplicated that part of the code and changed mode="layout" with mode="system". I tried changing the layer upwards, removing the animation, but it just won't show up >:(!!!

Sure, the code is fine, though those animations do absolutely nothing (alpha is 1 to start, and alpha is animated to 1 every time), so you might as well just remove them. Considering that you used mode="layout", simply put the background images as layouts/<layout name>/collections/<collection name>/medium_artwork/background/default.png. That way that single piece of code will show the background for both the main menu as well as the collection menu. It's exactly how the default theme Aeon Nox displays its fanart, except we didn't use mode="layout" there.

See http://www.retrofe.nl/wiki/doku.php?id=layouts#mode_attribute for more details on where RetroFE searches for its media.
« Last Edit: June 23, 2017, 07:28:29 AM by Pieter Hulshoff »

cassette

  • Full Member
  • ***
  • Posts: 170
  • Karma: +1/-0
    • View Profile
Re: Change background per collection
« Reply #7 on: June 23, 2017, 06:18:32 PM »
Oh yeah, the theme has gone many changes since first starting so a lot of code is probably a mess. Thanks for the instructions, I'll look into this as well.