| 41 | } |
| 42 | |
| 43 | std::string WidgetContainer::position(bool _percent) |
| 44 | { |
| 45 | if (mRelativeMode) |
| 46 | { |
| 47 | MyGUI::DoubleCoord coord = |
| 48 | MyGUI::CoordConverter::convertToRelativeD(mWidget->getCoord(), mWidget->getParentSize()); |
| 49 | std::ostringstream stream; |
| 50 | stream.precision(17); |
| 51 | if (_percent) |
| 52 | stream << coord.left * 100 << " " << coord.top * 100 << " " << coord.width * 100 << " " |
| 53 | << coord.height * 100; |
| 54 | else |
| 55 | stream << coord.left << " " << coord.top << " " << coord.width << " " << coord.height; |
| 56 | return stream.str(); |
| 57 | } |
| 58 | return mWidget->getCoord().print(); |
| 59 | } |
| 60 | |
| 61 | void WidgetContainer::setUserData(std::string_view _key, std::string_view _value) |
| 62 | { |
no test coverage detected