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

Method onFillValues

Tools/LayoutEditor/PropertyFieldSkin.cpp:22–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20 }
21
22 void PropertyFieldSkin::onFillValues()
23 {
24 WidgetStyle::VectorString values =
25 WidgetTypes::getInstance().findWidgetStyle(mCurrentWidget->getTypeName())->skin;
26
27 // добавляем скины и шаблоны
28 MyGUI::ResourceManager::EnumeratorPtr resource = MyGUI::ResourceManager::getInstance().getEnumerator();
29 while (resource.next())
30 {
31 MyGUI::ResourceSkin* resourceSkin = resource.current().second->castType<MyGUI::ResourceSkin>(false);
32 if (resourceSkin != nullptr)
33 {
34 if (!MyGUI::utility::startWith(resourceSkin->getResourceName(), "LE_"))
35 values.push_back(replaceTags("ColourDefault") + resourceSkin->getResourceName());
36 }
37
38 MyGUI::ResourceLayout* resourceLayout = resource.current().second->castType<MyGUI::ResourceLayout>(false);
39 if (resourceLayout != nullptr)
40 {
41 if (!MyGUI::utility::endWith(resourceLayout->getResourceName(), ".layout"))
42 {
43 if (!MyGUI::utility::startWith(resourceLayout->getResourceName(), "LE_"))
44 values.push_back(replaceTags("ColourDefault") + resourceLayout->getResourceName());
45 }
46 }
47 }
48
49 mField->removeAllItems();
50 for (auto& value : values)
51 mField->addItem(value);
52 mField->beginToItemFirst();
53 }
54
55 void PropertyFieldSkin::notifyToolTip(MyGUI::Widget* _sender, const MyGUI::ToolTipInfo& _info)
56 {

Callers

nothing calls this directly

Calls 11

startWithFunction · 0.85
replaceTagsFunction · 0.85
findWidgetStyleMethod · 0.80
endWithFunction · 0.50
getEnumeratorMethod · 0.45
nextMethod · 0.45
currentMethod · 0.45
push_backMethod · 0.45
removeAllItemsMethod · 0.45
addItemMethod · 0.45
beginToItemFirstMethod · 0.45

Tested by

no test coverage detected