Jump to content


Photo

How To Use Context Menus?


  • Please log in to reply
8 replies to this topic

#1 Mordenkainen

Mordenkainen

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,291 posts
  • Xbox Version:v1.3

Posted 28 November 2003 - 01:42 AM

I am trying to add an entry to the "Game Options" menu.

Here is my mxm.xml:
CODE

<Config>
<Main>
<DiscTitle>Media X Menu</DiscTitle>
<DiscSubtitle> </DiscSubtitle>
</Main>
<scripts>
<ActionScript name="AutoExec">
TRAYCLOSE
</ActionScript>
<ActionScript name="TestScript">
xmlopen myxml %_GameDir%MXM_Entry.xml
XMLSetValue myxml !.item.descr %_GameDesc%
XMLSetValue myxml !.item.description %_GameDesc%
XMLSetValue myxml !.item.dir %_GameDir%
XMLSetValue myxml !.item.exe %_GameExe%
XMLSetValue myxml !.item.title %_GameTitle%
XMLSetValue myxml !.item.thumbnail %_GameThumbnail%
XMLSetValue myxml !.item.xbeid %_GameXBEID%
XMLSetValue myxml !.item.verified %_GameVerified%
XMLSetValue myxml !.item.media %_GameMedia%
XMLSave myxml %_GameDir%MXM_Entry.xml
ResetMenuCache
Reboot
</ActionScript>
</Scripts>
<Context>
<Item Name="Testing">
 <Action>CallScript TestScript</Action>
</Item>
</Context>
</Config>


But nothing ever shows up on the Game Options menu. What did I do wrong?

Morden.

#2 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 28 November 2003 - 01:52 AM

The best form is probably the one like:

CODE

<Item Name="Delete Game">
<Mode>HD</Mode>
<script>_DeleteApp</Script>
</Item>


where the script is simply named....

I thought there might have been an issue with not using the <Mode> tag, but that's not the case.

Edited by BenJeremy, 28 November 2003 - 01:53 AM.


#3 Mordenkainen

Mordenkainen

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,291 posts
  • Xbox Version:v1.3

Posted 28 November 2003 - 01:57 AM

Tried both those changes, reset the cache and rebooted, still not there when I go to "Game Options" with a game on the HD selected..... HMMMMM

Tried with this:
CODE

<Context>
<Item Name="Testing">
 <Mode>HD</Mode>
<script>TestScript</Script>
</Item>
</Context>


Morden.

Edited by Mordenkainen, 28 November 2003 - 01:58 AM.


#4 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 28 November 2003 - 02:11 AM

Nothing at ALL shows up? Not even the ones defined in Internal.xml?

CODE

<Context>
<Item Name="About">
<Mode>DVD</Mode>
<script>_DisplayGameInfoDVD</Script>
</Item>
<Item Name="About">
<Mode>HD</Mode>
<script>_DisplayGameInfo</Script>
</Item>
<XItem Name="Install from DVD">
<Mode>DVD</Mode>
<script>_InstallDVDApp</Script>
</XItem>
<XItem Name="Delete Game">
<Mode>HD</Mode>
<script>_DeleteApp</Script>
</XItem>
<XItem Name="Clear Game Saves">
<script>_ClearGameSaves</Script>
</XItem>
</Context>


#5 Mordenkainen

Mordenkainen

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,291 posts
  • Xbox Version:v1.3

Posted 28 November 2003 - 02:12 AM

Sorry, the about shows up, but the ones I add to mxm.xml don't.

Morden.

#6 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 28 November 2003 - 02:17 AM

Yeah... I'm looking into it at the moment.

I just tested it - same results for me unsure.gif

#7 Mordenkainen

Mordenkainen

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,291 posts
  • Xbox Version:v1.3

Posted 28 November 2003 - 02:21 AM

Ok, well thanks for checking it out!

Guess well just have to wait before using this.

Morden.

#8 BenJeremy

BenJeremy

    X-S Elysian

  • Head Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 9,690 posts
  • Gender:Male
  • Xbox Version:v1.1
  • 360 version:v1 (xenon)

Posted 28 November 2003 - 02:32 AM

OK... figured out what is happening.

Downside is, you'll need to add three "dummy" context items before yours will show up.

This will be fixed in the next release (I forgot to reset an important index while scanning for context items - it gets the internal.xml items, then the mxm.xml items, but the index counter, set at "3" after getting the internal.xml items, is not reset, and it attempts to get the FOURTH item in the mxm.xml's context node.

#9 Mordenkainen

Mordenkainen

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,291 posts
  • Xbox Version:v1.3

Posted 28 November 2003 - 02:41 PM

Excellent!

At least we have a workaround! Thanks BJ!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users