Length of translated Values

Talk about ManiaLink development in this forum

Moderator: NADEO

Post Reply
zocka
Posts: 205
Joined: 15 Jun 2010, 17:56

Length of translated Values

Post by zocka »

I was trying around with the CMlLabel::ComputeWidth function after looking a bit through the _()-function* to access the built-in translations.
I still haven't quite figured out, how this works, it seems to be just a shortcut for TextLib::Compose (without overloading for multiple arguments or the need to include the TextLib) and the game then translates the first value of a string like
˽Cancel˽Cancel => translate(Cancel)
˽˽Cancel => translate()

The other way I have to access these built-in translations is with the translate="1" attribute on labels** (or the unicode hack viewtopic.php?f=464&t=19020#p162010).

However when I would like to adjust some elements to the text length, CMlLabel.ComputeWidth(CMlLabel.Value) computes the length of "˽Cancel" (*) or "Cancel" (**) - which differs from the displayed text.

Is there any workaround (except for using a custom dictionary)?

Edit: A similar problem of course comes for string modification (uppercase/lowercase/...)
manialink minigame shatter
my manialink: zockaml
my maniaflash: maniaflash?zocka
Post Reply

Return to “ManiaLink”

Who is online

Users browsing this forum: No registered users and 1 guest