PDA

View Full Version : makeLocalizedString(string)



voron00
27th March 2017, 14:42
Hi. I've added a function that converts any string to a localized string, this can be used to reduce some hax when messing around huds and configstrings.

string = makeLocalizedString("Hey Man!");
https://github.com/voron00/libcod/commit/36f9d3e7ca8988a69ff1f470ac3947d21a63937c

I haven't tested it much, only with some precahce stuff so tell me if it has any bugs.

kung foo man
27th March 2017, 15:40
Very nice, good as reference since it's asked quite often

IzNoGoD
27th March 2017, 19:08
It seems this still requires you to precache stuff.

maxdamage99
30th March 2017, 13:57
String to &String?
i can use


precachestring(&"Hey Man!");
self.hud.label = makeLocalizedString("Hey Man!");

??

voron00
30th March 2017, 15:10
Yes.