readd stencil

This commit is contained in:
altalk23 2023-09-09 14:33:00 +03:00
parent 114fa465a8
commit 32b622639c

View file

@ -343,28 +343,28 @@ bool ModListLayer::init() {
m_menu->addChild(m_featuredTabBtn); m_menu->addChild(m_featuredTabBtn);
// tabs gradient // tabs gradient
// m_tabsGradientNode = CCClippingNode::create(); m_tabsGradientNode = CCClippingNode::create();
// m_tabsGradientNode->setContentSize(this->getContentSize()); m_tabsGradientNode->setContentSize(this->getContentSize());
// m_tabsGradientNode->setAnchorPoint({0.5f, 0.5f}); m_tabsGradientNode->setAnchorPoint({0.5f, 0.5f});
// m_tabsGradientNode->ignoreAnchorPointForPosition(true); m_tabsGradientNode->ignoreAnchorPointForPosition(true);
// m_tabsGradientNode->setZOrder(9); m_tabsGradientNode->setZOrder(9);
// m_tabsGradientNode->setInverted(false); m_tabsGradientNode->setInverted(false);
// m_tabsGradientNode->setAlphaThreshold(0.f); m_tabsGradientNode->setAlphaThreshold(0.f);
// m_tabsGradientSprite = CCSprite::create("tab-gradient.png"_spr); m_tabsGradientSprite = CCSprite::create("tab-gradient.png"_spr);
// m_tabsGradientNode->addChild(m_tabsGradientSprite); m_tabsGradientNode->addChild(m_tabsGradientSprite);
// m_tabsGradientStencil = CCSprite::create("tab-gradient-mask.png"_spr); m_tabsGradientStencil = CCSprite::create("tab-gradient-mask.png"_spr);
// m_tabsGradientStencil->setAnchorPoint({0.f, 0.f}); m_tabsGradientStencil->setAnchorPoint({0.f, 0.f});
// m_tabsGradientNode->setStencil(m_tabsGradientStencil); m_tabsGradientNode->setStencil(m_tabsGradientStencil);
// add menus // add menus
m_menu->setZOrder(0); m_menu->setZOrder(0);
m_topMenu->setZOrder(10); m_topMenu->setZOrder(10);
this->addChild(m_menu); this->addChild(m_menu);
// this->addChild(m_tabsGradientNode); this->addChild(m_tabsGradientNode);
// this->addChild(m_tabsGradientStencil); this->addChild(m_tabsGradientStencil);
this->addChild(m_topMenu); this->addChild(m_topMenu);
// select first tab // select first tab