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

Function step_create_widget

UnitTests/UnitTest_AttachDetach/DemoKeeper.cpp:186–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184 }
185
186 static void step_create_widget()
187 {
188 MyGUI::Widget* widget = get_random(all_widgets);
189 if (widget)
190 {
191 auto type = get_type();
192 auto layer = type == MyGUI::WidgetStyle::Popup ? get_layer() : "";
193 MyGUI::Widget* child =
194 widget->createWidget<MyGUI::Widget>(type, get_skin(), get_coord(), MyGUI::Align::Default, layer);
195 MYGUI_ASSERT(child, "child nullptr");
196 all_widgets.push_back(child);
197 }
198 else
199 {
200 MyGUI::Widget* child = MyGUI::Gui::getInstance().createWidget<MyGUI::Widget>(
201 get_skin(),
202 get_coord(),
203 MyGUI::Align::Default,
204 get_layer());
205 MYGUI_ASSERT(child, "child nullptr");
206 all_widgets.push_back(child);
207 }
208 test_widgets();
209 }
210
211 static void step_create_widget(int _count)
212 {

Callers 1

notifyFrameStartedMethod · 0.85

Calls 8

get_randomFunction · 0.85
get_typeFunction · 0.85
get_layerFunction · 0.85
get_skinFunction · 0.85
get_coordFunction · 0.85
test_widgetsFunction · 0.85
randomFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected