MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / configureSelfFromXml

Method configureSelfFromXml

forms/textbutton.cpp:149–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149void 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

Callers

nothing calls this directly

Calls 5

trFunction · 0.85
setTextMethod · 0.45
setFontMethod · 0.45
getFontMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected