Orig thread by me!
http://forums.xbox-s...howtopic=218671This might help for those who have newer *Lite* dashes with the config.xap. I've modified the code slightly so that you can step through each background and loads the last set background from the Config file (Config.xbx).
Heres the code that I adapted from fornorst & vintster
default.xip/default.xap
First off you need a global variable to track which BG is loaded. So enter this
right after this:
CODE |
var CurrentGameBoardAltViewpoint; |
Now look for this:
CODE |
DEF theSkinBackground Background |
Then add this code below that function. Here I added a background with no image so that you can easily turn off the background.
CODE |
DEF myBackgroundList Group { children [ DEF background0 Background{ skyColor 0 0 0 backdrop ImageTexture { url "" }} DEF background1 Background{ skyColor 0 0 0 backdrop ImageTexture { url "Background.xbx" }} DEF background2 Background{ skyColor 0 0 0 backdrop ImageTexture { url "Background1.xbx" }} ] }
function loadBackground(n) { //var n = Math.round(Math.random() * (myBackgroundList.children.length() - 1)); var m = myBackgroundList.children.length(); if(n > (m-1)) { n = 0; nBG = 0; } myBackgroundList.children[n].isBound = true; } |
Go down too:
CODE |
DEF theMainMenu Level |
Go down until you see:
Just put this above it:
Now go to:
CODE |
DEF theMainMenuJoy Joystick |
Go down until you see:
CODE |
function OnBlackDown() |
And replace it with:
CODE |
function OnBlackDown() { if((RightTrigger == true) & (LeftTrigger == true)) { ChangeCBG(); } else { theGameBoardLayer.visible = true; theGameBoardInline.children[0].theGameBoardDisplay.fade = 1; theGameBoardInline.children[0].theGameBoardDisplay.SetAlpha(1); theGameBoardInline.children[0].theGameBoardDisplay.SetTranslation(-47.5,47.5,-20); theGameBoardInline.children[0].theGameBoardDisplay.SetRotation(-0.0001,0,0,0.54); theGameBoardControlsInline.children[0].InitializeGame(); thePlayerPanelIn.Play(); StartGameBoardView(); } } |
Now look for:
And add these functions after that function:
CODE |
function GetCBG() { var info = new Settings; info.file = "Y:\\config.xbx"; var cbg = info.GetValue("CurrentBackground"); nBG = ReturnInteger(cbg); loadBackground(nBG); }
function ChangeCBG() { nBG = nBG + 1; loadBackground(nBG); var info = new Settings; info.file = "Y:\\config.xbx"; var ccbg = info.SetValue("CurrentBackground", nBG); } |
Save!
Now in Config.xbx add this at the top:
To add more backgrounds put them in the skins.xip and edit the default.xap like this for each background added:
CODE |
DEF Background1 Transform { children [ Shape { appearance Appearance { texture ImageTexture { url "Background1.xbx" } } geometry Mesh { url "skin.xm" } } ] translation 0 0 300 } DEF Background2 Transform { children [ Shape { appearance Appearance { texture ImageTexture { url "Background2.xbx" } } geometry Mesh { url "skin.xm" } } ] translation 0 0 300 } |
now you are done to use just hold down left & right triggers and black to change backgrounds
will add code so you can move forwards and backward and maybe a full screen so you can see the hole background