| 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 | { |
nothing calls this directly
no test coverage detected