MCPcopy Create free account
hub / github.com/MyGUI/mygui / updateFrames

Method updateFrames

Tools/SkinEditor/StateTextureController.cpp:183–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 9

getChildSelectedMethod · 0.80
setCoordValueMethod · 0.80
clearCoordValueMethod · 0.80
setViewSelectorsMethod · 0.80
IntCoordFunction · 0.50
clearMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected