Jump to content


Photo

New Info Panel


  • Please log in to reply
22 replies to this topic

#1 shank-

shank-

    X-S Enthusiast

  • Members
  • 16 posts

Posted 05 July 2005 - 11:46 AM

this is an info panel i came up with, i felt the others crouded the screen too much having info and clock seperate.
full credit goes out to the original creators of the info panels, i just copy and pasted most of there code.

music
disc type
ip address
disc space
cpu temp

paste at the very bottom of default.xip/default.xap

CODE

function DriveSpace( sDrive )
{
var nFreeSpace = theHardDrive.GetFreeSpace(sDrive + "\\");
     var nTotalSpace = theHardDrive.GetTotalSpace(sDrive + "\\");
if (nTotalSpace == 0) { return ""; }
return nFreeSpace + "MB";
}

function ChangeDisplay()
{

var coverpath;
var exists;
var albumtext = "";
var songtext = "";
var drive = "";
var c = theMainMenu.children[0].children[0];

var nMaxDisplay = 6;
if (nDisplayNum > nMaxDisplay) { nDisplayNum = 1; }
if (nDisplayNum < 1) { nDisplayNum = nMaxDisplay; }
var nIntTemp = theConfig.GetInternalTemp();
var nCPUTemp = theConfig.GetCPUTemp();
var sScale = "C";
var e = "";


 if( e == "fahrenheit" )
 {
     sScale = "F";
            nIntTemp = Math.round(nIntTemp * 9/5 + 32);
            nCPUTemp = Math.round(nCPUTemp * 9/5 + 32);
 }
 else if( e == "kelvin" )
 {
     sScale = "K";
            nIntTemp = nIntTemp + 273;
            nCPUTemp = nCPUTemp + 273;
 }

if (nDisplayNum == 1)
{
   albumtext = theMusicCollection.GetSoundtrackName(currentAlbum);
   songtext = theMusicCollection.GetSoundtrackSongName(currentAlbum, currentTrack);
   coverpath = "A:\\album covers\\" + albumtext + ".jpg";
   exists = theHardDrive.FileExists( coverpath );

   if( exists == true )
   {
   c.theScreenAlbumArt.url = coverpath;
   }
   else
   {
   c.theScreenAlbumArt.url = "A:\\album covers\\dvdempty.xbx";
   }
   }

else if (nDisplayNum == 2)
{
   albumtext = "Disc Type:";
   songtext = theDiscDrive.discType;

   if( theDiscDrive.discType == "Video" )
   {
   c.theScreenAlbumArt.url = "A:\\album covers\\dvdvideo.xbx";
   }

   else if(theDiscDrive.discType == "Title")
   {
   c.theScreenAlbumArt.url = "A:\\album covers\\dvdtitle.xbx";
   }

   else if(theDiscDrive.discType == "none")
   {
   c.theScreenAlbumArt.url = "A:\\album covers\\dvdempty.xbx";
   }

   else if(theDiscDrive.discType == "Audio")
   {
   c.theScreenAlbumArt.url = "A:\\album covers\\dvdaudio.xbx";
   }

   else if(theDiscDrive.discType == "unknown")
   {
   c.theScreenAlbumArt.url = "A:\\album covers\\dvdunknown.xbx";
   }
}

else if (nDisplayNum == 3)
{
   albumtext = "IP Address:";
   songtext = theXboxNetwork.GetXboxIP();
   c.theScreenAlbumArt.url = "A:\\album covers\\ipaddy.xbx";
}

else if (nDisplayNum == 4)
{
   drive = "F:";
   albumtext = "Free Space On F:";
   songtext = DriveSpace(drive);
   c.theScreenAlbumArt.url = "A:\\album covers\\harddisc.xbx";
}

//else if (nDisplayNum == 5)
//{
//    drive = "G:";
//    albumtext = "Free Space On G:";
//    songtext = DriveSpace(drive);
//    c.theScreenAlbumArt.url = "A:\\album covers\\dvdempty.xbx";
//}

else if (nDisplayNum == 5)
{
   albumtext = "CPU Temp:";
   songtext = nIntTemp + " " + sScale;
   c.theScreenAlbumArt.url = "A:\\album covers\\info.xbx";
}

else if (nDisplayNum == 6)
{
   albumtext = "MB Temp:";
   songtext = nCPUTemp + " " + sScale;
   c.theScreenAlbumArt.url = "A:\\album covers\\info.xbx";
}

c.theSoundtrackSongInfoText.text = songtext;
c.theSoundtrackAlbumInfoText.text = albumtext;

}



Then find:
CODE


function MusicPlayerPlay()
{
theMusicPlayer.url = "st:" + theMusicCollection.GetSoundtrackSongID( currentAlbum, currentTrack );
log("Playing " + theMusicPlayer.url);
DisableAmbientAudio();
theMusicPlayer.Play();
}



and add another line so it looks like this:

CODE


function MusicPlayerPlay()
{
theMusicPlayer.url = "st:" + theMusicCollection.GetSoundtrackSongID( currentAlbum, currentTrack );
log("Playing " + theMusicPlayer.url);
DisableAmbientAudio();
theMusicPlayer.Play();
if (nDisplayNum == 1) { ChangeDisplay(); }
}



next find

CODE


var currentAlbum;
var currentTrack;



and put this under:

CODE


var nDisplayNum;



scroll down a few lines to find:

CODE


currentAlbum = 0;
currentTrack = 0;



and add this right after:

CODE


nDisplayNum = 1;



now find:

CODE


 control DEF theMainMenuJoy Joystick
 {



and put this after that slash

CODE


function OnLeftThumbDown()
{
         PlaySoundB();
  nDisplayNum = nDisplayNum + 1;
  ChangeDisplay();
}

     function OnRightThumbDown()
{
         PlaySoundB();
  nDisplayNum = nDisplayNum - 1;
  ChangeDisplay();
}



another thing i like to use is this:

CODE


function OnYDown()
     {

      var c = theMainMenu.children[0].children[0];
      if ( c.theMainMenuClock.visible == true )
      {
       if (nDisplayNum == 1)
       {
        MusicPlayerRandom();
       }
       else if (nDisplayNum == 2)
       {
        AutoLaunch();
       }
      }
      else
      {}

     }            



that code will alow you to change track when in music panel and launch disc when in disc type by pressing the Y button

now open main_menu.xip/default.xap and paste this at the very bottom

CODE


DEF theMainMenuClock Transform
       {
       visible true
       fade 0.75
           children
           [
               DEF theMainMenuClock3 Transform
               {
                   children
                   [
                       Shape
                       {
                           appearance Appearance
                           {
                               material MaxMaterial
                               {
                                   name "Black80"
                               }
                               /*texture ImageTexture
                               {
                                   url "panel8.tga"
                               }*/
                           }
                           geometry DEF MU_panel_backing-FACES Mesh { url "MU_panel_backing-FACES.xm" }
                       }
                   ]
                   rotation -0.999200 -0.027600 0.027600 -1.572000
                   scale 0.492900 0.492900 0.492900
                   scaleOrientation -0.022670 0.396500 0.917700 -0.008776
                   translation -0.821800 -1.632000 0.457700
               }
               DEF MEM_L1_panel_meta Transform
               {
                   children
                   [
                       Shape
                       {
                           appearance Appearance
                           {
                               material MaxMaterial
                               {
                                   name "MenuCell"  //"GamePodb"
                               }
                           }
                           geometry DEF MEM_L1_panel_meta-FACES Mesh { url "MEM_L1_panel_meta-FACES.xm" }
                       }
                   ]
                   rotation -1.000000 0.000000 0.000000 -1.571000
                   scale 0.019720 0.019720 0.019720
                   translation -2.112000 -0.431600 0.021390
               }
               DEF theDateTime Transform
               {
                   children
                   [
                       Shape
                       {
                           appearance Appearance
                           {
                               material MaxMaterial
                               {
                                  name "NavType"
                               }
                           }
                           geometry DEF theDateTimeText Text { font "Heading" justify "middle" translate false text "<clock>"}
                       }
                   ]
                   scale 0.563580 0.563580 0.563580
                   translation -1.101000 1.370000 0.059800
               }
               DEF theSoundtrackAlbumInfo Transform
               {
                   children
                   [
                       Shape
                       {
                           appearance Appearance
                           {
                               material MaxMaterial
                               {
                                   name "CellEgg/Partsz"
                               }
                           }

                           geometry DEF theSoundtrackAlbumInfoText Text { font "Body" justify "left" width -9 translate false text "albumtext"}
                       }
                   ]
                   //rotation -1.000000 0.000000 0.000000 -1.571000
                   scale 0.7000 0.7000 0.063580
                   translation -4.03000 0.629800 0.059800
               }
               DEF theSoundtrackSongInfo Transform
               {
                   children
                   [
                       Shape
                       {
                           appearance Appearance
                           {
                               material MaxMaterial
                               {
                                   name "NavType"
                               }
                           }
                           geometry DEF theSoundtrackSongInfoText Text { font "body" translate false width -7 scrollRate 0.85 scrollDelay 0.2 text "songtext" justify "left"}
                       }
                   ]
                   //rotation -1.000000 0.000000 0.000000 -1.571000
                   scale .9 0.7000 0.063580
                   translation -4.035800 -.47500 0.059800
               }
               DEF MEM_L1_panel_metasupport Transform
               {
                   children
                   [
                       Shape
                       {
                           appearance Appearance
                           {
                               material MaxMaterial
                               {
                                   name "JwlSrfc01/InfoPnls"
                               }
                           }
                           geometry DEF MEM_L1_panel_metasupport-FACES Mesh { url "MEM_L1_panel_metasupport-FACES.xm" }
                       }
                   ]
                   rotation 1.000000 0.000000 0.000000 -1.571000
                   scale 0.021480 0.021480 0.021480
                   translation 0.108300 -1.269000 -0.075180
               }
               DEF MEM_L1_text_totalmemory Transform
               {
                   children
                   [
                       Shape
                       {
                           appearance Appearance
                           {
                               material MaxMaterial
                               {
                                   name "NavType"
                               }
                           }
                           geometry Text { font "Body" text "" justify "end" }
                       }
                   ]
                   //rotation -1.000000 0.000000 0.000000 -1.571000
                   scale 0.663580 0.663580 0.063580
                   translation -0.155800 -0.107500 0.059800
               }
               DEF MEM_L1_text_473blocks Transform
               {
                   children
                   [
                       Shape
                       {
                           appearance Appearance
                           {
                               material MaxMaterial
                               {
                                   name "CellEgg/Partsz"
                               }
                           }
                           geometry DEF AvailableMemoryText Text { font "Body" translate false }
                       }
                   ]
                   //rotation -1.000000 0.000000 0.000000 -1.571000
                   scale 0.663580 0.663580 0.663580
                   translation 0.155800 -0.666500 0.059800
               }
               DEF MEM_L1_text_8000blocks Transform
               {
                   children
                   [
                       Shape
                       {
                           appearance Appearance
                           {
                               material MaxMaterial
                               {
                                   name "CellEgg/Partsz"
                               }
                           }
                           geometry DEF TotalMemoryText Text { font "Body" translate false }
                       }
                   ]
                   //rotation -1.000000 0.000000 0.000000 -1.571000
                   scale 0.663580 0.663580 0.663580
                   translation 0.155800 -0.107500 0.059800
               }
               DEF DVDStatusIcon Transform
               {
                   children
                   [
                       Shape
                       {
                           appearance Appearance
                           {
                           material Material
                           {
                           }
                               texture DEF theScreenAlbumArt ImageTexture
                               {
                                   alpha true
                                   url "A:\album covers\dvdempty.xbx"
                               }
                           }
                            geometry Box
                                       {
                                       }
                       }
                   ]
                   scale 2.4 2.3 0
                   translation 3.655800 0.107500 0.059800
                   rotation 0 0 1 3.141592654
               }


           ]
           scale 18 18 18
           translation -105 -110 5
       }



you also need to copy these files from the memory.xip file and paste them into main_menu.xip

MEM_L1_panel_meta-FACES.xm
MEM_L1_panel_metasupport-FACES.xm
MU_panel_backing-FACES.xm

now you need to use files from comm build and paste them in the album covers directory. the files needed are:

dvdaudio.xbx
dvdempty.xbx
dvdtitle.xbx
dvdunknown.xbx
dvdvideo.xbx

others are custom files but you can just copy and rename dvdempty.xbx to:

harddisc.xbx
info.xbx
ipaddy.xbx

and thats SHOULD be it

good luck smile.gif

#2 shank-

shank-

    X-S Enthusiast

  • Members
  • 16 posts

Posted 05 July 2005 - 11:54 AM

its seems it wont let imageshack host
you will have to take away the dash's from imageshack to view files..

http://img80.-images.../cputemp1rj.jpg
http://img295.-image...62/music3dx.jpg
http://img295.-image...disctype5wo.jpg
http://img295.-image.../network8ip.jpg

anyways you get the idea..
cheers.

#3 coltxL2717

coltxL2717

    X-S X-perience

  • Members
  • PipPip
  • 319 posts
  • Location:Los Angeles, CA, USA
  • Interests:Girl friend, skateboarding, music, movies, xbox
  • Xbox Version:v1.3

Posted 05 July 2005 - 11:32 PM

That's some nice code there man. I especially like the fact that you included album art. That's good shit.

#4 ih8ny4ever

ih8ny4ever

    X-S Enthusiast

  • Members
  • 1 posts

Posted 01 November 2005 - 05:29 AM

im sorry but for some reason every time i press the right analog it restarts and if i press the leht it says no disk and if i press it again it resarts. can someone help. is it posiple that it could be that i dont have these. i dont know where to get them dvdaudio.xbx
dvdempty.xbx
dvdtitle.xbx
dvdunknown.xbx
dvdvideo.xbx

Edited by ih8ny4ever, 01 November 2005 - 05:32 AM.


#5 neovash

neovash

    X-S Enthusiast

  • Members
  • 5 posts

Posted 01 November 2005 - 09:35 PM

they are in the Commemorative Build

#6 slick50zd

slick50zd

    X-S Member

  • Members
  • Pip
  • 90 posts
  • Xbox Version:v1.0

Posted 11 December 2005 - 11:11 PM

wow great job man i give you props

#7 motox88

motox88

    X-S Enthusiast

  • Members
  • 22 posts

Posted 09 January 2006 - 06:21 AM

would it be possible to post up the screen shots again?

#8 Little-G

Little-G

    X-S Senior Member

  • Members
  • PipPip
  • 176 posts
  • Xbox Version:v1.4
  • 360 version:v3.0 (falcon)

Posted 09 January 2006 - 05:26 PM

screen shots work fine remove the '-' from before and after 'imageshack'

#9 Little-G

Little-G

    X-S Senior Member

  • Members
  • PipPip
  • 176 posts
  • Xbox Version:v1.4
  • 360 version:v3.0 (falcon)

Posted 11 January 2006 - 07:21 PM

in an attempt to resolve the non displaying ip adress, cpu temp and free disk space i modified the code

i changed

CODE
function OnLeftThumbDown()
{
         PlaySoundB();
  nDisplayNum = nDisplayNum + 1;
  ChangeDisplay();


to

CODE
function OnLeftThumbDown()
{
         PlaySoundB();
  TogglenDisplayNum();
  ChangeDisplay();


and added
CODE
function TogglenDisplayNum
}
var c = theMainMenu.children[0].children[0];
if (b.toLowerCase() == "1") { RefreshMenu("2"); }
else if (b.toLowerCase() == "2") { RefreshMenu("3"); }
else if (b.toLowerCase() == "3") { RefreshMenu("4"); }
else if (b.toLowerCase() == "5") { RefreshMenu("6"); }
else if (b.toLowerCase() == "6") { RefreshMenu("1"); }
{

to the bottom of default .xap

does this code belong in config.xap/main menu.xip, or is it flawed? can someone with experience of uix code tell me?

#10 Little-G

Little-G

    X-S Senior Member

  • Members
  • PipPip
  • 176 posts
  • Xbox Version:v1.4
  • 360 version:v3.0 (falcon)

Posted 14 January 2006 - 11:41 AM

why is no one willing to spend a minute or two to help? im sure someone can help me sad.gif

#11 t1x2irc2

t1x2irc2

    X-S Member

  • Members
  • Pip
  • 68 posts

Posted 14 January 2006 - 03:28 PM


i really haven't look through the whole code

but my guess would be

you want default.xip/config.xap

or

default.xip/default.xap


let me know if that works 4 ya



#12 shank-

shank-

    X-S Enthusiast

  • Members
  • 16 posts

Posted 16 January 2006 - 06:57 AM

non displaying ip adress, cpu temp and free disk space ?

if u r talking about the images i can post them if you would like...
also while im here...
IPB Image

IPB Image

IPB Image

IPB Image

IPB Image


#13 Little-G

Little-G

    X-S Senior Member

  • Members
  • PipPip
  • 176 posts
  • Xbox Version:v1.4
  • 360 version:v3.0 (falcon)

Posted 16 January 2006 - 08:15 PM

how are you selecting those? i have the same issue as ih8ny4ever it reboots after pressing left thumb twice

#14 Dazza

Dazza

    X-S Young Member

  • Members
  • Pip
  • 30 posts
  • Location:Rugby, England
  • Xbox Version:v1.2

Posted 16 January 2006 - 10:01 PM

It should not be too difficult to get this working....

The code states that you need to create these 3 files

harddisc.xbx
info.xbx
ipaddy.xbx

Have you done that?

Mine would not work so I went through and commented out all of the references to a:/ and that fixed it.



#15 shank-

shank-

    X-S Enthusiast

  • Members
  • 16 posts

Posted 17 January 2006 - 06:46 AM

extract these into album covers folder and everything should be sweet
info icons
i should have posted them at the start
please post resaults. its been a while smile.gif




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users