Jump to content


Photo

Configurable 4 Tab Mod


  • Please log in to reply
8 replies to this topic

#1 XxXDarkwraitHXxX

XxXDarkwraitHXxX

    X-S Expert

  • Members
  • PipPipPip
  • 650 posts
  • Location:SoCal
  • Xbox Version:v1.6b
  • 360 version:v4.0 (jasper)

Posted 30 June 2005 - 12:01 AM

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!

#2 Odb718

Odb718

    X-S Freak

  • Last Chance
  • PipPipPipPipPip
  • 1,589 posts
  • Xbox Version:v1.0
  • 360 version:v1 (xenon)

Posted 30 June 2005 - 10:39 PM

QUOTE
The credit goes to Kavap at gueux. Thanks!

Kavap huh?

#3 XxXDarkwraitHXxX

XxXDarkwraitHXxX

    X-S Expert

  • Members
  • PipPipPip
  • 650 posts
  • Location:SoCal
  • Xbox Version:v1.6b
  • 360 version:v4.0 (jasper)

Posted 01 July 2005 - 01:40 AM

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

View Post


I took some of his 5 tab mod code to make this.

#4 Vinel

Vinel

    X-S Enthusiast

  • Members
  • 4 posts
  • Location:USA
  • Xbox Version:v1.6

Posted 06 July 2005 - 05:03 PM

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!

#5 Vinel

Vinel

    X-S Enthusiast

  • Members
  • 4 posts
  • Location:USA
  • Xbox Version:v1.6

Posted 07 July 2005 - 01:02 AM

Or just post the entire files's contents

#6 sgtrama

sgtrama

    X-S Enthusiast

  • Members
  • 28 posts
  • Location:Da Tru Coop, FLA
  • Xbox Version:v1.0

Posted 08 July 2005 - 04:11 PM

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?


#7 matt223

matt223

    X-S Enthusiast

  • Members
  • 3 posts

Posted 17 August 2005 - 08:40 PM

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.

#8 Vinel

Vinel

    X-S Enthusiast

  • Members
  • 4 posts
  • Location:USA
  • Xbox Version:v1.6

Posted 17 August 2005 - 10:36 PM

just use the 6 tab mod its better

#9 Rezzo

Rezzo

    X-S Young Member

  • Members
  • Pip
  • 57 posts
  • Xbox Version:none
  • 360 version:v3.0 (falcon)

Posted 27 September 2005 - 06:38 AM

(have a few little errors but..)

thanks XxXDarkwraitHXxX, this code work great! Finally i have mi UIX with 4 tabs. tongue.gif




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users