| 57 | } |
| 58 | |
| 59 | void PanelItems::update(MyGUI::Widget* _currentWidget) |
| 60 | { |
| 61 | mCurrentWidget = _currentWidget; |
| 62 | |
| 63 | if (mCurrentWidget == nullptr) |
| 64 | { |
| 65 | setVisible(false); |
| 66 | return; |
| 67 | } |
| 68 | |
| 69 | selectItem(mCurrentWidget); |
| 70 | |
| 71 | WidgetStyle* widgetType = WidgetTypes::getInstance().findWidgetStyle(mCurrentWidget->getTypeName()); |
| 72 | |
| 73 | if (widgetType->many_items) |
| 74 | { |
| 75 | setVisible(true); |
| 76 | |
| 77 | mPanelCell->setCaption(replaceTags("Items")); |
| 78 | |
| 79 | updateList(); |
| 80 | |
| 81 | mEdit->setCaption(MyGUI::UString()); |
| 82 | //обновляем кнопки |
| 83 | notifyChangeWidth(0); |
| 84 | } |
| 85 | else |
| 86 | { |
| 87 | setVisible(false); |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | void PanelItems::selectItem(MyGUI::Widget* _widget) |
| 92 | { |
no test coverage detected