2020-08-04 13:15:02 +08:00
|
|
|
#include "BagScene.h"
|
|
|
|
|
2022-07-11 17:50:21 +08:00
|
|
|
USING_NS_AX;
|
2020-08-04 13:15:02 +08:00
|
|
|
|
|
|
|
BagScene::BagScene() :_bagWindow(nullptr)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
BagScene::~BagScene()
|
|
|
|
{
|
2022-07-15 19:17:01 +08:00
|
|
|
AX_SAFE_RELEASE(_bagWindow);
|
2020-08-04 13:15:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void BagScene::continueInit()
|
|
|
|
{
|
|
|
|
UIPackage::addPackage("UI/Bag");
|
|
|
|
UIConfig::horizontalScrollBar = "";
|
|
|
|
UIConfig::verticalScrollBar = "";
|
|
|
|
|
|
|
|
_view = UIPackage::createObject("Bag", "Main")->as<GComponent>();
|
|
|
|
_groot->addChild(_view);
|
|
|
|
|
|
|
|
_bagWindow = BagWindow::create();
|
|
|
|
_bagWindow->retain();
|
|
|
|
_view->getChild("bagBtn")->addClickListener([this](EventContext*) { _bagWindow->show(); });
|
|
|
|
}
|