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

Method update

Tools/LayoutEditor/PanelItems.cpp:59–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 1

Calls 5

setVisibleFunction · 0.85
replaceTagsFunction · 0.85
UStringFunction · 0.85
findWidgetStyleMethod · 0.80
setCaptionMethod · 0.45

Tested by

no test coverage detected