Toolbar Menu and Random Text Button dialog

I’m trying to create a toolbar menu in the main module interface to handle a number of different random text buttons.

These work fine until I check the “prompt for values when button pushed” option to, say, allow the user to roll multiple dice. When I do, the menu option appears correctly and is no longer visible on the toolbar.

When the user selects the option from the menu (either in the editor or in the game itself), the prompt dialog box correctly appears, but this seems to cause the menu option to also incorrectly appear in the toolbar. It also remains in the menu.

This strikes me as a bug rather than a feature, but perhaps I’m missing something. Please let me know if I can clarify this issue, and any guidance to correct this would be appreciated.

Cheers,
JL

Can I clarify my prior post?

  • Model: Homebuild
  • Operating System: Windows 7 Professional 64-Bit
  • CPU: AMD Athlon 64 X2 Dual Core Processor 4200+ 2.2 ghz
  • Memory: 2 GB
  • Video Card: Nvidia GeForce 7600GT
  • Vassal version: 3.1.14
  • Java version. 1.6.0_21 from Sun Microsystems

Attached is a demo module. Click “Menu” and one of the options, and (at least for me), the menu items incorrectly are added to the toolbar when the dialog starts.

Cheers, and thanks,
JL

In your main tree, move the Menu (Toolbar Menu) above your Test 1 and Test 2 Random Text Button components. This should solve the problem.

Thanks much for the test and reply. However, that doesn’t seem to work for me – I still get the text buttons appearing in the toolbar, now to the right of the menu button rather than to the left.

Edit: For what it’s worth, I’ve noticed a few occasions when this effect hasn’t happened – in the editor, if I check the “prompt user for values” option, it works as it should. But when I save the module and start a game, the menu items are dumped to the main toolbar when I select them and receive the prompt.

Cheers,
JL

You’re right. I don’t know if that’s a bug or not but a new menu entry does appear if you have the “prompt user for values” option checked.

I’ve create a work around. See attached.

Basically, I gave each of your random text components a hotkey. Then I included Action Button components to trigger those hotkeys and placed those buttons in your Toolbar menu.

Eureka! Thanks, sir. That does the trick.