Dynamic Label Text Color

Looking for some assistance.

The module I am working on has several different map boards (grass, desert, rocky hillside, snowy). The color for text lables that seems to show up best on most of the maps is a light grey. However, the grey is nearly invisible on the snowy map.

Is it possible to have a piece identify the map board its being placed on and dynamically change its own text label color?

Thanks in advance,
Jeffrey

Yes it is. Make the text label text value a dynamic property and change the property based on CurrentBoard. I’ve attached a small sample module that shows how it can be done.

Textcolor.vmod

On Dec 11, 2008, at 7:08 AM, cparrott wrote:

This should go into the Wiki as well.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Yes PLEASE! The place is in the How-To’s at

vassalengine.org/wiki/doku.p … ow_to:main

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

I might add that this only works fully under 3.1 beta x. In 3.0 there was
some bug that prevented a text value tied to a property from updating itself
without a proxy piece. I tested it on 3.0.17 and the piece displays the text
incorrectly while in the game piece palette but works fine once it’s moved
to the map.

Chuck

Post generated using Mail2Forum (mail2forum.com)

Thanks!

Jeffrey