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

Method updateFrames

Tools/ImageEditor/FrameTextureController.cpp:173–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171 }
172
173 void FrameTextureController::updateFrames()
174 {
175 mFrames.clear();
176
177 if (mParentData != nullptr)
178 {
179 DataPtr selected = mParentData->getChildSelected();
180 for (Data::VectorData::const_iterator child = mParentData->getChilds().begin();
181 child != mParentData->getChilds().end();
182 child++)
183 {
184 if (selected == *child)
185 {
186 MyGUI::IntPoint value = (*child)->getPropertyValue<MyGUI::IntPoint>("Point");
187 mControl->setCoordValue(MyGUI::IntCoord(value, mSize), ScopeTextureControl::SelectorPosition);
188 }
189 else
190 {
191 MyGUI::IntPoint value = (*child)->getPropertyValue<MyGUI::IntPoint>("Point");
192 mFrames.emplace_back(MyGUI::IntCoord(value, mSize), ScopeTextureControl::SelectorPosition);
193 }
194 }
195
196 if (selected == nullptr)
197 {
198 mControl->clearCoordValue();
199 }
200 }
201
202 if (mControl != nullptr)
203 mControl->setViewSelectors(mFrames);
204 }
205
206}

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected