## VASSAL Reference Manual

Home > Module > Multi-Action Button

### Multi-Action Button

The Multi-Action Button combines buttons from the Toolbar into a single button. The named would-be buttons are removed from the Toolbar and a new button is added. Clicking this button automatically invokes the actions of all the removed & combined "buttons". Button Text: The text of the button to be added to the Toolbar. Tooltip Text: Optional tooltip text for the Multi-Action Button. Button Icon: Icon for the Toolbar button. Hotkey: Keyboard shortcut or Named Key Command for the Toolbar button. Buttons: Enter the exact Button Text of the Toolbar buttons that you wish to invoke as a result of clicking this button. They will be invoked in the order listed. After entering the text of a Button, click the Add button to add it to the list. You can select a button from the list and Remove it if needed. Use the Insert button if you need to insert something into the middle of the list. Buttons will be invoked in the order listed. EXAMPLE: A Global Key Command is defined that resets the fatigue level of all armies on the map. A second Global Key Command returns them to their home base. A Multi-Action Button can be used to combine both actions into a single Toolbar button. EXAMPLE: A Dice Button is defined that exposes its result as a property named Damage. Some Game Pieces are defined with a Trigger Action trait that compares the level of a Layer (representing armor) with the Damage property and deletes the piece if the level is below the Damage value. A Global Key Command invokes the Trigger Action. A Multi-Action Button is defined that invokes the Dice Button followed by the Global Key Command, resulting in the automatic deletion of any units with armor less than the random amount of damage. |