Help - Search - Members - Calendar
Full Version: Random Background
Scenyx Entertainment Community > Xbox1 Forums > Dashboard Forums > Official Team UIX Forums > User.Interface.X (UIX) Code
Tru@ce
Hi smile.gif , credits to Outworld1 for this small code;

In default.xip/default.xap;

look for;

CODE
DEF myBackgroundList Group


and make it look like this;

CODE
DEF myBackgroundList Group
{

children
[
    DEF background0 Background{ skyColor 0 0 0 backdrop ImageTexture { url "background.xbx" }}
    DEF background1 Background{ skyColor 0 0 0 backdrop ImageTexture { url "background1.xbx" }}
    DEF background2 Background{ skyColor 0 0 0 backdrop ImageTexture { url "background2.xbx" }}
    DEF background3 Background{ skyColor 0 0 0 backdrop ImageTexture { url "background3.xbx" }}
    DEF background4 Background{ skyColor 0 0 0 backdrop ImageTexture { url "background4.xbx" }}
]
}

function loadBackground() {
var n = Math.round(Math.random() * (myBackgroundList.children.length() - 1));
myBackgroundList.children[n].isBound = true;  
}


then search for;

CODE
var currentTrack;


and paste this below;

CODE
var BeginUpdate;


then go to;

CODE
function UpdateMainMenu()
{
   if( m_nbuttons == 4 ) { Update4ButtonMainMenu(); }
   else  { Update3ButtonMainMenu(); }
}


and replace the function with this;

CODE
function setBeginUpdate()
{  
BeginUpdate = 1;
}

function UpdateMainMenu()
{      
 if (BeginUpdate == 1 )
 {
     loadBackground();
     BeginUpdate = 0;                
 }
 {
   if( m_nbuttons == 4 ) { Update4ButtonMainMenu(); }
  else  { Update3ButtonMainMenu(); }
 }
}


search for;

CODE
function OnYDown()


(or another)

and put this code in it;

CODE
      function OnYDown()
{
  setBeginUpdate();
  UpdateMainMenu();
}


Ciao wink.gif



BlackWraith
Nice post Tru@ce. Thanks a lot

MerDeNoms
Odb718
You should post how to make it so it will work with 03 and not just your skins' xips.
jacobesterque
has anyone revified that the coding works properly? i tried myself, and the only results i get are the colors always showing the first background image that i have.

and another reason i ask is because, the part that says:

QUOTE
In default.xip/default.xap;

look for;

CODE
DEF myBackgroundList Group

*



i could not find it. i was working off a fresh copy of user interface x. i looked and looked, and then realizaed by reading through old post for thc, that that specific code that you request us to look for is a code replaced from the original

CODE

DEF theBackground Background
jacobesterque
bump ... dork
Odb718
me and MerDeNoms and you have tried it out so it's 0 for 3....
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.