Help - Search - Members - Calendar
Full Version: Configurable 4 Tab Mod
Scenyx Entertainment Community > Xbox1 Forums > Dashboard Forums > Official Team UIX Forums > User.Interface.X (UIX) Code
XxXDarkwraitHXxX
This mod is to enable the switching between 3 and 4 tabs and to change the function of each tab without having to open the xap each time.


||||||||||||||||||||||||||||||||DEFAULT.XIP/DEFAULT.XAP||||||||||||||||||||||||||||||||

Search for:
CODE
function UpDateMainMenuButtonsText()


Replace the function with:
CODE

function UpDateMainMenuButtonsText()
{
   var IniFile = new Settings;
   IniFile.SetIniSection( "Main Menu Tabs" );
   var c = theMainMenu.children[0].children[0];
   c.Button_01_Text.geometry.text = IniFile.GetIniValue( "Tab Text 1" );
   c.Button_02_Text.geometry.text = IniFile.GetIniValue( "Tab Text 2" );
   c.Button_03_Text.geometry.text = IniFile.GetIniValue( "Tab Text 3" );
   c.Button_04_Text.geometry.text = IniFile.GetIniValue( "Tab Text 4" );
   IniFile.CloseIniFile();
}


Search for:
CODE
Control DEF theMainMenuJoy Joystick


Then replace the function with this:
CODE

         function OnADown()
         {
             PlaySoundA();
             if (nCurMainMenuItem == 0)
             {
                 MenuAction("1");
             }
             else if (nCurMainMenuItem == 1)
             {
                 MenuAction("2");
             }
             else if (nCurMainMenuItem == 2)
             {
                 MenuAction("3");
             }
             else if (nCurMainMenuItem == 3)
             {
                 MenuAction("4");
             }
         }


Then find under that:
CODE
m_nbuttons=3


Comment that out and add this under that:
CODE
SetTabsAmount();


Then add this to the bottom of the xap:
CODE

function SetTabsAmount()
{
   var IniFile = new Settings;
   IniFile.SetIniSection( "Tabs" );
   var Settabsn = IniFile.GetIniValue( "SETTABS" );
   IniFile.CloseIniFile();
   m_nbuttons = ReturnInteger(Settabsn);

}

function MenuAction(x)
{
    var menu = x;
    var IniFile = new Settings;
    IniFile.SetIniSection( "Main Menu Tabs" );
    var a = IniFile.GetIniValue( "Tab Action " + menu);
    IniFile.CloseIniFile();
    if (a == "RunMem")
    {
        theGamesMenuIn.Play();
        GoToMemory();
    }
    else if (a == "RunMusic")
    {
        theMusicMenuIn.Play();
        GoToMusic();
    }
    else if (a == "RunHDD")
    {
        theSettingsMenuIn.Play();
        GoToHardDrive();
    }
    else if (a == "RunSetting")
    {
        theSettingsMenuIn.Play();
        GoToSettings();
    }
    else if (a == "FileMan")
    {
        theSettingsMenuIn.Play();
        GoToFileManager();
    }
    else if (a == "LaunchDisc")
    {
        theDiscDrive.LaunchDisc();
    }
    else if (a == "Reboot")
    {
        theConfig.Reset();
    }
    else if (a == "Shutdown")
    {
        theConfig.PowerOff();
    }
    else if (a == "RestartDash")
    {
        theConfig.ReStartDash();
    }
    else if (a == "PowerCycle")
    {
        theConfig.PowerCycle();
    }
    else if (a != " ")
    {
        MenuLaunch(a);
    }
    return;
}

function MenuLaunch(x)
{
 var a = x;
 var launchPath;

 var b = a.substr(0,1);
 var c = a.indexOf("\\");
 var d = a.lastIndexOf("\\");
 var e;
 if(d > 4)
 {
      e = "\\" + a.substr(c + 2, d - 5);
 }
 else
 {
      e = "";
 }
 var launchXbe = a.substr(d + 1);
 if(b == "F")
 {
    launchPath = "\\Device\\Harddisk0\\Partition6" + e;
 }
 else if(b == "C")
 {
     launchPath = "\\Device\\Harddisk0\\Partition2" + e;
 }
 else if(b == "G")
 {
     launchPath = "\\Device\\Harddisk0\\Partition7" + e;
 }
 else if(b == "E")
 {
     launchPath = "\\Device\\Harddisk0\\Partition1" + e;
 }
 else
 {
     return;
 }
 launch (launchXbe, launchPath);
}


||||||||||||||||||||||||||||||||DEFAULT.XIP/DEFAULT.XAP||||||||||||||||||||||||||||||||

|||||||||||||||||||||||||||||||||DEFAULT.XIP/CONFIG.XAP||||||||||||||||||||||||||||||||

Look for:
CODE
function BuildMainList()


Then, just above:
CODE

ClearText();
UpdateText();


Add:
CODE

configList[i] = "Number of Tabs:";
configValues[i] = "c-Tabs-SETTABS";
configSelect[i] = "ToggleNbTabs()";
i = i + 1;


Then search for:
CODE

function BuildMMList()


And replace:
CODE

configList[i] = "Memory Tab Text:";
configValues[i] = "c-Main Menu Tabs-Tab Text 1";
configSelect[i] = "ConfigKeyB()";
i = i + 1;
configList[i] = "Music Tab Text:";
configValues[i] = "c-Main Menu Tabs-Tab Text 2";
configSelect[i] = "ConfigKeyB()";
i = i + 1;
configList[i] = "Hard Drive Tab Text:";
configValues[i] = "c-Main Menu Tabs-Tab Text 3";
configSelect[i] = "ConfigKeyB()";
i = i + 1;
configList[i] = "Settings Tab Text:";
configValues[i] = "c-Main Menu Tabs-Tab Text 4";
configSelect[i] = "ConfigKeyB()";
i = i + 1;


With:
CODE

configList[i] = "Tab 1 Text:";
configValues[i] = "c-Main Menu Tabs-Tab Text 1";
configSelect[i] = "ConfigKeyB()";
i = i + 1;
configList[i] = "Tab 1 Action:";
configValues[i] = "c-Main Menu Tabs-Tab Action 1";
configSelect[i] = "ConfigKeyB()";
i = i + 1;
configList[i] = "Tab 2 Text:";
configValues[i] = "c-Main Menu Tabs-Tab Text 2";
configSelect[i] = "ConfigKeyB()";
i = i + 1;
configList[i] = "Tab 2 Action:";
configValues[i] = "c-Main Menu Tabs-Tab Action 2";
configSelect[i] = "ConfigKeyB()";
i = i + 1;
configList[i] = "Tab 3 Text:";
configValues[i] = "c-Main Menu Tabs-Tab Text 3";
configSelect[i] = "ConfigKeyB()";
i = i + 1;
configList[i] = "Tab 3 Action:";
configValues[i] = "c-Main Menu Tabs-Tab Action 3";
configSelect[i] = "ConfigKeyB()";
i = i + 1;
configList[i] = "Tab 4 Text:";
configValues[i] = "c-Main Menu Tabs-Tab Text 4";
configSelect[i] = "ConfigKeyB()";
i = i + 1;
configList[i] = "Tab 4 Action:";
configValues[i] = "c-Main Menu Tabs-Tab Action 4";
configSelect[i] = "ConfigKeyB()";
i = i + 1;


Search for:
CODE
function ToggleXBE Names()


Under that function add:
CODE

function ToggleNbTabs()
{
   var c = theConfigPanel.children[0].children[0];
   var b = c.theRightSlots.children[LV2Item].children[0].geometry.text;
   if(b.toLowerCase() == "3") { RefreshMenu("4"); }
   else if(b.toLowerCase() == "4") { RefreshMenu("3"); }
}


|||||||||||||||||||||||||||||||||DEFAULT.XIP/CONFIG.XAP||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||UIX.INI|||||||||||||||||||||||||||||||||||||||||||

Replace the section:
CODE
[Main Menu Tabs]


With:
CODE

[Main Menu Tabs]
Tab Action 2=RunHDD
Tab Action 3=F:\\apps\\xbmc\\default.xbe
Tab Action 4=RunSetting
Tab Action 1=RunMusic
Tab Text 2=Hard Drive
Tab Text 3=XBMC
Tab Text 4=System
Tab Text 1=Music


And add this to the bottom:
CODE

[Tabs]
SETTABS=4


||||||||||||||||||||||||||||||||||||||||||||UIX.INI|||||||||||||||||||||||||||||||||||||||||||

The actions for the tabs are:
File Manager: FileMan
Settings: RunSetting
Memory: RunMem
Music: RunMusic
Hard Drive: RunHDD
Launch DVD In the Disk Drive: LaunchDisc
Shutdown: Shutdown
Reboot: Reboot
Restart Dash: RestartDash
Power Cycle: PowerCycle

And if you want to launch an app from the main menu just point to it. An Example: F:\\apps\\xbmc\\default.xbe. You MUST have the double slashes. I take no credit for this. The credit goes to Kavap at gueux. Thanks!
Odb718
QUOTE
The credit goes to Kavap at gueux. Thanks!

Kavap huh?
XxXDarkwraitHXxX
QUOTE(Odb718 @ Jun 30 2005, 02:50 PM)
Kavap huh?
*


I took some of his 5 tab mod code to make this.
Vinel
I followed all the instructions and when started from xbmc it just goes back to the main menu. could you please post or send me the files, uix.ini and default.xip already modded @ chumbert@comcast.net. Thanks!
Vinel
Or just post the entire files's contents
sgtrama
So I have the default XIPs that I just got of #xbins, and I'm having a few problems here...

QUOTE(XxXDarkwraitHXxX @ Jun 29 2005, 08:12 PM)
Then find under that:
CODE
m_nbuttons=3


Comment that out and add this under that:
CODE
SetTabsAmount();



I didn't find that line, but I found something similiar:
CODE

       function OnLeftThumbMoveUp()
       {
           if (nCurMainMenuItem > 0)
           {
               nCurMainMenuItem = nCurMainMenuItem - 1;
               if( m_nbuttons == 3)
               {
                   if( 2 == nCurMainMenuItem ) {nCurMainMenuItem = nCurMainMenuItem - 1; }
               }
               theMainMenuBackward.Play();
               UpdateMainMenu();
           }
       }

       function OnLeftThumbMoveDown()
       {
           if (nCurMainMenuItem < 3)
           {
               nCurMainMenuItem = nCurMainMenuItem + 1;
               if( m_nbuttons == 3 )
               {
                   if( 2 == nCurMainMenuItem ) { nCurMainMenuItem = nCurMainMenuItem + 1; }
               }
               theMainMenuForward.Play();
               UpdateMainMenu();
           }
       }
   }


But I don't particularly see WHAT to comment out. Do I comment out the m_buttons ==3 and add that, or do I comment out the whole if line? Or what?

Next problem:

QUOTE
|||||||||||||||||||||||||||||||||DEFAULT.XIP/CONFIG.XAP||||||||||||||||||||||||||||||||


Search for:
CODE
function ToggleXBE Names()


Under that function add:
CODE

function ToggleNbTabs()
{
   var c = theConfigPanel.children[0].children[0];
   var b = c.theRightSlots.children[LV2Item].children[0].geometry.text;
   if(b.toLowerCase() == "3") { RefreshMenu("4"); }
   else if(b.toLowerCase() == "4") { RefreshMenu("3"); }
}



Didn't find that line at all...

I didn't bother going any further.

Is there something I'm missing here? Should I have something BEFORE this? Or do my file just suck?
matt223
I'm having the same problem, and nobody has replied to you in over a month, so I think I will just go and slit my wrists.
Vinel
just use the 6 tab mod its better
Rezzo
(have a few little errors but..)

thanks XxXDarkwraitHXxX, this code work great! Finally i have mi UIX with 4 tabs. tongue.gif
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.