Help - Search - Members - Calendar
Full Version: New Info Panel
Scenyx Entertainment Community > Xbox1 Forums > Dashboard Forums > Official Team UIX Forums > User.Interface.X (UIX) Code
shank-
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
shank-
its seems it wont let imageshack host
you will have to take away the dash's from imageshack to view files..

http://img80.-imageshack-.us/img80/3566/cputemp1rj.jpg
http://img295.-imageshack-.us/img295/7562/music3dx.jpg
http://img295.-imageshack-.us/img295/3117/disctype5wo.jpg
http://img295.-imageshack-.us/img295/4505/network8ip.jpg

anyways you get the idea..
cheers.
coltxL2717
That's some nice code there man. I especially like the fact that you included album art. That's good shit.
ih8ny4ever
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
neovash
they are in the Commemorative Build
slick50zd
wow great job man i give you props
motox88
would it be possible to post up the screen shots again?
Little-G
screen shots work fine remove the '-' from before and after 'imageshack'
Little-G
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?
Little-G
why is no one willing to spend a minute or two to help? im sure someone can help me sad.gif
t1x2irc2

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

shank-
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
Little-G
how are you selecting those? i have the same issue as ih8ny4ever it reboots after pressing left thumb twice
Dazza
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.

shank-
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
Little-G
biggrin.gif it was that simple, thanks for telling me, couldve been along time biggrin.gif
blondiegoth
Anyone care to help me wright the rest of this. I have thought on it, but cannot seem to figure it out. Here is what I am trying to acomplish


Under config.xap/default.xip

section function BuildMainList()

below
configList[i] = "Music Initial Volume:";
configValues[i] = "c-Music On Boot-volume";
configSelect[i] = "ConfigKeyB()";
i = i + 1;

add
configList[i] = "Show Info Panel:";
configValues[i] = "c-Info Panel-show infopanel";
configSelect[i] = "ToggleShowInfoPanel()";
i = i + 1;

I am basically trying to duplicate the idea of the use xbe names look, but instead, to activate/deactivate the info panel. Any help would be appricated.
Odb718
All you should realy have to do is replace
CODE
function ApplyDashStyle()
{

with
CODE
function ToggleInfoPanel()
}
    var IniFile = new Settings;
    IniFile.SetIniSection( "Info Panel" );
    infoPanel = IniFile.GetIniValue( "show infopanel" );
    IniFile.CloseIniFile();
    var c = theMainMenu.children[0].children[0];
    if ( infoPanel = true ) { c.theMainMenuClock.isvisible = true; }
    else if ( infoPanel = false ) { c.theMainMenuClock.isvisible = false; }
}

function ApplyDashStyle()
{    
ToggleInfoPanel();

then in your config mode you should just change the "ToggleShowInfoPanel()" to "ToggleTF()" so it looks like

CODE
configList[i] = "Show Info Panel:";
configValues[i] = "c-Info Panel-show infopanel";
configSelect[i] = "ToggleTF()";
i = i + 1;
Make sure you got the uix.ini set up so it can find the info.

BUT! It's been well over a year since I've scripted for 01.03.05 SO! if this doesn't work... then it's something very similar tongue.gif
I think the .isvisible would be the problem if anything and the fact that Im not sure if theMainMenuClock is the entire panel. You might have to add some c.thewhateverisstillshowingup.isvisible = false; untill you get everything off the screen. If this don't work then use it for ideas on which way you should go. GL beerchug.gif
shank-
i dont understand what you are trying to accomplish but if it is to change the visability of the panel here is what i use

put this ontop of :
function OnYDown()

CODE


        function OnXDown()
        {
        var c = theMainMenu.children[0].children[0];
        if ( c.theMainMenuClock.visible )
         {c.theMainMenuClock.visible = false;}
         else
         {c.theMainMenuClock.visible = true;}
        }

Odb718
yeah he wants the ini to controll if the panel is visible on boot up.
but that'd be good so if he's in the main menu and the ini has it set to off then he can see it if he wants.
beerchug.gif
ILTB
SHANK! Long time no see.
Where the Fark u been? tongue.gif

beerchug.gif
shank-
PSP ownz me now smile.gif
the xbox scene slowed down too much imo
blondiegoth
Hey guys,

I played arround enough to get this to work my way (using the ini to determine if info panel should be shown on boot). Here is the code for it incase anyone else wants it this way.

In default.xip/default.xap

look for:
CODE

theMusicPlayer.volume = c;
}

and insert this below it
CODE

function showinfo()
        {
    var IniFile = new Settings;
    IniFile.SetIniSection( "Show Info Panel" );
    var a = IniFile.GetIniValue( "visible" );
    IniFile.CloseIniFile();
        var c = theMainMenu.children[0].children[0];
        if ( a == "false" ) {c.theMainMenuClock.visible = false;}
         else
         {c.theMainMenuClock.visible = true;}
        }


then look for:
CODE

c.Main_memory_ringpin_4.SetTranslation(57.430000, -23.379999, 101.500000);
}
MusicOnBootCheck();


and insert this below it:
CODE

showinfo();



Move to the default.xip/config.xap

find this section:
CODE

configList[i] = "Music Initial Volume:";
    configValues[i] = "c-Music On Boot-volume";
    configSelect[i] = "ConfigKeyB()";
    i = i + 1;

and insert this below it
CODE

configList[i] = "Show Info Panel:";
    configValues[i] = "c-Show Info Panel-visible";
    configSelect[i] = "ToggleTF()";
    i = i + 1;


and finally, insert this at the bottom of your uix.ini file
CODE

[Show Info Panel]
visible=true



Hope this helps at least one person out. I had fun digging through it.




P.S.

Thanks Shank. I left your onXdown function in my code as well for on the fly changes. It wasn't really an interest at first, but I kinda like it now.

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.