1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

limit text sizes

This commit is contained in:
Laserlicht
2024-07-31 21:40:49 +02:00
committed by GitHub
parent ea93da62da
commit 0d1f744ba4
6 changed files with 14 additions and 10 deletions

View File

@@ -345,7 +345,8 @@ std::shared_ptr<CLabel> InterfaceObjectConfigurable::buildLabel(const JsonNode &
auto color = readColor(config["color"]);
auto text = readText(config["text"]);
auto position = readPosition(config["position"]);
return std::make_shared<CLabel>(position.x, position.y, font, alignment, color, text);
auto maxWidth = config["maxWidth"].Integer();
return std::make_shared<CLabel>(position.x, position.y, font, alignment, color, text, maxWidth);
}
std::shared_ptr<CMultiLineLabel> InterfaceObjectConfigurable::buildMultiLineLabel(const JsonNode & config) const