MCPcopy Create free account
hub / github.com/axmolengine/axmol / continueInit

Method continueInit

tests/fairygui-tests/Source/BasicsScene.cpp:7–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5using namespace ax;
6
7void BasicsScene::continueInit()
8{
9 UIConfig::buttonSound = "ui://Basics/click";
10 UIConfig::verticalScrollBar = "ui://Basics/ScrollBar_VT";
11 UIConfig::horizontalScrollBar = "ui://Basics/ScrollBar_HZ";
12 UIConfig::tooltipsWin = "ui://Basics/WindowFrame";
13 UIConfig::popupMenu = "ui://Basics/PopupMenu";
14
15 UIPackage::addPackage("UI/Basics");
16 _view = UIPackage::createObject("Basics", "Main")->as<GComponent>();
17 _groot->addChild(_view);
18
19 _backBtn = _view->getChild("btn_Back");
20 _backBtn->setVisible(false);
21 _backBtn->addClickListener(AX_CALLBACK_1(BasicsScene::onClickBack, this));
22
23 _demoContainer = _view->getChild("container")->as<GComponent>();
24 _cc = _view->getController("c1");
25
26 int cnt = _view->numChildren();
27 for (int i = 0; i < cnt; i++)
28 {
29 GObject* obj = _view->getChildAt(i);
30 if (obj->getGroup() != nullptr && obj->getGroup()->name.compare("btns") == 0)
31 obj->addClickListener(AX_CALLBACK_1(BasicsScene::runDemo, this));
32 }
33}
34
35BasicsScene::BasicsScene()
36 : _winA(nullptr),

Callers

nothing calls this directly

Calls 9

addClickListenerMethod · 0.80
addChildMethod · 0.45
getChildMethod · 0.45
setVisibleMethod · 0.45
getControllerMethod · 0.45
numChildrenMethod · 0.45
getChildAtMethod · 0.45
getGroupMethod · 0.45
compareMethod · 0.45

Tested by

no test coverage detected