creatx Posté(e) le 18 avril 2004 Posté(e) le 18 avril 2004 Je souhaite ajouter un 5eme bouton dans le menu principal de mon thc dash modifier. J’ai trouver ce tutos sur le net mais sa ne fonctionne pas Y a t-il une personne qui pourra me dire ou sont les erreurs dans ce tutos. Merci d'avance les mecs! AJOUTEZ Un 5ÈME BOUTON À VOTRE MENU PRINCIPAL Regardez dans le DÉFAULT.XAP du fichier MAINMENU5.XIP juste dessous où vous trouvez ce code au début du Default.xap ] scale 0.925900 0.925900 0.925900 translation 0.000000 0.000000 0.000000 } Découper et coller ce code. //START CUSTOM BUTTON 1 DEF Main_memory_ringpin_custom Transform { children [ DEF theCustomItem Transform { fade 0.25 children [ Shape { appearance Appearance { material MaxMaterial { name "FlatSrfc/PodParts" } } geometry DEF Main_memory_ringpin_4-FACES Mesh { url "Main_memory_ringpin_4-FACES.xm" } } DEF settings_arm03custom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "FlatSrfc/PodParts" } } geometry DEF settings_arm03-FACES Mesh { url "settings_arm03-FACES.xm" } } DEF settings_arm_04custom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "FlatSrfc/PodParts" } } geometry DEF settings_arm_04-FACES Mesh { url "settings_arm_04-FACES.xm" } } DEF custom Transform { children [ DEF game_nozzle03custom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "CellEgg/Parts" } } geometry DEF game_nozzle03-FACES Mesh { url "game_nozzle03-FACES.xm" } } DEF game_nozzledial03custom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "CellEgg/Parts" } } geometry DEF game_nozzledial03-FACES Mesh { url "game_nozzledial03-FACES.xm" } } ] rotation 0.659600 -0.671200 -0.338300 -3.784000 translation -0.657500 6.793000 -0.787900 } ] rotation 0.339800 0.904400 -0.257900 -1.602000 scale 0.329600 0.329600 0.329600 scaleOrientation 0.260700 0.862000 0.434700 -0.843300 translation -29.280001 3.249000 -5.591000 } DEF game_podsupport_14custom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "FlatSrfc/PodParts" } } geometry DEF game_podsupport_14-FACES Mesh { url "game_podsupport_14-FACES.xm" } } ] rotation -0.401400 0.864700 -0.302000 -1.753000 scale 1.472000 1.472000 1.472000 scaleOrientation -0.858200 -0.374900 0.350600 -0.663700 translation -26.010000 -0.343800 -7.849000 } DEF gamepod_backing03custom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "TextBacking" } texture ImageTexture { url "xbox4.tga" } } geometry DEF gamepod_backing03-FACES Mesh { url "gamepod_backing03-FACES.xm" } } ] rotation -0.993800 -0.111400 0.002924 -1.478000 scale 0.329600 0.329600 0.329600 scaleOrientation -0.344800 0.141400 0.928000 -0.345300 translation -32.540001 -4.030000 -3.501000 } DEF game_podsupport_15custom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "FlatSrfc/PodParts" } } geometry USE game_podsupport_14-FACES } ] rotation 0.672500 0.244000 0.698700 -2.514000 scale 1.472000 1.472000 1.472000 scaleOrientation -0.770900 0.394400 -0.500200 -0.985600 translation -38.930000 -7.719000 -8.576000 } DEF game_podshell_11custom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "MenuCell" } } geometry DEF game_podshell_11-FACES Mesh { url "game_podshell_11-FACES.xm" } } ] rotation -0.205500 -0.736100 -0.645000 -2.839000 scale 0.329600 0.329600 0.329600 scaleOrientation -0.176400 -0.392000 -0.902900 -0.548000 translation -32.540001 -4.030000 -3.501000 } DEF game_pod03custom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "MenuCell" } } geometry Sphere { radius 25.000000 } } ] rotation -0.922500 -0.329200 -0.201700 -1.575000 scale 0.329600 0.329600 0.329600 scaleOrientation 0.298000 0.445100 -0.844400 -0.878300 translation -32.540001 -4.030000 -3.501000 } DEF settings_panel_supportcustom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "FlatSurfaces" } } geometry DEF settings_panel_support-FACES Mesh { url "settings_panel_support-FACES.xm" } } ] rotation -0.585700 -0.570700 0.575600 -4.179000 scale 2.040000 2.040000 2.040000 scaleOrientation -0.968400 -0.096220 0.230000 -0.613900 translation -23.510000 -6.908000 2.461000 } DEF game_podsocket_inner03custom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "MenuCell" } } geometry DEF game_podsocket_inner03-FACES Mesh { url "game_podsocket_inner03-FACES.xm" } } ] rotation 0.994900 -0.002650 -0.101000 -1.675000 scale 0.329600 0.329600 0.329600 scaleOrientation -0.310500 -0.318200 -0.895800 -0.441400 translation -33.250000 -4.746000 -10.290000 } DEF game_arm05custom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "FlatSrfc/PodParts" } } geometry DEF game_arm05-FACES Mesh { url "game_arm05-FACES.xm" } } ] rotation 0.078240 0.069690 0.994500 -1.575000 scale 1.350000 1.350000 1.350000 scaleOrientation 0.987400 -0.157900 -0.007090 -0.700700 translation -34.400002 3.444000 -0.476300 } DEF custom_metapanel Transform { children [ Shape { appearance Appearance { material DEF CustomPanelMaterial MaxMaterial { name "GameHilite" } texture ImageTexture { url "GameHilite_01.bmp" } } geometry DEF settings_text_metapanel-FACES Mesh { url "settings_text_metapanel-FACES.xm" } } ] rotation 0.002542 -0.701000 0.713100 -3.149000 scale 1.591000 1.591000 1.591000 scaleOrientation 0.722400 0.199200 -0.662200 -0.478000 translation -11.790000 -17.680000 4.164000 } DEF game_podshell_10custom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "MenuCell" } } geometry DEF game_podshell_10-FACES Mesh { url "game_podshell_10-FACES.xm" } } ] rotation -0.996900 -0.063700 0.046460 -1.470000 scale 0.329600 0.329600 0.329600 scaleOrientation -0.223500 -0.021950 0.974500 -0.604800 translation -32.540001 -4.030000 -3.501000 } DEF settings_tubecustom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "Tubes" } } geometry DEF settings_tube-FACES Mesh { url "settings_tube-FACES.xm" } } ] rotation -0.999900 -0.008726 0.008880 -1.553000 scale 5.523000 5.523000 5.523000 scaleOrientation -0.471600 -0.550100 -0.689200 -0.154500 translation -16.010000 -25.790001 2.971000 } DEF settings_tube_0custom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "Tubes" } } geometry DEF settings_tube_0-FACES Mesh { url "settings_tube_0-FACES.xm" } } ] rotation -0.999900 -0.008726 0.008880 -1.553000 scale 5.523000 5.523000 5.523000 scaleOrientation -0.471600 -0.550100 -0.689200 -0.154500 translation -14.630000 -24.740000 2.929000 } DEF game_podsupport_13custom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "FlatSrfc/PodParts" } } geometry USE game_podsupport_14-FACES } ] rotation -0.689600 0.314600 -0.652200 -2.669000 scale 1.472000 1.472000 1.472000 scaleOrientation 0.856700 -0.033150 0.514800 -0.586200 translation -36.330002 2.536000 -7.430000 } DEF game_podsupport_16custom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "FlatSrfc/PodParts" } } geometry DEF game_podsupport_16-FACES Mesh { url "game_podsupport_16-FACES.xm" } } ] rotation 0.315600 0.854700 0.412200 -1.672000 scale 1.472000 1.472000 1.472000 scaleOrientation -0.761500 -0.592900 -0.261900 -0.615200 translation -28.610001 -10.040000 -8.931000 } DEF game_podshell_12custom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "MenuCell" } } geometry DEF game_podshell_12-FACES Mesh { url "game_podshell_12-FACES.xm" } } ] rotation -0.214200 -0.735100 -0.643200 -2.820000 scale 0.329600 0.329600 0.329600 scaleOrientation -0.388500 -0.717300 -0.578400 -0.540400 translation -32.540001 -4.030000 -3.501000 } DEF game_select_pod_inner03custom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "EggGlowPulse" } } geometry Sphere { radius 10.540000 } } ] rotation -0.335200 0.920700 -0.199700 -0.424800 scale 0.598800 0.598800 0.598800 scaleOrientation 0.325000 0.941500 0.089340 -0.529000 translation -32.200001 -4.344000 -2.936000 } DEF custom_text Transform { children [ Transform { rotation -1 0 0 1.571 children [ DEF MainMenu5 Shape { appearance Appearance { material DEF CustomTextMaterial MaxMaterial { name "NavType" } } geometry Text { font "Heading" translate false text "MAIN MENU HACKED" } } ] } ] rotation -1.000000 0.002966 0.003888 -1.551000 scale 7.000 0.0 7.000 scaleOrientation 0.527100 0.681300 0.508000 -0.177100 translation -13.937000 -10.380000 4.323000 } ] rotation -0.602100 -0.599600 -0.527300 -2.191000 scale 0.458100 0.458100 0.458100 //scaleOrientation 0.044600 0.985600 0.163200 -0.123500 translation 5.641000 15.510000 -1.711000 } DEF settings_arm_pin02custom Transform { children [ Shape { appearance Appearance { material MaxMaterial { name "FlatSrfc/PodParts" } } geometry DEF settings_arm_pin02-FACES Mesh { url "settings_arm_pin02-FACES.xm" } } ] rotation -0.008533 -1.000000 -0.003925 -2.201000 scale 1.294000 2.019000 1.294000 scaleOrientation 0.049020 0.998600 0.021300 -0.346900 translation -1.506000 -1.191000 4.435000 } ] rotation 0.001397 -0.015840 0.999900 -3.163000 scale 1.296000 1.296000 1.296000 scaleOrientation 0.302900 0.914000 0.270000 -0.422300 translation -6.689000 0.236800 -4.083000 } ] rotation 0.127600 -0.011390 -0.991800 -1.591000 scale 0.225100 0.257500 0.257500 scaleOrientation -0.438700 0.896100 0.067440 -0.155900 translation -0.416600 -0.801500 0.463500 } ]} ] rotation 0.997500 -0.047920 0.052590 -1.573000 scale 6.057000 6.927000 6.057000 scaleOrientation 0.008927 0.998300 -0.057520 -0.081130 // Settings Position // translation 57.430000 -23.379999 101.500000 // - These numbers are for a 3 button menu // translation 57.430000 -24.379999 101.500000 // - These numbers are for a 4 button menu } //END CUSTOM BUTTON That is it for the mainmenu5.xip, just be careful with the mainmenu5.xip because sometimes it wont like your code and you will get error 21(even when you think you have done nothing wrong), my advice is to just keep trying til you get it and MAKE SURE that is working first before you go on to the next step! You should see a little main menu button on the right hand side of the orb before continuing. Now on to the default.xip --> default.xap Search for --> function UpdateMainMenu() and replace with this code function UpdateMainMenu() { if( g_bXOnDashExists ) { //Update4ButtonMainMenu(); Update5ButtonMainMenu(); } else { //Update3ButtonMainMenu(); Update4ButtonMainMenu(); } } function Update5ButtonMainMenu() { var c = theMainMenu.children[0].children[0]; c.game_select_pod_inner02.visible = false; // Memory Flashing Orb c.game_select_pod_inner.visible = false; // Music Flashing Orb c.game_select_pod_inner04.visible = false; // Xbox Live Flashing Orb c.game_select_pod_inner03.visible = false; // Settings Flashing Orb c.game_select_pod_inner03custom.visible = false; // Custom Flashing Orb if (nCurMainMenuItem == 0) // Memory Button { c.game_select_pod_inner02.visible = true; c.theMenuItems.SetRotation(0, 0, 1, -0.25); c.theMemoryItem.SetRotation(0, 1, 0, -0.25); c.theMusicItem.SetRotation(0, 1, 0, -0.25); c.theOnlineItem.SetRotation(0, 1, 0, -0.25); c.theSettingsItem.SetRotation(0, 1, 0, -0.25); c.theCustomItem.SetRotation(0, 1, 0, -0.25); c.MemoryPanelMaterial.name = "GameHilite"; c.MusicPanelMaterial.name = "FlatSurfaces2sided"; c.OnlinePanelMaterial.name = "FlatSurfaces2sided"; c.SettingsPanelMaterial.name = "FlatSurfaces2sided"; c.CustomPanelMaterial.name = "FlatSurfaces2sided"; c.MemoryTextMaterial.name = "HilightedType"; c.MusicTextMaterial.name = "NavType"; c.OnlineTextMaterial.name = "NavType"; c.SettingsTextMaterial.name = "NavType"; c.CustomTextMaterial.name = "NavType"; } else if (nCurMainMenuItem == 1) // Music Button (Default position) { c.game_select_pod_inner.visible = true; c.theMenuItems.SetRotation(0, 0, 1, 0.0); c.theMemoryItem.SetRotation(0, 1, 0, 0.0); c.theMusicItem.SetRotation(0, 1, 0, 0.0); c.theOnlineItem.SetRotation(0, 1, 0, 0.0); c.theSettingsItem.SetRotation(0, 1, 0, 0.0); c.theCustomItem.SetRotation(0, 1, 0, 0); c.MemoryPanelMaterial.name = "FlatSurfaces2sided"; c.MusicPanelMaterial.name = "GameHilite"; c.OnlinePanelMaterial.name = "FlatSurfaces2sided"; c.SettingsPanelMaterial.name = "FlatSurfaces2sided"; c.CustomPanelMaterial.name = "FlatSurfaces2sided"; c.MemoryTextMaterial.name = "NavType"; c.MusicTextMaterial.name = "HilightedType"; c.OnlineTextMaterial.name = "NavType"; c.SettingsTextMaterial.name = "NavType"; c.CustomTextMaterial.name = "NavType"; } else if (nCurMainMenuItem == 2) // Xbox Live Button { c.game_select_pod_inner04.visible = true; c.theMenuItems.SetRotation(0, 0, 1, 0.25); c.theMemoryItem.SetRotation(0, 1, 0, 0.25); c.theMusicItem.SetRotation(0, 1, 0, 0.25); c.theOnlineItem.SetRotation(0, 1, 0, 0.25); c.theSettingsItem.SetRotation(0, 1, 0, 0.25); c.theCustomItem.SetRotation(0, 1, 0, 0.25); c.MemoryPanelMaterial.name = "FlatSurfaces2sided"; c.MusicPanelMaterial.name = "FlatSurfaces2sided"; c.OnlinePanelMaterial.name = "GameHilite"; c.SettingsPanelMaterial.name = "FlatSurfaces2sided"; c.CustomPanelMaterial.name = "FlatSurfaces2sided"; c.MemoryTextMaterial.name = "NavType"; c.MusicTextMaterial.name = "NavType"; c.OnlineTextMaterial.name = "HilightedType"; c.SettingsTextMaterial.name = "NavType"; c.CustomTextMaterial.name = "NavType"; // Custom } else if (nCurMainMenuItem == 3) // Settings Button { c.game_select_pod_inner03.visible = true; c.theMenuItems.SetRotation(0, 0, 1, 0.50); c.theMemoryItem.SetRotation(0, 1, 0, 0.50); c.theMusicItem.SetRotation(0, 1, 0, 0.50); c.theOnlineItem.SetRotation(0, 1, 0, 0.50); c.theSettingsItem.SetRotation(0, 1, 0, 0.50); c.theCustomItem.SetRotation(0, 1, 0, 0.50); c.MemoryPanelMaterial.name = "FlatSurfaces2sided"; c.MusicPanelMaterial.name = "FlatSurfaces2sided"; c.OnlinePanelMaterial.name = "FlatSurfaces2sided"; c.SettingsPanelMaterial.name = "GameHilite"; c.CustomPanelMaterial.name = "FlatSurfaces2sided"; c.MemoryTextMaterial.name = "NavType"; c.MusicTextMaterial.name = "NavType"; c.OnlineTextMaterial.name = "NavType"; c.SettingsTextMaterial.name = "HilightedType"; c.CustomTextMaterial.name = "NavType"; } else if (nCurMainMenuItem == 4) // Custom Button { c.game_select_pod_inner03custom.visible = true; c.theMenuItems.SetRotation(0, 0, 1, 0.75); c.theMemoryItem.SetRotation(0, 1, 0, 0.75); c.theMusicItem.SetRotation(0, 1, 0, 0.75); c.theOnlineItem.SetRotation(0, 1, 0, 0.75); c.theSettingsItem.SetRotation(0, 1, 0, 0.75); c.theCustomItem.SetRotation(0, 1, 0, 0.75); c.MemoryPanelMaterial.name = "FlatSurfaces2sided"; c.MusicPanelMaterial.name = "FlatSurfaces2sided"; c.OnlinePanelMaterial.name = "FlatSurfaces2sided"; c.SettingsPanelMaterial.name = "FlatSurfaces2sided"; c.CustomPanelMaterial.name = "GameHilite"; c.MemoryTextMaterial.name = "NavType"; c.MusicTextMaterial.name = "NavType"; c.OnlineTextMaterial.name = "NavType"; c.SettingsTextMaterial.name = "NavType"; c.CustomTextMaterial.name = "HilightedType"; } } Recherche dans Default.xap du mainmenu5, ce groupede code (faites défiler en bas d'un peu jusqu'à ce que vous voyez ce groupe de code) if( g_bXOnDashExists ) { c.Main_memory_ringpin_3.SetTranslation(62.779999, 13.892000, 102.000000); c.Main_memory_ringpin_2.SetTranslation(56.830002, 33.290001, 101.900002); c.Main_Online_ringpin.SetTranslation(62.779999, -6.092000, 102.000000); c.Main_memory_ringpin_4.SetTranslation(57.430000, -24.379999, 101.500000); } Juste au-dessous de ce code, c.Main_memory_ringpin_4.SetTranslation(57.430000, -24.379999, 101.500000); Ajouter cette ligne - c.Main_memory_ringpin_custom.SetTranslation(42.000000, -38.000000, 101.500000); // custom Search for LaunchMenu and scroll down until you see else if (nCurMainMenuItem == 3) { theSettingsMenuIn.Play(); LaunchMenu(theDashSettings[8], theDashSettings[12], theDashSettings[79]); } And underneath the last line, paste this---> else if (nCurMainMenuItem == 4) { theSettingsMenuIn.Play(); LaunchMenu(theDashSettings[8], theDashSettings[12], theDashSettings[79]); } Note: this is just a clone of the previous menu and contents[sETTINGS]. If you want it launching to a different menu see below. This is the final step to make your 5th button selectable. Search for.... < 3 Or function OnMoveDown() and replace it with < 4 Example: function OnMoveDown() { if (beInVis) { return; } else { if (nCurMainMenuItem < 3) //change to 4 { nCurMainMenuItem = nCurMainMenuItem + 1; if( false == g_bXOnDashExists ) { if( 2 == nCurMainMenuItem ) nCurMainMenuItem = nCurMainMenuItem + 1; } theMainMenuForward.Play(); UpdateMainMenu(); } } } Launch a different menu theMenuGlobal = ReadValues(vP); if(vX == "1") { GoToSubMenu2(); } else if(vX == "2") { GoToSubMenu3(); } else if(vX == "3") { GoToSubMenu4(); } else if(vX == "4") { GoToSubMenu(); } else if(vX == "5") { GoToMemory(); } else if(vX == "6") { GoToMusic(); } else if(vX == "7") { GoToSettings(); } else if(vX == "8")/*jbone*/ { GoToSubMenu1(); } else if(vX == "9") { GoToSubMenu0(); } } } The first "theDashSettings[8]" that you see below looks for the variable "Vx" (above)which is the number that is stored inside the "data_00.xbx" file at line #8, "Vx" is the number of the menu that is to be launched. else if (nCurMainMenuItem == 4) { theSettingsMenuIn.Play(); LaunchMenu(theDashSettings[8], theDashSettings[12], theDashSettings[79]); //^ change this } If "theDashSettings[8]" = 9 it will go to submenu 0 and if it is "theDashSettings[8]" = 8 it will launch the SETTINGS MENU, and so on.. All you need to do is change the number in the "data_00.xbx" at line #8, by default it launches the SETTINGS menu so you should find the number 7, just change it to whatever number "Vx" is to coincide with the menu you want. You can also write it like this to launch the MEMORY menu... else if (nCurMainMenuItem == 4) { theSettingsMenuIn.Play(); LaunchMenu("5",theDashSettings[12], theDashSettings[79]); } Change the name of your 5th button You can see here it says MAIN MENU HACKED, In the mainmenu5.xip --> default.xap geometry Text { font "Heading" translate false text "MAIN MENU HACKED" } Just change that to whatever you want. Launch xbmc straight from the 5th button default.xip --> default.xap change... else if (nCurMainMenuItem == 4) { theSettingsMenuIn.Play(); LaunchMenu(theDashSettings[8], theDashSettings[12], theDashSettings[79]); } To else if (nCurMainMenuItem == 4) { launch ("default.xbe","\\\\Device\\\\Harddisk0\\\\partition1\\\\APPS\\\\XBMC"); } Change to where the path to your xbmc is[/color]
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