| 147 | } |
| 148 | |
| 149 | void TextButton::configureSelfFromXml(pugi::xml_node *node) |
| 150 | { |
| 151 | Control::configureSelfFromXml(node); |
| 152 | |
| 153 | if (node->attribute("text")) |
| 154 | { |
| 155 | label->setText(tr(node->attribute("text").as_string())); |
| 156 | } |
| 157 | auto fontNode = node->child("font"); |
| 158 | if (fontNode) |
| 159 | { |
| 160 | label->setFont(ui().getFont(fontNode.text().get())); |
| 161 | } |
| 162 | } |
| 163 | }; // namespace OpenApoc |