||||||||||||||||||||||||||||||||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!
