creatx Posté(e) le 3 mars 2005 Posté(e) le 3 mars 2005 Y a-t-il une personne qui m’aider, J’ai essayer de transférer la fonction QuickLaunch de ThC Lite dans UIX mais ca ne fonction pas. 1- Déclaration des variables juste avant la fonction : function initialize() var LaunchPath; var LaunchXBE; var quicklaunch; 2- Initialisation des variables dans la fonction : function initialize() quicklaunch = false; 3- La fonction pour l'execution des raccourcis function QuickLaunch(x){ quicklaunch = true; var g = x; var IniFile = new Settings; IniFile.SetIniSection( "Raccourci" ); IniFile.file = "A:\\System\\uix.ini"; var a = IniFile.GetIniValue("Raccourci Bouton " + g); 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 f = a.substr(d + 1); if(b == "F") { LaunchPath = "\\Device\\Harddisk0\\Partition6" + e; LaunchXbe = f; theLaunchGameLevel.GoTo(); } else if(b == "C") { LaunchPath = "\\Device\\Harddisk0\\Partition2" + e; LaunchXbe = f; theLaunchGameLevel.GoTo(); } else if(b == "G") { LaunchPath = "\\Device\\Harddisk0\\Partition7" + e; LaunchXbe = f; theLaunchGameLevel.GoTo(); } else if(b == "E") { LaunchPath = "\\Device\\Harddisk0\\Partition1" + e; LaunchXbe = f; theLaunchGameLevel.GoTo(); } else { return; }}DEF theLaunchGameLevel Level{ function OnActivate() { } function OnArrival() { if(quicklaunch) { launch(launchXbe, launchPath); } else if(gamelaunch) { launch(launchXbe, launchPath); } }} 4- Section pour le fichier d'initialisation (UIX.ini) [Raccourci] Raccourci Bouton A=E:\\FTP\\FTP_Xbox\\default.xbe Raccourci Bouton B=E:\\Applications\\Complex Tools\\default.xbe Raccourci Bouton X=E:\\Dashboards\\EvolutionX\\default.xbe Raccourci Bouton Y=E:\\Applications\\DVDX\\default.xbe Raccourci Bouton Menu2=E:\\Applications\\Xbox Media Center\\default.xbe 5- Ajout des fonctions pour la mémorisation des combinaisons des boutons de la manette Code insérer dans la fonction : control DEF theMainMenuJoy Joystick function OnLeftDown() { LeftTrigger = true; } function OnLeftUp() { LeftTrigger = false; } function OnRightDown() { RightTrigger = true; } function OnRightUp() { RightTrigger = false; } 5- Exemple de code pour le raccourci Code insérer dans la fonction : control DEF theMainMenuJoy Joystick function OnBDown() { if((LeftTrigger == true) & (RightTrigger == true)) { PlaySoundA(); QuickLaunch("B"); } else { theSettingsMenuIn.Play(); GoToPowerOpts(); } } Merci d'avance pour votre aide!
kavap Posté(e) le 3 mars 2005 Posté(e) le 3 mars 2005 (modifié) dans config.xap dans la fonction function BuildMainList() par exemple juste avant ClearText();UpdateText(); il faut rajouter configList[i] = "Raccourci Bouton A";configValues[i] = "c-Raccourci-Raccourci Bouton A";configSelect[i] = "ConfigKeyB()";i = i + 1;configList[i] = "Raccourci Bouton B";configValues[i] = "c-Raccourci-Raccourci Bouton B";configSelect[i] = "ConfigKeyB()";i = i + 1;configList[i] = "Raccourci Bouton X";configValues[i] = "c-Raccourci-Raccourci Bouton X";configSelect[i] = "ConfigKeyB()";i = i + 1;configList[i] = "Raccourci Bouton Y";configValues[i] = "c-Raccourci-Raccourci Bouton Y";configSelect[i] = "ConfigKeyB()";i = i + 1; mais bon cela dit dans UIX il existe deja des fonctions QuickLaunch function QuickLaunchA() function QuickLaunchB() function QuickLaunchX() function QuickLaunchY() donc il te suffit de faire un truc comme ca function QuickLaunchA() { var IniFile = new Settings; IniFile.SetIniSection( "Raccourci" ); var a = IniFile.GetIniValue("Raccourci Bouton A"); IniFile.CloseFile(); LaunchFile(a);}unction QuickLaunchB() { var IniFile = new Settings; IniFile.SetIniSection( "Raccourci" ); var a = IniFile.GetIniValue("Raccourci Bouton B"); IniFile.CloseFile(); MenuLaunch(a);}unction QuickLaunchX() { var IniFile = new Settings; IniFile.SetIniSection( "Raccourci" ); var a = IniFile.GetIniValue("Raccourci Bouton X"); IniFile.CloseFile(); LaunchFile(a);}unction QuickLaunchY() { var IniFile = new Settings; IniFile.SetIniSection( "Raccourci" ); var a = IniFile.GetIniValue("Raccourci Bouton Y"); IniFile.CloseFile(); LaunchFile(a);} 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);} Modifié le 3 mars 2005 par kavap
creatx Posté(e) le 4 mars 2005 Auteur Posté(e) le 4 mars 2005 Encore merci à toi Kavap pour ton aide.
Messages recommandés
Créer un compte ou se connecter pour commenter
Vous devez être membre afin de pouvoir déposer un commentaire
Créer un compte
Créez un compte sur notre communauté. C’est facile !
Créer un nouveau compteSe connecter
Vous avez déjà un compte ? Connectez-vous ici.
Connectez-vous maintenant