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

Method initState

Tools/SkinEditor/TestState.cpp:35–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33 }
34
35 void TestState::initState()
36 {
37 if (mBack == nullptr)
38 {
39 mBack = new Control();
40 mBack->Initialise(SettingsManager::getInstance().getValue("TestState/BackgroundLayout"));
41 }
42
43 mBack->getRoot()->setVisible(true);
44
45 if (mTestWindow == nullptr)
46 {
47 mTestWindow = new TestWindow();
48 mTestWindow->Initialise();
49 mTestWindow->eventEndDialog.connect(this, &TestState::notifyEndDialogTest);
50 }
51
52 DataPtr data = DataUtility::getSelectedDataByType("Skin");
53 if (data != nullptr)
54 {
55 mTestWindow->setSkinItem(data);
56 mTestWindow->getRoot()->setVisible(true);
57 mTestWindow->doModal();
58 }
59 else
60 {
61 StateManager::getInstance().stateEvent(this, "Exit");
62 }
63 }
64
65 void TestState::cleanupState()
66 {

Callers 1

pushStateMethod · 0.45

Calls 8

setSkinItemMethod · 0.80
stateEventMethod · 0.80
InitialiseMethod · 0.45
getValueMethod · 0.45
setVisibleMethod · 0.45
getRootMethod · 0.45
connectMethod · 0.45
doModalMethod · 0.45

Tested by

no test coverage detected