Configurable Main MenuSearch Default.xip / Default.Xap for
CODE
c.Button_01_Text.geometry.text = IniFile.GetIniValue( "Main Tab 1" );
c.Button_02_Text.geometry.text = IniFile.GetIniValue( "Main Tab 2" );
c.Button_03_Text.geometry.text = IniFile.GetIniValue( "Main Tab 3" );
c.Button_04_Text.geometry.text = IniFile.GetIniValue( "Main Tab 4" );
and change to:
CODE
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" );
Locate:
CODE
control DEF theMainMenuJoy Joystick
{
function OnADown()
{
PlaySoundA();
and replace:
CODE
if(nCurMainMenuItem == 0)
{
theMusicMenuIn.Play();
GoToMusic();
}
else if(nCurMainMenuItem == 1)
{
theSettingsMenuIn.Play();
GoToHardDrive();
}
else if(nCurMainMenuItem == 2)
{
}
else if(nCurMainMenuItem == 3)
{
theSettingsMenuIn.Play();
GoToSettings();
}
}
with:
CODE
//
// CONFIGURABLE MAIN MENU ACTIONS, FROM 'n3wbie' tHC LITE CODE.
//
// Select menu action.
//
if (nCurMainMenuItem == 0)
{
MenuAction("1");
}
else if (nCurMainMenuItem == 1)
{
MenuAction("2");
}
else if (nCurMainMenuItem == 2)
{
MenuAction("3");
}
else if (nCurMainMenuItem == 3)
{
MenuAction("4");
}
Locate:
CODE
//InitializeMenus(); //not needed with new hd menu - use to init menus if using drop down menus
m_nbuttons = 3;//number of buttons in main menu
and change to:
CODE
m_nbuttons = 4; //number of buttons in main menu
Add the following functions to the end of the file:
CODE
//
// CONFIGURABLE MAIN MENU ACTIONS, FROM 'n3wbie' tHC LITE CODE.
//
// Launch Menu Actions.
//
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 != " ")
{
MenuLaunch(a);
}
return;
}
//
// CONFIGURABLE MAIN MENU ACTIONS, FROM 'n3wbie' tHC LITE CODE.
//
// Launch custom actions, Code from tHC Lite QuickLaunch() function.
//
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);
}
Update 'uix.ini', and rearrange (any order) as you like. 'RunSetting', 'RunHDD', 'RunMusic' & 'RunMem' are variables to access 'Settings', 'Hard Drive', 'Music', or 'Memory' sub menus.
[Main Menu Tabs]
Tab Text 4=SETTINGS
Tab Text 3=MEDIA CENTER
Tab Text 2=HARD DRIVE
Tab Text 1=MUSIC
Tab Action 4=RunSetting
Tab Action 3=E:\\Apps\\XBMC\\default.xbe
Tab Action 2=RunHDD
Tab Action 1=RunMusic
Done! <