| 191 | } |
| 192 | |
| 193 | void RegionTextureController::updateFrames() |
| 194 | { |
| 195 | mFrames.clear(); |
| 196 | |
| 197 | if (mParentData != nullptr) |
| 198 | { |
| 199 | DataPtr selected = mParentData->getChildSelected(); |
| 200 | for (Data::VectorData::const_iterator child = mParentData->getChilds().begin(); |
| 201 | child != mParentData->getChilds().end(); |
| 202 | child++) |
| 203 | { |
| 204 | if ((*child)->getType()->getName() != mThisType && (*child)->getType()->getFriend() != mThisType) |
| 205 | continue; |
| 206 | |
| 207 | bool visible = |
| 208 | (*child)->getPropertyValue<bool>("Visible") && (*child)->getPropertyValue<bool>("Enable"); |
| 209 | MyGUI::IntCoord value = (*child)->getPropertyValue<MyGUI::IntCoord>("Coord"); |
| 210 | |
| 211 | if (selected == *child) |
| 212 | { |
| 213 | if (visible) |
| 214 | { |
| 215 | if ((*child)->getType()->getName() == mThisType) |
| 216 | mControl->setCoordValue(value, ScopeTextureControl::SelectorPositionReadOnly); |
| 217 | else |
| 218 | mControl->setCoordValue(value, ScopeTextureControl::SelectorCoord); |
| 219 | } |
| 220 | else |
| 221 | { |
| 222 | mControl->clearCoordValue(); |
| 223 | } |
| 224 | } |
| 225 | else |
| 226 | { |
| 227 | if (visible) |
| 228 | mFrames.emplace_back(value, ScopeTextureControl::SelectorPosition); |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | if (selected == nullptr) |
| 233 | { |
| 234 | mControl->clearCoordValue(); |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | if (mControl != nullptr) |
| 239 | mControl->setViewSelectors(mFrames); |
| 240 | } |
| 241 | |
| 242 | } |
nothing calls this directly
no test coverage detected