Is it possible to place static notes on a piece? Similiar to Property Sheet but which can be populated in the design phase and are not editable. For example where a piece has a specific ability which needs some detail/reminder that would not fit on the main face of the piece. The notes would then be accessed by selecting the piece and using the correct control keys etc.
Any words of wisdom/ cunning plans gratefully received.
D
In the Terraforming Mars module, we use a Dynamic Property that calls the BeanShell Alert() function for this sort of thing…add a Dynamic Property, give it a menu command and/or Key Command, and set it to set the value directly to {Alert("This text will pop up in the middle of the screen when the command is selected")}.
Note that the DP will never actually have its value changed this way, it’s just a placeholder to use the Alert() function.
I’m guessing if you want the possibility of multiple messages, you could have multiple menu commands or Named Commands defined in the Dynamic Property each with with their own set the DP value to Alert message as you describe, and use Trigger Actions to fire off the right Named Command depending on the situation.
hint is a property that contains the popup message. It can include some simple HTML to format the message. For your application, you might define hint as a Marker trait on each piece that you want to have a popup for.
prefHint is a Global Option Checkbox property - allowing users to turn this feature on or off, individually.
Users have to hover over the piece to see the message. In this example it looks like this:
I am using only “Summary text above pieces” for this because that does not require the piece image to be included in the Mouse-over, giving me a pure popup text box.
The text and background color is definable just like colors in any other Vassal components, including transparency, as shown in the example. If you need more than that, you can do that in the HTML in the hint property itself.