Jump to content
Sign in to follow this  
5133p39

RscMainMenu - adding new menu items

Recommended Posts

I am trying to add new item to the main command menu.

To create the new item is easy:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class RscMainMenu {

  access = ReadAndWrite;

  title = $STR_COMMAND;

  atomic = 0;

  vocabulary = "";

  class Items {

     ...

     ...

     class MyNewItem {

        title = "MUJ TEST";

        key = 12;

        character = "-";

        command = "Hint ""Test"";";

        speechId = 0;

     };

  };

}

The only problem is that the <span style='color:blue'>command</span> is executed immediately after the main menu is displayed, instead of executing only after the item is activated (by pressing the coresponding key defined by the <span style='color:blue'>key</span> inside the menu item definition).

Any ideas?

Yes, i know i could use the action menu or radio, but i want this to work instantly (defined from my addon's config.cpp, not from some script which would add the new action/radio option).

The purpose is to have easy access to some debug/test functions when i am testing my addons/missions.

Maybe some of you seen my any gear addon, i am working on a new version which allows teleporting, spawning vehicles/units, free/unit camera, executing code, etc., and i want to be able to activate the main dialog after activating the new menu item.

Edited by W0lle

Share this post


Link to post
Share on other sites

what about XEH pre init?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×