Maniac
Apolyton Sage
I'd like to use a trait's short description instead of the full one when showing trait production boni for units/buildings/etc. However I can't get it to work:
This is an example of code using the full description:
If I try to change getTextKeyWide() to getShortDescription(), no text shows up at all. See the attached screenshot.
I also tried getShortDescription().getCString(), but then I get an error when compiling.
Anyone know how to get this to work?
This is an example of code using the full description:
Code:
if (kBuilding.getProductionTraits((TraitTypes)i) != 0)
{
if (kBuilding.getProductionTraits((TraitTypes)i) == 100)
{
szBuffer.append(NEWLINE);
szBuffer.append(gDLL->getText("TXT_KEY_DOUBLE_SPEED_TRAIT", GC.getTraitInfo((TraitTypes)i).getTextKeyWide()));
}
else
{
szBuffer.append(NEWLINE);
szBuffer.append(gDLL->getText("TXT_KEY_PRODUCTION_MODIFIER_TRAIT", kBuilding.getProductionTraits((TraitTypes)i), GC.getTraitInfo((TraitTypes)i).getTextKeyWide()));
}
}
If I try to change getTextKeyWide() to getShortDescription(), no text shows up at all. See the attached screenshot.
I also tried getShortDescription().getCString(), but then I get an error when compiling.
Anyone know how to get this to work?