Hello, I have an empty (no image) basic piece called DUMMY which just writes $TEXT$ at offset 0,0 with default aligning options. In particular: horizontal alignment = center. TEXT is a global property, default “” (empty).
Then I have a bunch of cards with a right-click command CTRL-A which sets TEXT=$BasicName$.
CTRL-A on the first card results in the string “Julia Roberts”, correctly displayed at the center of the location where the DUMMY piece was positioned.
CTRL-A on the second card writes out “Hale Berry” in place of “Julia Roberts”. However, it’s no longer horizontally centered. It’s left aligned on the starting pixel of the “J” in “Julia Roberts” written out before.
It’s like persistent memory of where to start writing the content of TEXT is stored somewhere in memory after first call.
I have seen this too on a single piece in a score window with no stacked pieces. After changing the DP with which the label is associated, the center alignment is not updated. I don’t know if it is updated if you change the label directly (and not through a DP).
I have tried Vassal 3.2.0 build 8015 and I can confirm that the centering “bug” is still there.
However, text labels are now making use (probably in the right way, didn’t do a through test) of the offset definitions.
For example, an empty (invisible image) piece with several text labels trait, all at default offsets (0,0) would show:
in Vassal 3.1.18 as one line above the other (first text label trait being bottom line and at offset 0,0, apparently),
but I think there is also some unpredictable behaviour when a line is set/reset to blank; moreover, defining different offsets for the various text labels seems completely buggy (-20,0 showing way high over -10,0 whereas 0,0 is right under -10,0 etc).
in Vassal 3.2.0 build 8015 as all garbled in the same line, which makes sense if offset is 0,0 for all, I guess.
Bottom line: build 8015 seems to really care about the offsets, whereas 3.1.18 was messying up.
However, the centering bug (?) is still there.
Ok, just to make it more clear to anybody reading this thread in the future: this fix (starting with 3.2.0 build 8228) DOES NOT address the text centering bug mentioned here. However, it DOES solve another issue with text labels which arised with 3.2.0 beta 1 and discussed in this other thread: [url]https://forum.vassalengine.org/t/text-labels-in-3-2-0-bug-or-feature/5144/1]
I think I am seeing a similar thing in what I described. The first line of text in my module is aligned properly. The second is misaligned. Both lines contain a $FOO$ type reference, referencing a property on a property sheet.
This bug did NOT happen in 3.2.0 svn 8221 but is happening in svn8258. I have not been able to test in in the versions in between.
I want to attach my module but it is for a game that is currently being printed and I don’t want an unfinished copy of the vassal module floating around the internet before the game is printed. I’m pretty sure that actually violates something I signed with GMT Games heh. I did PM it to Uckelman but I’m not sure if he got it / has the time. Brent, if you know what is up with this bug, I’ll PM the module to you.
The fix that went in to the Labeler was to return the behaviour of multiple labels that have no Key Commands to be the same as it was under 3.1, to ensure existing modules keep working.
Unfortunately, it looks like you have inadvertently taken advantage of the bug and now that the bug is fixed, your module appears broken, you will need to change the parameters you have used to align the Def Tech label.
I set up a similiar thing in a test module. Try a Horizontal Position of Left with an Offset of the width of the counter. And a Horizontal text justification of Left.