Action button on counters

Hello,

I am trying to make the paying pieces in one of my modules more interactive and as such I placed some “action buttons” on the basic pieces (through prototypes) to trigger some effects (morale, step losses, etc.)

Everything is working fine except one annoying thing that might make the whole idea moot:
when one rotates the basic piece (the game requires orientation within hexes), the action button mappings do not rotate with it so it becomes almost impossible to figure out where the button area was since the picture does not match the button position anymore.

Is there a way to prevent that behavior?
Note that the “rotation property” is listed below (in the basic piece window) the “prototype property” containing the layers/buttons etc. so the graphical layers rotate fine.

Thanks.

Fred

Did you try putting the rotation property above the action buttons in the trait list?

If I put the rotation property above the rest then none of my layers, including the action buttons, rotate (except for the basic piece which is below the rotation property).

Infortunately, Action buttons know nothing about rotation.

*********** REPLY SEPARATOR ***********

On 6/11/2011 at 12:17 PM freddel wrote:

If I put the rotation property above the rest then none of my layers,
including the action buttons, rotate (except for the basic piece which
is below the rotation property).

I’d call that a bug :slight_smile:

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of Brent Easton
Sent: Sunday, November 06, 2011 4:07 PM
To: messages@vassalengine.org
Subject: Re: [messages] [Module Design] Re: Action button on counters

Infortunately, Action buttons know nothing about rotation.

*********** REPLY SEPARATOR ***********

On 6/11/2011 at 12:17 PM freddel wrote:

If I put the rotation property above the rest then none of my layers,
including the action buttons, rotate (except for the basic piece which
is below the rotation property).

It’s an interesting, non-trivial problem. You will need to scan the traits above the Action Button in the stack, totalling the degrees of rotation of any active FreeRotators and then apply an appropriate AffineTransformation to the Click Point before checking if the Button has been clicked.

I’d call that a bug :slight_smile:

Thanks for the quick reply…I guess I’ll shelve this for now…

I’ll add a Bug report, it’s something that should be fixed for 3.2.

Bug 4113 - Action Buttons on counters do not respect Rotation

I figured that :slight_smile: It actually is a microcosm of a similar bigger problem we
always see requested - rotated boards to match player view

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of Brent Easton
Sent: Sunday, November 06, 2011 4:28 PM
To: messages@vassalengine.org
Subject: Re: [messages] [Module Design] Re: Action button on counters

It’s an interesting, non-trivial problem. You will need to scan the traits
above the Action Button in the stack, totalling the degrees of rotation of
any active FreeRotators and then apply an appropriate AffineTransformation
to the Click Point before checking if the Button has been clicked.

I’d call that a bug :slight_smile: