| 297 | } |
| 298 | |
| 299 | void SkinExportSerializer::fillSeparatorData(DataPtr _data, pugi::xml_node _node) |
| 300 | { |
| 301 | pugi::xpath_node_set regions = _node.select_nodes(R"(BasisSkin[@type="SubSkin"or@type="TileRect"])"); |
| 302 | for (auto region : regions) |
| 303 | { |
| 304 | MyGUI::IntCoord offset = MyGUI::IntCoord::parse(region.node().attribute("offset").value()); |
| 305 | |
| 306 | MyGUI::Align align = MyGUI::Align::parse(region.node().attribute("align").value()); |
| 307 | if (align.isLeft()) |
| 308 | { |
| 309 | DataPtr data = getChildData(_data, "Separator", "Left"); |
| 310 | data->setPropertyValue("Visible", "True"); |
| 311 | data->setPropertyValue("Offset", MyGUI::utility::toString(offset.width)); |
| 312 | } |
| 313 | else if (align.isRight()) |
| 314 | { |
| 315 | DataPtr data = getChildData(_data, "Separator", "Right"); |
| 316 | data->setPropertyValue("Visible", "True"); |
| 317 | data->setPropertyValue("Offset", MyGUI::utility::toString(offset.width)); |
| 318 | } |
| 319 | if (align.isTop()) |
| 320 | { |
| 321 | DataPtr data = getChildData(_data, "Separator", "Top"); |
| 322 | data->setPropertyValue("Visible", "True"); |
| 323 | data->setPropertyValue("Offset", MyGUI::utility::toString(offset.height)); |
| 324 | } |
| 325 | else if (align.isBottom()) |
| 326 | { |
| 327 | DataPtr data = getChildData(_data, "Separator", "Bottom"); |
| 328 | data->setPropertyValue("Visible", "True"); |
| 329 | data->setPropertyValue("Offset", MyGUI::utility::toString(offset.height)); |
| 330 | } |
| 331 | } |
| 332 | } |
| 333 | |
| 334 | DataPtr SkinExportSerializer::getChildData(DataPtr _data, std::string_view _dataType, std::string_view _name) |
| 335 | { |
nothing calls this directly
no test coverage detected