| 181 | } |
| 182 | |
| 183 | void StateTextureController::updateFrames() |
| 184 | { |
| 185 | mFrames.clear(); |
| 186 | |
| 187 | if (mParentData != nullptr) |
| 188 | { |
| 189 | DataPtr selected = mParentData->getChildSelected(); |
| 190 | for (Data::VectorData::const_iterator child = mParentData->getChilds().begin(); |
| 191 | child != mParentData->getChilds().end(); |
| 192 | child++) |
| 193 | { |
| 194 | if ((*child)->getType()->getName() != mThisType) |
| 195 | continue; |
| 196 | |
| 197 | bool visible = (*child)->getPropertyValue<bool>("Visible"); |
| 198 | MyGUI::IntPoint value = (*child)->getPropertyValue<MyGUI::IntPoint>("Point"); |
| 199 | |
| 200 | if (selected == *child) |
| 201 | { |
| 202 | if (visible) |
| 203 | mControl->setCoordValue(MyGUI::IntCoord(value, mSize), ScopeTextureControl::SelectorPosition); |
| 204 | else |
| 205 | mControl->clearCoordValue(); |
| 206 | } |
| 207 | else |
| 208 | { |
| 209 | if (visible) |
| 210 | mFrames.emplace_back(MyGUI::IntCoord(value, mSize), ScopeTextureControl::SelectorPosition); |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | if (selected == nullptr) |
| 215 | { |
| 216 | mControl->clearCoordValue(); |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | if (mControl != nullptr) |
| 221 | mControl->setViewSelectors(mFrames); |
| 222 | } |
| 223 | |
| 224 | void StateTextureController::updateTexture(std::string_view _value) |
| 225 | { |
nothing calls this directly
no test coverage detected