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/...)
Length of translated Values
Talk about ManiaLink development in this forum
Moderator: NADEO
Jump to
- English Forums
- ↳ MP4.1 REPORTS / BUGS / INFORMATION
- ↳ Announcements
- ↳ Community / Events / CHANNELS
- ↳ Title Packs
- ↳ Medias
- ↳ Events
- ↳ CHANNELS
- ↳ Maniaplanet
- ↳ Trackmania 2
- ↳ Workbench
- ↳ Track Editor
- ↳ Multiplayer
- ↳ Shootmania
- ↳ Workbench
- ↳ Map Editor
- ↳ Multiplayer
- ↳ Find a Team
- ↳ Questmania
- ↳ Trackmania Turbo
- ↳ Off-Topics
- ↳ Ingame
- ↳ ActionMaker and Item editor
- ↳ Ingame Publishing
- ↳ Interface Designer
- ↳ ManiaLib
- ↳ ManiaLink
- ↳ ManiaScript
- ↳ MediaTracker
- ↳ Mesh Modeler
- ↳ Title Pack & Custom Data Creation
- ↳ Support & Bug Reports
- ↳ Support and technical issues (not bug)
- ↳ Bug Reports
- ↳ Maniaplanet Reports
- ↳ Shootmania Reports
- ↳ Trackmania² Reports
- ↳ Closed Beta Reports
- ↳ Maniaplanet Reports
- ↳ Trackmania² Canyon Reports
- ↳ Shootmania Storm Reports
- ↳ User Manual
- ↳ Documentation
- Dedicated & Web Service / Players Tools
- ↳ Dedicated Server
- ↳ Dedicated Server
- ↳ Dedicated Server Tools
- ↳ ManiaLive Plugins
- ↳ Ladder Servers
- ↳ Web Services
- ↳ Maniaplanet Web Services
- ↳ Trackmania Forever Web Services
- ↳ Player Tools
- ↳ General Tools
- ↳ Openplanet
- ↳ Server Controllers
- ↳ MPAseco
- ↳ ManiaControl
- ↳ eXpansion
- ↳ UASECO
- ↳ PyPlanet
- Languages
- ↳ Dutch
- ↳ Maniaplanet
- ↳ Trackmania 2
- ↳ Shootmania
- ↳ Questmania
- ↳ Off-topics
- ↳ French
- ↳ Maniaplanet
- ↳ Titres des joueurs
- ↳ Trackmania 2
- ↳ L'Atelier
- ↳ L'Editeur de circuits
- ↳ Multijoueur
- ↳ Tuning
- ↳ Shootmania
- ↳ L'Atelier
- ↳ L'Editeur de map
- ↳ Multijoueur
- ↳ Tuning
- ↳ Questmania
- ↳ Bla bla
- ↳ Support
- ↳ Manuel d'Utilisateur
- ↳ German
- ↳ Maniaplanet
- ↳ Trackmania 2
- ↳ Werkstatt
- ↳ Track-Editor
- ↳ Multiplayer
- ↳ Tuning
- ↳ Shootmania
- ↳ Werkstatt
- ↳ Map-Editor
- ↳ Multiplayer
- ↳ Tuning
- ↳ Questmania
- ↳ Andere Themen
- ↳ Support
- ↳ User Manual
- ↳ Lokalisierung
Who is online
Users browsing this forum: No registered users and 1 guest