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

Method updateProperty

Tools/EditorFramework/PropertyTexturesControl.cpp:62–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60 }
61
62 void PropertyTexturesControl::updateProperty()
63 {
64 PropertyPtr proper = getProperty();
65 if (proper != nullptr)
66 {
67 mComboBox->setEnabled(!proper->getType()->getReadOnly());
68 mBrowse->setEnabled(!proper->getType()->getReadOnly());
69
70 size_t index = getComboIndex(proper->getValue());
71 mComboBox->setIndexSelected(index);
72 if (index == MyGUI::ITEM_NONE)
73 mComboBox->setCaption(replaceTags("ColourError") + proper->getValue());
74
75 mImage->setVisible(true);
76 mImage->setImageTexture(proper->getValue());
77
78 mTextureSize = MyGUI::texture_utility::getTextureSize(proper->getValue());
79
80 updateTexture();
81 }
82 else
83 {
84 mComboBox->setIndexSelected(MyGUI::ITEM_NONE);
85 mComboBox->setEnabled(false);
86 mBrowse->setEnabled(false);
87 mImage->setVisible(false);
88 }
89 }
90
91 void PropertyTexturesControl::notifyComboChangePosition(MyGUI::ComboBox* _sender, size_t _index)
92 {

Callers

nothing calls this directly

Calls 9

replaceTagsFunction · 0.85
getReadOnlyMethod · 0.80
setImageTextureMethod · 0.80
setEnabledMethod · 0.45
getTypeMethod · 0.45
getValueMethod · 0.45
setIndexSelectedMethod · 0.45
setCaptionMethod · 0.45
setVisibleMethod · 0.45

Tested by

no test coverage detected